@dr.pogodin/react-utils 1.56.4 → 1.57.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/release.sh +1 -1
- package/build/development/shared/components/Button/index.js +6 -6
- package/build/development/shared/components/Checkbox/index.js +10 -10
- package/build/development/shared/components/GenericLink/index.js +1 -1
- package/build/development/shared/components/Input/index.js +9 -9
- package/build/development/shared/components/Modal/index.js +6 -6
- package/build/development/shared/components/PageLayout/index.js +6 -6
- package/build/development/shared/components/TextArea/index.js +9 -9
- package/build/development/shared/components/Throbber/index.js +6 -6
- package/build/development/shared/components/WithTooltip/index.js +7 -7
- package/build/development/shared/components/YouTubeVideo/index.js +9 -9
- package/build/development/shared/components/selectors/CustomDropdown/Options/index.js +1 -1
- package/build/development/shared/components/selectors/CustomDropdown/index.js +11 -11
- package/build/development/shared/components/selectors/NativeDropdown/index.js +12 -12
- package/build/development/shared/components/selectors/Switch/index.js +7 -7
- package/build/production/shared/components/Button/index.js +1 -1
- package/build/production/shared/components/Button/index.js.map +1 -1
- package/build/production/shared/components/Checkbox/index.js +1 -1
- package/build/production/shared/components/Checkbox/index.js.map +1 -1
- package/build/production/shared/components/GenericLink/index.js +1 -1
- package/build/production/shared/components/Input/index.js +1 -1
- package/build/production/shared/components/Modal/index.js +1 -1
- package/build/production/shared/components/Modal/index.js.map +1 -1
- package/build/production/shared/components/PageLayout/index.js +1 -1
- package/build/production/shared/components/PageLayout/index.js.map +1 -1
- package/build/production/shared/components/TextArea/index.js +1 -1
- package/build/production/shared/components/Throbber/index.js +1 -1
- package/build/production/shared/components/Throbber/index.js.map +1 -1
- package/build/production/shared/components/WithTooltip/index.js +1 -1
- package/build/production/shared/components/YouTubeVideo/index.js +1 -1
- package/build/production/shared/components/selectors/CustomDropdown/Options/index.js +1 -1
- package/build/production/shared/components/selectors/CustomDropdown/index.js +1 -1
- package/build/production/shared/components/selectors/NativeDropdown/index.js +1 -1
- package/build/production/shared/components/selectors/Switch/index.js +1 -1
- package/build/production/shared/components/selectors/Switch/index.js.map +1 -1
- package/config/babel/webpack.d.ts +2 -0
- package/config/babel/webpack.js +7 -8
- package/config/jest/default.js +1 -0
- package/config/webpack/app-base.js +16 -33
- package/config/webpack/app-development.d.ts +0 -2
- package/config/webpack/app-development.js +2 -4
- package/config/webpack/app-production.d.ts +1 -4
- package/config/webpack/app-production.js +0 -19
- package/package.json +15 -22
package/bin/release.sh
CHANGED
|
@@ -23,4 +23,4 @@ gsutil -m rsync -d -r docs/build gs://docs.pogodin.studio/react-utils
|
|
|
23
23
|
|
|
24
24
|
# Library package release.
|
|
25
25
|
export NPM_ID_TOKEN=$(circleci run oidc get --claims '{"aud": "npm:registry.npmjs.org"}')
|
|
26
|
-
npm publish --access public
|
|
26
|
+
npm publish --access public --tag v1.57-alpha
|
|
@@ -2,12 +2,12 @@ import { c as _c } from "react/compiler-runtime"; // The <Button> component impl
|
|
|
2
2
|
import { useTheme } from "@dr.pogodin/react-themes";
|
|
3
3
|
import Link from "../Link.js";
|
|
4
4
|
const defaultTheme = {
|
|
5
|
-
"context": "
|
|
6
|
-
"ad": "
|
|
7
|
-
"hoc": "
|
|
8
|
-
"button": "
|
|
9
|
-
"active": "
|
|
10
|
-
"disabled": "
|
|
5
|
+
"context": "./build/web/shared/components/Button/style.scss__context__PU1Wq1",
|
|
6
|
+
"ad": "./build/web/shared/components/Button/style.scss__ad__70fxqu",
|
|
7
|
+
"hoc": "./build/web/shared/components/Button/style.scss__hoc__M5doss",
|
|
8
|
+
"button": "./build/web/shared/components/Button/style.scss__button__S1Jf/g",
|
|
9
|
+
"active": "./build/web/shared/components/Button/style.scss__active__BHZzyZ",
|
|
10
|
+
"disabled": "./build/web/shared/components/Button/style.scss__disabled__dDqoII"
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
export const BaseButton = t0 => {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useTheme } from "@dr.pogodin/react-themes";
|
|
3
3
|
const defaultTheme = {
|
|
4
|
-
"context": "
|
|
5
|
-
"ad": "
|
|
6
|
-
"hoc": "
|
|
7
|
-
"checkbox": "
|
|
8
|
-
"indeterminate": "
|
|
9
|
-
"container": "
|
|
10
|
-
"label": "
|
|
11
|
-
"error": "
|
|
12
|
-
"errorMessage": "
|
|
13
|
-
"disabled": "
|
|
4
|
+
"context": "./build/web/shared/components/Checkbox/theme.scss__context__okvOYY",
|
|
5
|
+
"ad": "./build/web/shared/components/Checkbox/theme.scss__ad__APtgyD",
|
|
6
|
+
"hoc": "./build/web/shared/components/Checkbox/theme.scss__hoc__6pnR6p",
|
|
7
|
+
"checkbox": "./build/web/shared/components/Checkbox/theme.scss__checkbox__RFCPuo",
|
|
8
|
+
"indeterminate": "./build/web/shared/components/Checkbox/theme.scss__indeterminate__3kU4nG",
|
|
9
|
+
"container": "./build/web/shared/components/Checkbox/theme.scss__container__J5YXRW",
|
|
10
|
+
"label": "./build/web/shared/components/Checkbox/theme.scss__label__tpW2to",
|
|
11
|
+
"error": "./build/web/shared/components/Checkbox/theme.scss__error__Nv+0yO",
|
|
12
|
+
"errorMessage": "./build/web/shared/components/Checkbox/theme.scss__errorMessage__7DpvR5",
|
|
13
|
+
"disabled": "./build/web/shared/components/Checkbox/theme.scss__disabled__8RLiJ3"
|
|
14
14
|
};
|
|
15
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
const Checkbox = t0 => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
const S = {
|
|
3
|
-
"link": "
|
|
3
|
+
"link": "./build/web/shared/components/GenericLink/style.scss__link__Mlw9i+"
|
|
4
4
|
};
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime"; /**
|
|
6
6
|
* The `<Link>` component, and almost identical `<NavLink>` component, are
|
|
@@ -2,15 +2,15 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
2
2
|
import { useRef, useState } from "react";
|
|
3
3
|
import { useTheme } from "@dr.pogodin/react-themes";
|
|
4
4
|
const defaultTheme = {
|
|
5
|
-
"context": "
|
|
6
|
-
"ad": "
|
|
7
|
-
"hoc": "
|
|
8
|
-
"container": "
|
|
9
|
-
"children": "
|
|
10
|
-
"input": "
|
|
11
|
-
"label": "
|
|
12
|
-
"error": "
|
|
13
|
-
"errorMessage": "
|
|
5
|
+
"context": "./build/web/shared/components/Input/theme.scss__context__3TUnRu",
|
|
6
|
+
"ad": "./build/web/shared/components/Input/theme.scss__ad__WWPoqf",
|
|
7
|
+
"hoc": "./build/web/shared/components/Input/theme.scss__hoc__+T58d7",
|
|
8
|
+
"container": "./build/web/shared/components/Input/theme.scss__container__LYiMyw",
|
|
9
|
+
"children": "./build/web/shared/components/Input/theme.scss__children__sJK+G8",
|
|
10
|
+
"input": "./build/web/shared/components/Input/theme.scss__input__hwx8yl",
|
|
11
|
+
"label": "./build/web/shared/components/Input/theme.scss__label__oqWTQf",
|
|
12
|
+
"error": "./build/web/shared/components/Input/theme.scss__error__IPcjg0",
|
|
13
|
+
"errorMessage": "./build/web/shared/components/Input/theme.scss__errorMessage__tOE+y7"
|
|
14
14
|
};
|
|
15
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; /**
|
|
16
16
|
* Themeable input field, based on the standard HTML `<input>` element.
|
|
@@ -3,14 +3,14 @@ import { useEffect, useMemo, useRef } from "react";
|
|
|
3
3
|
import { createPortal } from "react-dom";
|
|
4
4
|
import { useTheme } from "@dr.pogodin/react-themes";
|
|
5
5
|
const defaultTheme = {
|
|
6
|
-
"context": "
|
|
7
|
-
"ad": "
|
|
8
|
-
"hoc": "
|
|
9
|
-
"overlay": "
|
|
10
|
-
"container": "
|
|
6
|
+
"context": "./build/web/shared/components/Modal/base-theme.scss__context__7DYqJs",
|
|
7
|
+
"ad": "./build/web/shared/components/Modal/base-theme.scss__ad__TrAaU6",
|
|
8
|
+
"hoc": "./build/web/shared/components/Modal/base-theme.scss__hoc__rxhC8K",
|
|
9
|
+
"overlay": "./build/web/shared/components/Modal/base-theme.scss__overlay__Xvfqgz",
|
|
10
|
+
"container": "./build/web/shared/components/Modal/base-theme.scss__container__wD2kWo"
|
|
11
11
|
};
|
|
12
12
|
const S = {
|
|
13
|
-
"scrollingDisabledByModal": "
|
|
13
|
+
"scrollingDisabledByModal": "./build/web/shared/components/Modal/styles.scss__scrollingDisabledByModal__ajmoxX"
|
|
14
14
|
};
|
|
15
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; /**
|
|
16
16
|
* The `<Modal>` component implements a simple themeable modal window, wrapped
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useTheme } from "@dr.pogodin/react-themes";
|
|
3
3
|
const baseTheme = {
|
|
4
|
-
"context": "
|
|
5
|
-
"ad": "
|
|
6
|
-
"hoc": "
|
|
7
|
-
"container": "
|
|
8
|
-
"mainPanel": "
|
|
9
|
-
"sidePanel": "
|
|
4
|
+
"context": "./build/web/shared/components/PageLayout/base-theme.scss__context__/R5ELe",
|
|
5
|
+
"ad": "./build/web/shared/components/PageLayout/base-theme.scss__ad__GO16nX",
|
|
6
|
+
"hoc": "./build/web/shared/components/PageLayout/base-theme.scss__hoc__KfA2gp",
|
|
7
|
+
"container": "./build/web/shared/components/PageLayout/base-theme.scss__container__Qecuf6",
|
|
8
|
+
"mainPanel": "./build/web/shared/components/PageLayout/base-theme.scss__mainPanel__zyNUPV",
|
|
9
|
+
"sidePanel": "./build/web/shared/components/PageLayout/base-theme.scss__sidePanel__b0V5dT"
|
|
10
10
|
};
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; /**
|
|
12
12
|
* Simple and themeable page layout. It keeps the main content centered in
|
|
@@ -2,15 +2,15 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
2
2
|
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
3
3
|
import { useTheme } from "@dr.pogodin/react-themes";
|
|
4
4
|
const defaultTheme = {
|
|
5
|
-
"context": "
|
|
6
|
-
"ad": "
|
|
7
|
-
"hoc": "
|
|
8
|
-
"container": "
|
|
9
|
-
"label": "
|
|
10
|
-
"textarea": "
|
|
11
|
-
"error": "
|
|
12
|
-
"errorMessage": "
|
|
13
|
-
"hidden": "
|
|
5
|
+
"context": "./build/web/shared/components/TextArea/style.scss__context__GNvrNz",
|
|
6
|
+
"ad": "./build/web/shared/components/TextArea/style.scss__ad__7Nv/vc",
|
|
7
|
+
"hoc": "./build/web/shared/components/TextArea/style.scss__hoc__s7CQim",
|
|
8
|
+
"container": "./build/web/shared/components/TextArea/style.scss__container__U6O38x",
|
|
9
|
+
"label": "./build/web/shared/components/TextArea/style.scss__label__6kWvvS",
|
|
10
|
+
"textarea": "./build/web/shared/components/TextArea/style.scss__textarea__bdhfZS",
|
|
11
|
+
"error": "./build/web/shared/components/TextArea/style.scss__error__UfN7sx",
|
|
12
|
+
"errorMessage": "./build/web/shared/components/TextArea/style.scss__errorMessage__ElKWNP",
|
|
13
|
+
"hidden": "./build/web/shared/components/TextArea/style.scss__hidden__oSQGp1"
|
|
14
14
|
};
|
|
15
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
const TextArea = t0 => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { useTheme } from "@dr.pogodin/react-themes";
|
|
3
3
|
const defaultTheme = {
|
|
4
|
-
"context": "
|
|
5
|
-
"ad": "
|
|
6
|
-
"hoc": "
|
|
7
|
-
"bouncing": "
|
|
8
|
-
"container": "
|
|
9
|
-
"circle": "
|
|
4
|
+
"context": "./build/web/shared/components/Throbber/theme.scss__context__O+B0Ur",
|
|
5
|
+
"ad": "./build/web/shared/components/Throbber/theme.scss__ad__IcilmU",
|
|
6
|
+
"hoc": "./build/web/shared/components/Throbber/theme.scss__hoc__kKU7gk",
|
|
7
|
+
"bouncing": "./build/web/shared/components/Throbber/theme.scss__bouncing__xEEILe",
|
|
8
|
+
"container": "./build/web/shared/components/Throbber/theme.scss__container__L784+0",
|
|
9
|
+
"circle": "./build/web/shared/components/Throbber/theme.scss__circle__Zjzdw8"
|
|
10
10
|
};
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; /**
|
|
12
12
|
* Throbber is an "action in progress" indicator, which renders
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { useTheme } from "@dr.pogodin/react-themes";
|
|
3
3
|
import Tooltip, { PLACEMENTS } from "./Tooltip.js";
|
|
4
4
|
const defaultTheme = {
|
|
5
|
-
"ad": "
|
|
6
|
-
"hoc": "
|
|
7
|
-
"context": "
|
|
8
|
-
"appearance": "
|
|
9
|
-
"arrow": "
|
|
10
|
-
"container": "
|
|
11
|
-
"wrapper": "
|
|
5
|
+
"ad": "./build/web/shared/components/WithTooltip/default-theme.scss__ad__1iAhX9",
|
|
6
|
+
"hoc": "./build/web/shared/components/WithTooltip/default-theme.scss__hoc__60wg3G",
|
|
7
|
+
"context": "./build/web/shared/components/WithTooltip/default-theme.scss__context__DutzAt",
|
|
8
|
+
"appearance": "./build/web/shared/components/WithTooltip/default-theme.scss__appearance__azZwyN",
|
|
9
|
+
"arrow": "./build/web/shared/components/WithTooltip/default-theme.scss__arrow__jvjvef",
|
|
10
|
+
"container": "./build/web/shared/components/WithTooltip/default-theme.scss__container__DaypgH",
|
|
11
|
+
"wrapper": "./build/web/shared/components/WithTooltip/default-theme.scss__wrapper__JOGB0J"
|
|
12
12
|
};
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; /**
|
|
14
14
|
* Implements a simple to use and themeable tooltip component, _e.g._
|
|
@@ -3,17 +3,17 @@ import qs from "qs";
|
|
|
3
3
|
import { useTheme } from "@dr.pogodin/react-themes";
|
|
4
4
|
import Throbber from "../Throbber/index.js";
|
|
5
5
|
const defaultTheme = {
|
|
6
|
-
"context": "
|
|
7
|
-
"ad": "
|
|
8
|
-
"hoc": "
|
|
9
|
-
"container": "
|
|
10
|
-
"video": "
|
|
6
|
+
"context": "./build/web/shared/components/YouTubeVideo/base.scss__context__bDYWC3",
|
|
7
|
+
"ad": "./build/web/shared/components/YouTubeVideo/base.scss__ad__TDqUVW",
|
|
8
|
+
"hoc": "./build/web/shared/components/YouTubeVideo/base.scss__hoc__71ekxI",
|
|
9
|
+
"container": "./build/web/shared/components/YouTubeVideo/base.scss__container__UsZqTs",
|
|
10
|
+
"video": "./build/web/shared/components/YouTubeVideo/base.scss__video__Q+a3kv"
|
|
11
11
|
};
|
|
12
12
|
const throbberTheme = {
|
|
13
|
-
"context": "
|
|
14
|
-
"ad": "
|
|
15
|
-
"hoc": "
|
|
16
|
-
"container": "
|
|
13
|
+
"context": "./build/web/shared/components/YouTubeVideo/throbber.scss__context__AM08bl",
|
|
14
|
+
"ad": "./build/web/shared/components/YouTubeVideo/throbber.scss__ad__RZ3LDO",
|
|
15
|
+
"hoc": "./build/web/shared/components/YouTubeVideo/throbber.scss__hoc__qYhjMB",
|
|
16
|
+
"container": "./build/web/shared/components/YouTubeVideo/throbber.scss__container__ZwnPK1"
|
|
17
17
|
};
|
|
18
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; /**
|
|
19
19
|
* A component for embeding a YouTube video.
|
|
@@ -4,7 +4,7 @@ import { useImperativeHandle, useRef } from "react";
|
|
|
4
4
|
import { BaseModal } from "../../../Modal/index.js";
|
|
5
5
|
import { optionValueName } from "../../common.js";
|
|
6
6
|
const S = {
|
|
7
|
-
"overlay": "
|
|
7
|
+
"overlay": "./build/web/shared/components/selectors/CustomDropdown/Options/style.scss__overlay__rUwEKi"
|
|
8
8
|
};
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
export function areEqual(a, b) {
|
|
@@ -4,17 +4,17 @@ import { useTheme } from "@dr.pogodin/react-themes";
|
|
|
4
4
|
import { optionValueName } from "../common.js";
|
|
5
5
|
import Options, { areEqual } from "./Options/index.js";
|
|
6
6
|
const defaultTheme = {
|
|
7
|
-
"context": "
|
|
8
|
-
"ad": "
|
|
9
|
-
"hoc": "
|
|
10
|
-
"container": "
|
|
11
|
-
"label": "
|
|
12
|
-
"dropdown": "
|
|
13
|
-
"option": "
|
|
14
|
-
"select": "
|
|
15
|
-
"arrow": "
|
|
16
|
-
"active": "
|
|
17
|
-
"upward": "
|
|
7
|
+
"context": "./build/web/shared/components/selectors/CustomDropdown/theme.scss__context__RP6Vk7",
|
|
8
|
+
"ad": "./build/web/shared/components/selectors/CustomDropdown/theme.scss__ad__mxMIAj",
|
|
9
|
+
"hoc": "./build/web/shared/components/selectors/CustomDropdown/theme.scss__hoc__9aPOTG",
|
|
10
|
+
"container": "./build/web/shared/components/selectors/CustomDropdown/theme.scss__container__LPV9XL",
|
|
11
|
+
"label": "./build/web/shared/components/selectors/CustomDropdown/theme.scss__label__9dHzr+",
|
|
12
|
+
"dropdown": "./build/web/shared/components/selectors/CustomDropdown/theme.scss__dropdown__B6NGsW",
|
|
13
|
+
"option": "./build/web/shared/components/selectors/CustomDropdown/theme.scss__option__Tnt/VV",
|
|
14
|
+
"select": "./build/web/shared/components/selectors/CustomDropdown/theme.scss__select__RuGmq+",
|
|
15
|
+
"arrow": "./build/web/shared/components/selectors/CustomDropdown/theme.scss__arrow__j6nrsb",
|
|
16
|
+
"active": "./build/web/shared/components/selectors/CustomDropdown/theme.scss__active__MbiYuy",
|
|
17
|
+
"upward": "./build/web/shared/components/selectors/CustomDropdown/theme.scss__upward__HhaZ2q"
|
|
18
18
|
};
|
|
19
19
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
20
|
const CustomDropdown = t0 => {
|
|
@@ -2,18 +2,18 @@ import _pushInstanceProperty from "core-js-pure/stable/instance/push.js"; // Imp
|
|
|
2
2
|
import { useTheme } from "@dr.pogodin/react-themes";
|
|
3
3
|
import { optionValueName } from "../common.js";
|
|
4
4
|
const defaultTheme = {
|
|
5
|
-
"context": "
|
|
6
|
-
"ad": "
|
|
7
|
-
"hoc": "
|
|
8
|
-
"dropdown": "
|
|
9
|
-
"arrow": "
|
|
10
|
-
"container": "
|
|
11
|
-
"active": "
|
|
12
|
-
"label": "
|
|
13
|
-
"option": "
|
|
14
|
-
"hiddenOption": "
|
|
15
|
-
"select": "
|
|
16
|
-
"invalid": "
|
|
5
|
+
"context": "./build/web/shared/components/selectors/NativeDropdown/theme.scss__context__AaQ358",
|
|
6
|
+
"ad": "./build/web/shared/components/selectors/NativeDropdown/theme.scss__ad__/3wJCb",
|
|
7
|
+
"hoc": "./build/web/shared/components/selectors/NativeDropdown/theme.scss__hoc__ptCZm5",
|
|
8
|
+
"dropdown": "./build/web/shared/components/selectors/NativeDropdown/theme.scss__dropdown__un6lKF",
|
|
9
|
+
"arrow": "./build/web/shared/components/selectors/NativeDropdown/theme.scss__arrow__5hbW5W",
|
|
10
|
+
"container": "./build/web/shared/components/selectors/NativeDropdown/theme.scss__container__YgJV4r",
|
|
11
|
+
"active": "./build/web/shared/components/selectors/NativeDropdown/theme.scss__active__A0PICa",
|
|
12
|
+
"label": "./build/web/shared/components/selectors/NativeDropdown/theme.scss__label__PR62Hn",
|
|
13
|
+
"option": "./build/web/shared/components/selectors/NativeDropdown/theme.scss__option__qiZJ4p",
|
|
14
|
+
"hiddenOption": "./build/web/shared/components/selectors/NativeDropdown/theme.scss__hiddenOption__J8s3mU",
|
|
15
|
+
"select": "./build/web/shared/components/selectors/NativeDropdown/theme.scss__select__wULKZG",
|
|
16
|
+
"invalid": "./build/web/shared/components/selectors/NativeDropdown/theme.scss__invalid__b0jjs4"
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* Implements a themeable dropdown list. Internally it is rendered with help of
|
|
@@ -3,13 +3,13 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
3
3
|
import { useTheme } from "@dr.pogodin/react-themes";
|
|
4
4
|
import { optionValueName } from "../common.js";
|
|
5
5
|
const defaultTheme = {
|
|
6
|
-
"context": "
|
|
7
|
-
"ad": "
|
|
8
|
-
"hoc": "
|
|
9
|
-
"container": "
|
|
10
|
-
"option": "
|
|
11
|
-
"selected": "
|
|
12
|
-
"options": "
|
|
6
|
+
"context": "./build/web/shared/components/selectors/Switch/theme.scss__context__qsQGw8",
|
|
7
|
+
"ad": "./build/web/shared/components/selectors/Switch/theme.scss__ad__0tEPaR",
|
|
8
|
+
"hoc": "./build/web/shared/components/selectors/Switch/theme.scss__hoc__cH7sgP",
|
|
9
|
+
"container": "./build/web/shared/components/selectors/Switch/theme.scss__container__BaTkUo",
|
|
10
|
+
"option": "./build/web/shared/components/selectors/Switch/theme.scss__option__+7VQ7n",
|
|
11
|
+
"selected": "./build/web/shared/components/selectors/Switch/theme.scss__selected__jlmFIq",
|
|
12
|
+
"options": "./build/web/shared/components/selectors/Switch/theme.scss__options__PvRxUg"
|
|
13
13
|
};
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
15
|
export const Switch = t0 => {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import{c as _c}from"react/compiler-runtime";// The <Button> component implements a standard button / button-like link.
|
|
2
|
-
import{useTheme}from"@dr.pogodin/react-themes";import Link from"../Link.js";const defaultTheme={"context":"
|
|
2
|
+
import{useTheme}from"@dr.pogodin/react-themes";import Link from"../Link.js";const defaultTheme={"context":"PU1Wq1","ad":"_70fxqu","hoc":"M5doss","button":"S1Jf/g","active":"BHZzyZ","disabled":"dDqoII"};import{jsx as _jsx}from"react/jsx-runtime";export const BaseButton=t0=>{const $=_c(32);const{active,children,disabled,enforceA,keepScrollPosition,onClick,onKeyDown:onKeyDownProp,onKeyUp,onMouseDown,onMouseUp,onPointerDown,onPointerUp,openNewTab,replace,testId,theme,to}=t0;let className=theme.button;if(active&&theme.active){className=className+` ${theme.active}`;}if(disabled){if(theme.disabled){className=className+` ${theme.disabled}`;}const t1=process.env.NODE_ENV==="production"?undefined:testId;let t2;if($[0]!==children||$[1]!==className||$[2]!==t1){t2=/*#__PURE__*/_jsx("div",{className:className,"data-testid":t1,children:children});$[0]=children;$[1]=className;$[2]=t1;$[3]=t2;}else{t2=$[3];}return t2;}let onKeyDown=onKeyDownProp;if(!onKeyDown&&onClick){let t1;if($[4]!==onClick){t1=e=>{if(e.key==="Enter"){onClick(e);}};$[4]=onClick;$[5]=t1;}else{t1=$[5];}onKeyDown=t1;}if(to){const t1=process.env.NODE_ENV==="production"?undefined:testId;let t2;if($[6]!==children||$[7]!==className||$[8]!==enforceA||$[9]!==keepScrollPosition||$[10]!==onClick||$[11]!==onKeyUp||$[12]!==onMouseDown||$[13]!==onMouseUp||$[14]!==onPointerDown||$[15]!==onPointerUp||$[16]!==openNewTab||$[17]!==replace||$[18]!==t1||$[19]!==to){t2=/*#__PURE__*/_jsx(Link,{className:className,"data-testid":t1,enforceA:enforceA,keepScrollPosition:keepScrollPosition,onClick:onClick,onKeyUp:onKeyUp,onMouseDown:onMouseDown,onMouseUp:onMouseUp,onPointerDown:onPointerDown,onPointerUp:onPointerUp,openNewTab:openNewTab,replace:replace,to:to,children:children});$[6]=children;$[7]=className;$[8]=enforceA;$[9]=keepScrollPosition;$[10]=onClick;$[11]=onKeyUp;$[12]=onMouseDown;$[13]=onMouseUp;$[14]=onPointerDown;$[15]=onPointerUp;$[16]=openNewTab;$[17]=replace;$[18]=t1;$[19]=to;$[20]=t2;}else{t2=$[20];}return t2;}const t1=process.env.NODE_ENV==="production"?undefined:testId;let t2;if($[21]!==children||$[22]!==className||$[23]!==onClick||$[24]!==onKeyDown||$[25]!==onKeyUp||$[26]!==onMouseDown||$[27]!==onMouseUp||$[28]!==onPointerDown||$[29]!==onPointerUp||$[30]!==t1){t2=/*#__PURE__*/_jsx("div",{className:className,"data-testid":t1,onClick:onClick,onKeyDown:onKeyDown,onKeyUp:onKeyUp,onMouseDown:onMouseDown,onMouseUp:onMouseUp,onPointerDown:onPointerDown,onPointerUp:onPointerUp,role:"button",tabIndex:0,children:children});$[21]=children;$[22]=className;$[23]=onClick;$[24]=onKeyDown;$[25]=onKeyUp;$[26]=onMouseDown;$[27]=onMouseUp;$[28]=onPointerDown;$[29]=onPointerUp;$[30]=t1;$[31]=t2;}else{t2=$[31];}return t2;};const Button=t0=>{const $=_c(6);let rest;let theme;if($[0]!==t0){({theme,...rest}=t0);$[0]=t0;$[1]=rest;$[2]=theme;}else{rest=$[1];theme=$[2];}const composed=useTheme("Button",defaultTheme,theme);let t1;if($[3]!==composed||$[4]!==rest){t1=/*#__PURE__*/_jsx(BaseButton,{...rest,theme:composed});$[3]=composed;$[4]=rest;$[5]=t1;}else{t1=$[5];}return t1;};export default Button;
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/shared/components/Button/index.tsx"],"sourcesContent":["// The <Button> component implements a standard button / button-like link.\n\nimport type {\n FunctionComponent,\n KeyboardEventHandler,\n MouseEventHandler,\n PointerEventHandler,\n ReactNode,\n} from 'react';\n\nimport { type Theme, useTheme } from '@dr.pogodin/react-themes';\n\nimport Link from 'components/Link';\n\nimport defaultTheme from './style.scss';\n\ntype ThemeT = Theme<'active' | 'button' | 'disabled'>;\n\ntype PropsT = {\n active?: boolean;\n children?: ReactNode;\n disabled?: boolean;\n enforceA?: boolean;\n keepScrollPosition?: boolean;\n onClick?: KeyboardEventHandler & MouseEventHandler;\n onKeyDown?: KeyboardEventHandler;\n onKeyUp?: KeyboardEventHandler;\n onMouseDown?: MouseEventHandler;\n onMouseUp?: MouseEventHandler;\n onPointerDown?: PointerEventHandler;\n onPointerUp?: PointerEventHandler;\n openNewTab?: boolean;\n replace?: boolean;\n testId?: string;\n theme: ThemeT;\n\n // TODO: It needs a more precise typing of the object option.\n to?: object | string;\n};\n\nexport const BaseButton: FunctionComponent<PropsT> = ({\n active,\n children,\n disabled,\n enforceA,\n keepScrollPosition,\n onClick,\n onKeyDown: onKeyDownProp,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onPointerDown,\n onPointerUp,\n openNewTab,\n replace,\n testId,\n theme,\n to,\n}) => {\n let className = theme.button;\n if (active && theme.active) className += ` ${theme.active}`;\n if (disabled) {\n if (theme.disabled) className += ` ${theme.disabled}`;\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n >\n {children}\n </div>\n );\n }\n\n let onKeyDown = onKeyDownProp;\n if (!onKeyDown && onClick) {\n onKeyDown = (e) => {\n if (e.key === 'Enter') onClick(e);\n };\n }\n\n if (to) {\n return (\n <Link\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n enforceA={enforceA}\n\n // TODO: This was exposed as a hotifx... however, I guess we better want\n // to check if the `to` URL contains an anchor (#), and if it does we should\n // automatically opt to keep the position here; and enforce <a> (as\n // react-router link does not seem to respect the hash tag either,\n // at least not without some additional settings).\n keepScrollPosition={keepScrollPosition}\n\n onClick={onClick}\n\n // TODO: For now, the `onKeyDown` handler is not passed to the <Link>,\n // as <Link> component does not call it anyway, presumably due to\n // the inner implementation details. We should look into supporting it:\n // https://github.com/birdofpreyru/react-utils/issues/444\n // onKeyDown={onKeyDown}\n\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n openNewTab={openNewTab}\n replace={replace}\n to={to}\n >\n {children}\n </Link>\n );\n }\n\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n onClick={onClick}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n role=\"button\"\n tabIndex={0}\n >\n {children}\n </div>\n );\n};\n\nconst Button: FunctionComponent<\n Omit<PropsT, 'theme'> & { theme?: ThemeT }\n> = ({ theme, ...rest }) => {\n const composed = useTheme('Button', defaultTheme, theme);\n\n // eslint-disable-next-line react/jsx-props-no-spreading\n return <BaseButton {...rest} theme={composed} />;\n};\n\nexport default Button;\n"],"mappings":"4CAAA;AAUA,OAAqB,QAAQ,KAAQ,0BAA0B,CAAC,MAEzD,KAAI,kBAEX
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/shared/components/Button/index.tsx"],"sourcesContent":["// The <Button> component implements a standard button / button-like link.\n\nimport type {\n FunctionComponent,\n KeyboardEventHandler,\n MouseEventHandler,\n PointerEventHandler,\n ReactNode,\n} from 'react';\n\nimport { type Theme, useTheme } from '@dr.pogodin/react-themes';\n\nimport Link from 'components/Link';\n\nimport defaultTheme from './style.scss';\n\ntype ThemeT = Theme<'active' | 'button' | 'disabled'>;\n\ntype PropsT = {\n active?: boolean;\n children?: ReactNode;\n disabled?: boolean;\n enforceA?: boolean;\n keepScrollPosition?: boolean;\n onClick?: KeyboardEventHandler & MouseEventHandler;\n onKeyDown?: KeyboardEventHandler;\n onKeyUp?: KeyboardEventHandler;\n onMouseDown?: MouseEventHandler;\n onMouseUp?: MouseEventHandler;\n onPointerDown?: PointerEventHandler;\n onPointerUp?: PointerEventHandler;\n openNewTab?: boolean;\n replace?: boolean;\n testId?: string;\n theme: ThemeT;\n\n // TODO: It needs a more precise typing of the object option.\n to?: object | string;\n};\n\nexport const BaseButton: FunctionComponent<PropsT> = ({\n active,\n children,\n disabled,\n enforceA,\n keepScrollPosition,\n onClick,\n onKeyDown: onKeyDownProp,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onPointerDown,\n onPointerUp,\n openNewTab,\n replace,\n testId,\n theme,\n to,\n}) => {\n let className = theme.button;\n if (active && theme.active) className += ` ${theme.active}`;\n if (disabled) {\n if (theme.disabled) className += ` ${theme.disabled}`;\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n >\n {children}\n </div>\n );\n }\n\n let onKeyDown = onKeyDownProp;\n if (!onKeyDown && onClick) {\n onKeyDown = (e) => {\n if (e.key === 'Enter') onClick(e);\n };\n }\n\n if (to) {\n return (\n <Link\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n enforceA={enforceA}\n\n // TODO: This was exposed as a hotifx... however, I guess we better want\n // to check if the `to` URL contains an anchor (#), and if it does we should\n // automatically opt to keep the position here; and enforce <a> (as\n // react-router link does not seem to respect the hash tag either,\n // at least not without some additional settings).\n keepScrollPosition={keepScrollPosition}\n\n onClick={onClick}\n\n // TODO: For now, the `onKeyDown` handler is not passed to the <Link>,\n // as <Link> component does not call it anyway, presumably due to\n // the inner implementation details. We should look into supporting it:\n // https://github.com/birdofpreyru/react-utils/issues/444\n // onKeyDown={onKeyDown}\n\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n openNewTab={openNewTab}\n replace={replace}\n to={to}\n >\n {children}\n </Link>\n );\n }\n\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n onClick={onClick}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n role=\"button\"\n tabIndex={0}\n >\n {children}\n </div>\n );\n};\n\nconst Button: FunctionComponent<\n Omit<PropsT, 'theme'> & { theme?: ThemeT }\n> = ({ theme, ...rest }) => {\n const composed = useTheme('Button', defaultTheme, theme);\n\n // eslint-disable-next-line react/jsx-props-no-spreading\n return <BaseButton {...rest} theme={composed} />;\n};\n\nexport default Button;\n"],"mappings":"4CAAA;AAUA,OAAqB,QAAQ,KAAQ,0BAA0B,CAAC,MAEzD,KAAI,kBAEX,8HAAwC,2CA0BxC,MAAO,MAAM,WAAqC,CAAG,oBAAC,yLAkBrD,CACC,cAAgB,KAAK,OAAO,CAC5B,GAAI,MAAsB,EAAZ,KAAK,OAAO,EAAE,mBAAS,CAAI,IAAI,KAAK,OAAO,EAAE,EAC3D,GAAI,QAAQ,EACV,GAAI,KAAK,SAAS,EAAE,mBAAS,CAAI,IAAI,KAAK,SAAS,EAAE,EAIpC,gBAAO,IAAI,SAAS,GAAK,YAAiC,CAA1D,SAA0D,CAA1D,MAA0D,yDAFzE,4BACa,SAAS,CAAT,SAAS,CACP,gBAA0D,UAEtE,QAAQ,CACN,CAAC,mEALN,GAKM,EAIV,cAAgB,aAAa,CAC7B,GAAI,CAAC,SAAoB,EAArB,OAAqB,4BACX,OACV,GAAI,CAAC,IAAI,GAAK,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EAAC,CACnC,qCAFD,UAAY,EAEX,CAFQ,CAKX,GAAI,EAAE,EAIa,gBAAO,IAAI,SAAS,GAAK,YAAiC,CAA1D,SAA0D,CAA1D,MAA0D,6QAFzE,qBAAC,IAAI,EACQ,SAAS,CAAT,SAAS,CACP,gBAA0D,CAC7D,QAAQ,CAAR,QAAQ,CAOE,kBAAkB,CAAlB,kBAAkB,CAE7B,OAAO,CAAP,OAAO,CAQP,OAAO,CAAP,OAAO,CACH,WAAW,CAAX,WAAW,CACb,SAAS,CAAT,SAAS,CACL,aAAa,CAAb,aAAa,CACf,WAAW,CAAX,WAAW,CACZ,UAAU,CAAV,UAAU,CACb,OAAO,CAAP,OAAO,CACZ,EAAE,CAAF,EAAE,UAEL,QAAQ,CACL,CAAC,wPA9BP,GA8BO,EAOM,gBAAO,IAAI,SAAS,GAAK,YAAiC,CAA1D,SAA0D,CAA1D,MAA0D,qMAFzE,4BACa,SAAS,CAAT,SAAS,CACP,gBAA0D,CAC9D,OAAO,CAAP,OAAO,CACL,SAAS,CAAT,SAAS,CACX,OAAO,CAAP,OAAO,CACH,WAAW,CAAX,WAAW,CACb,SAAS,CAAT,SAAS,CACL,aAAa,CAAb,aAAa,CACf,WAAW,CAAX,WAAW,CACnB,IAAQ,CAAR,QAAQ,CACH,QAAC,CAAD,CAAC,UAEV,QAAQ,CACN,CAAC,4LAdN,GAcM,EAET,CAED,KAAM,OAEL,CAAG,oDAAC,mBAAkB,2DACrB,eAAiB,QAAQ,CAAC,QAAQ,CAAE,YAAY,CAAE,KAAK,CAAC,CAAC,wCAGlD,qBAAC,UAAU,KAAK,IAAI,CAAS,KAAQ,CAAR,QAAQ,CAAG,CAAC,sDAAzC,GAAyC,EACjD,CAED,cAAe,OAAM","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as _c}from"react/compiler-runtime";import{useTheme}from"@dr.pogodin/react-themes";const defaultTheme={"context":"
|
|
1
|
+
import{c as _c}from"react/compiler-runtime";import{useTheme}from"@dr.pogodin/react-themes";const defaultTheme={"context":"okvOYY","ad":"APtgyD","hoc":"_6pnR6p","checkbox":"RFCPuo","indeterminate":"_3kU4nG","container":"J5YXRW","label":"tpW2to","error":"Nv+0yO","errorMessage":"_7DpvR5","disabled":"_8RLiJ3"};import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const Checkbox=t0=>{const $=_c(17);const{checked,disabled,error,label,onChange,testId,theme}=t0;const composed=useTheme("Checkbox",defaultTheme,theme);let containerClassName=composed.container;if(disabled){containerClassName=containerClassName+` ${composed.disabled}`;}let checkboxClassName=composed.checkbox;if(checked==="indeterminate"){checkboxClassName=checkboxClassName+` ${composed.indeterminate}`;}if(error){containerClassName=containerClassName+` ${composed.error}`;}let t1;if($[0]!==composed.label||$[1]!==label){t1=label===undefined?null:/*#__PURE__*/_jsx("div",{className:composed.label,children:label});$[0]=composed.label;$[1]=label;$[2]=t1;}else{t1=$[2];}const t2=checked===undefined?undefined:checked===true;const t3=process.env.NODE_ENV==="production"?undefined:testId;let t4;if($[3]!==checkboxClassName||$[4]!==disabled||$[5]!==onChange||$[6]!==t2||$[7]!==t3){t4=/*#__PURE__*/_jsx("input",{checked:t2,className:checkboxClassName,"data-testid":t3,disabled:disabled,onChange:onChange,onClick:_temp,type:"checkbox"});$[3]=checkboxClassName;$[4]=disabled;$[5]=onChange;$[6]=t2;$[7]=t3;$[8]=t4;}else{t4=$[8];}let t5;if($[9]!==composed.errorMessage||$[10]!==error){t5=error&&error!==true?/*#__PURE__*/_jsx("div",{className:composed.errorMessage,children:error}):null;$[9]=composed.errorMessage;$[10]=error;$[11]=t5;}else{t5=$[11];}let t6;if($[12]!==containerClassName||$[13]!==t1||$[14]!==t4||$[15]!==t5){t6=/*#__PURE__*/_jsxs("div",{className:containerClassName,children:[t1,t4,t5]});$[12]=containerClassName;$[13]=t1;$[14]=t4;$[15]=t5;$[16]=t6;}else{t6=$[16];}return t6;};export default Checkbox;function _temp(e){e.stopPropagation();}
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/shared/components/Checkbox/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { type Theme, useTheme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\ntype PropT<ValueT> = {\n checked?: ValueT;\n disabled?: boolean;\n error?: ReactNode;\n label?: React.ReactNode;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n testId?: string;\n theme?: Theme<\n | 'checkbox'\n | 'container'\n | 'disabled'\n | 'error'\n | 'errorMessage'\n | 'indeterminate'\n | 'label'\n >;\n};\n\nconst Checkbox = <ValueT extends 'indeterminate' | boolean = boolean>({\n checked,\n disabled,\n error,\n label,\n onChange,\n testId,\n theme,\n}: PropT<ValueT>): ReactNode => {\n const composed = useTheme('Checkbox', defaultTheme, theme);\n\n let containerClassName = composed.container;\n if (disabled) containerClassName += ` ${composed.disabled}`;\n\n let checkboxClassName = composed.checkbox;\n if (checked === 'indeterminate') checkboxClassName += ` ${composed.indeterminate}`;\n\n if (error) containerClassName += ` ${composed.error}`;\n\n return (\n <div className={containerClassName}>\n { label === undefined\n ? null : <div className={composed.label}>{label}</div> }\n <input\n checked={checked === undefined ? undefined : checked === true}\n className={checkboxClassName}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n disabled={disabled}\n onChange={onChange}\n onClick={(e) => {\n e.stopPropagation();\n }}\n type=\"checkbox\"\n />\n {error && error !== true\n ? <div className={composed.errorMessage}>{error}</div>\n : null}\n </div>\n );\n};\n\nexport default Checkbox;\n"],"mappings":"4CAEA,OAAqB,QAAQ,KAAQ,0BAA0B,CAE/D,
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/shared/components/Checkbox/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { type Theme, useTheme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\ntype PropT<ValueT> = {\n checked?: ValueT;\n disabled?: boolean;\n error?: ReactNode;\n label?: React.ReactNode;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n testId?: string;\n theme?: Theme<\n | 'checkbox'\n | 'container'\n | 'disabled'\n | 'error'\n | 'errorMessage'\n | 'indeterminate'\n | 'label'\n >;\n};\n\nconst Checkbox = <ValueT extends 'indeterminate' | boolean = boolean>({\n checked,\n disabled,\n error,\n label,\n onChange,\n testId,\n theme,\n}: PropT<ValueT>): ReactNode => {\n const composed = useTheme('Checkbox', defaultTheme, theme);\n\n let containerClassName = composed.container;\n if (disabled) containerClassName += ` ${composed.disabled}`;\n\n let checkboxClassName = composed.checkbox;\n if (checked === 'indeterminate') checkboxClassName += ` ${composed.indeterminate}`;\n\n if (error) containerClassName += ` ${composed.error}`;\n\n return (\n <div className={containerClassName}>\n { label === undefined\n ? null : <div className={composed.label}>{label}</div> }\n <input\n checked={checked === undefined ? undefined : checked === true}\n className={checkboxClassName}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n disabled={disabled}\n onChange={onChange}\n onClick={(e) => {\n e.stopPropagation();\n }}\n type=\"checkbox\"\n />\n {error && error !== true\n ? <div className={composed.errorMessage}>{error}</div>\n : null}\n </div>\n );\n};\n\nexport default Checkbox;\n"],"mappings":"4CAEA,OAAqB,QAAQ,KAAQ,0BAA0B,CAE/D,yNAAwC,yDAoBxC,KAAM,SAAQ,CAAG,oBAAqD,4DAQtD,CACd,eAAiB,QAAQ,CAAC,UAAU,CAAE,YAAY,CAAE,KAAK,CAAC,CAE1D,uBAAyB,QAAQ,UAAU,CAC3C,GAAI,QAAQ,EAAE,qCAAkB,CAAI,IAAI,QAAQ,SAAS,EAAE,EAE3D,sBAAwB,QAAQ,SAAS,CACzC,GAAI,OAAO,GAAK,eAAe,EAAE,mCAAiB,CAAI,IAAI,QAAQ,cAAc,EAAE,EAElF,GAAI,KAAK,EAAE,qCAAkB,CAAI,IAAI,QAAQ,MAAM,EAAE,EAAC,+CAIhD,QAAK,GAAK,SAC4C,CADtD,IACsD,cADtD,YACyB,SAAc,CAAd,QAAQ,MAAM,UAAG,KAAK,CAAM,CAAC,uDAE7C,gBAAO,GAAK,SAAwC,CAApD,SAAoD,CAAhB,OAAO,GAAK,IAAI,CAEhD,gBAAO,IAAI,SAAS,GAAK,YAAiC,CAA1D,SAA0D,CAA1D,MAA0D,6FAHzE,8BACW,OAAoD,CAApD,EAAoD,CAClD,SAAiB,CAAjB,iBAAiB,CACf,gBAA0D,CAC7D,QAAQ,CAAR,QAAQ,CACR,QAAQ,CAAR,QAAQ,CACT,OAER,CAFQ,KAER,CACI,IAAU,CAAV,UAAU,CAChB,CAAC,kJACD,QAAuB,EAAd,KAAK,GAAK,IAEZ,cAFP,YACmB,SAAqB,CAArB,QAAQ,aAAa,UAAG,KAAK,CAC1C,CAAC,CAFP,IAEO,2IAhBV,6BAAgB,SAAkB,CAAlB,kBAAkB,WAC9B,EACsD,CACxD,EAUE,CACD,EAEO,EACL,CAAC,oFAjBN,GAiBM,EAET,CAED,cAAe,SAAQ,CAzCN,kBA8BP,CAAC,gBAAgB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as _c}from"react/compiler-runtime";const S={"link":"
|
|
1
|
+
import{c as _c}from"react/compiler-runtime";const S={"link":"Mlw9i+"};import{jsx as _jsx}from"react/jsx-runtime";/**
|
|
2
2
|
* The `<Link>` component, and almost identical `<NavLink>` component, are
|
|
3
3
|
* auxiliary wrappers around
|
|
4
4
|
* [React Router](https://github.com/ReactTraining/react-router)'s
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as _c}from"react/compiler-runtime";import{useRef,useState}from"react";import{useTheme}from"@dr.pogodin/react-themes";const defaultTheme={"context":"
|
|
1
|
+
import{c as _c}from"react/compiler-runtime";import{useRef,useState}from"react";import{useTheme}from"@dr.pogodin/react-themes";const defaultTheme={"context":"_3TUnRu","ad":"WWPoqf","hoc":"+T58d7","container":"LYiMyw","children":"sJK+G8","input":"hwx8yl","label":"oqWTQf","error":"IPcjg0","errorMessage":"tOE+y7"};import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";/**
|
|
2
2
|
* Themeable input field, based on the standard HTML `<input>` element.
|
|
3
3
|
* @param [props.label] Input label.
|
|
4
4
|
* @param [props.theme] _Ad hoc_ theme.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as _c}from"react/compiler-runtime";import{useEffect,useMemo,useRef}from"react";import{createPortal}from"react-dom";import{useTheme}from"@dr.pogodin/react-themes";const defaultTheme={"context":"
|
|
1
|
+
import{c as _c}from"react/compiler-runtime";import{useEffect,useMemo,useRef}from"react";import{createPortal}from"react-dom";import{useTheme}from"@dr.pogodin/react-themes";const defaultTheme={"context":"_7DYqJs","ad":"TrAaU6","hoc":"rxhC8K","overlay":"Xvfqgz","container":"wD2kWo"};const S={"scrollingDisabledByModal":"ajmoxX"};import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";/**
|
|
2
2
|
* The `<Modal>` component implements a simple themeable modal window, wrapped
|
|
3
3
|
* into the default theme. `<BaseModal>` exposes the base non-themed component.
|
|
4
4
|
* **Children:** Component children are rendered as the modal content.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/shared/components/Modal/index.tsx"],"sourcesContent":["import {\n type CSSProperties,\n type FunctionComponent,\n type ReactNode,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport { type Theme, useTheme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './base-theme.scss';\nimport S from './styles.scss';\n\ntype ThemeT = Theme<'container' | 'overlay'>;\n\ntype PropsT = {\n cancelOnScrolling?: boolean;\n children?: ReactNode;\n dontDisableScrolling?: boolean;\n onCancel?: () => void;\n overlayStyle?: CSSProperties;\n style?: CSSProperties;\n testId?: string;\n testIdForOverlay?: string;\n theme: ThemeT;\n\n /** @deprecated */\n containerStyle?: CSSProperties;\n};\n\n/**\n * The `<Modal>` component implements a simple themeable modal window, wrapped\n * into the default theme. `<BaseModal>` exposes the base non-themed component.\n * **Children:** Component children are rendered as the modal content.\n * @param {object} props Component properties. Beside props documented below,\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties) are supported as well.\n * @param {function} [props.onCancel] The callback to trigger when user\n * clicks outside the modal, or presses Escape. It is expected to hide the\n * modal.\n * @param {ModalTheme} [props.theme] _Ad hoc_ theme.\n */\nconst BaseModal: FunctionComponent<PropsT> = ({\n cancelOnScrolling,\n children,\n containerStyle,\n dontDisableScrolling,\n onCancel,\n overlayStyle,\n style,\n testId,\n testIdForOverlay,\n theme,\n}) => {\n const containerRef = useRef<HTMLDivElement | null>(null);\n const overlayRef = useRef<HTMLDivElement | null>(null);\n\n // Sets up modal cancellation of scrolling, if opted-in.\n useEffect(() => {\n if (cancelOnScrolling && onCancel) {\n window.addEventListener('scroll', onCancel);\n window.addEventListener('wheel', onCancel);\n }\n return () => {\n if (cancelOnScrolling && onCancel) {\n window.removeEventListener('scroll', onCancel);\n window.removeEventListener('wheel', onCancel);\n }\n };\n }, [cancelOnScrolling, onCancel]);\n\n // Disables window scrolling, if it is not opted-out.\n useEffect(() => {\n if (!dontDisableScrolling) {\n document.body.classList.add(S.scrollingDisabledByModal);\n }\n return () => {\n if (!dontDisableScrolling) {\n document.body.classList.remove(S.scrollingDisabledByModal);\n }\n };\n }, [dontDisableScrolling]);\n\n const focusLast = useMemo(() => (\n <div\n onFocus={() => {\n const elems = containerRef.current!.querySelectorAll('*');\n for (let i = elems.length - 1; i >= 0; --i) {\n (elems[i] as HTMLElement).focus();\n if (document.activeElement === elems[i]) return;\n }\n overlayRef.current?.focus();\n }}\n // TODO: Have a look at this later.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n />\n ), []);\n\n return createPortal(\n (\n <div>\n {focusLast}\n <div\n aria-label=\"Cancel\"\n className={theme.overlay}\n data-testid={\n process.env.NODE_ENV === 'production'\n ? undefined : testIdForOverlay\n }\n onClick={(e) => {\n if (onCancel) {\n onCancel();\n e.stopPropagation();\n }\n }}\n onKeyDown={(e) => {\n if (e.key === 'Escape' && onCancel) {\n onCancel();\n e.stopPropagation();\n }\n }}\n ref={(node) => {\n if (node && node !== overlayRef.current) {\n overlayRef.current = node;\n node.focus();\n }\n }}\n role=\"button\"\n style={overlayStyle}\n tabIndex={0}\n />\n {\n // NOTE: These rules are disabled because our intention is to keep\n // the element non-interactive (thus not on the keyboard focus chain),\n // and it has `onClick` handler merely to stop propagation of click\n // events to its parent container. This is needed because, for example\n // when the modal is wrapped into an interactive element we don't want\n // any clicks inside the modal to bubble-up to that parent element\n // (because visually and logically the modal dialog does not belong\n // to its parent container, where it technically belongs from\n // the HTML mark-up perpective).\n }\n <div // eslint-disable-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions\n aria-modal=\"true\"\n className={theme.container}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n onClick={(e) => {\n e.stopPropagation();\n }}\n onWheel={(event) => {\n event.stopPropagation();\n }}\n ref={containerRef}\n role=\"dialog\"\n style={style ?? containerStyle}\n >\n {children}\n </div>\n <div\n onFocus={() => {\n overlayRef.current?.focus();\n }}\n // TODO: Have a look at this later.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n />\n {focusLast}\n </div>\n ),\n document.body,\n );\n};\n\n/* Non-themed version of the Modal. */\nexport { BaseModal };\n\nconst Modal: FunctionComponent<\n Omit<PropsT, 'theme'> & { theme?: ThemeT }\n> = ({ theme, ...rest }) => {\n const composed = useTheme('Modal', defaultTheme, theme);\n\n // eslint-disable-next-line react/jsx-props-no-spreading\n return <BaseModal {...rest} theme={composed} />;\n};\n\nexport default Modal;\n"],"mappings":"4CAAA,OAIE,SAAS,CACT,OAAO,CACP,MAAM,KACD,OAAO,CAEd,OAAS,YAAY,KAAQ,WAAW,CAExC,OAAqB,QAAQ,KAAQ,0BAA0B,CAE/D,
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/shared/components/Modal/index.tsx"],"sourcesContent":["import {\n type CSSProperties,\n type FunctionComponent,\n type ReactNode,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport { type Theme, useTheme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './base-theme.scss';\nimport S from './styles.scss';\n\ntype ThemeT = Theme<'container' | 'overlay'>;\n\ntype PropsT = {\n cancelOnScrolling?: boolean;\n children?: ReactNode;\n dontDisableScrolling?: boolean;\n onCancel?: () => void;\n overlayStyle?: CSSProperties;\n style?: CSSProperties;\n testId?: string;\n testIdForOverlay?: string;\n theme: ThemeT;\n\n /** @deprecated */\n containerStyle?: CSSProperties;\n};\n\n/**\n * The `<Modal>` component implements a simple themeable modal window, wrapped\n * into the default theme. `<BaseModal>` exposes the base non-themed component.\n * **Children:** Component children are rendered as the modal content.\n * @param {object} props Component properties. Beside props documented below,\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties) are supported as well.\n * @param {function} [props.onCancel] The callback to trigger when user\n * clicks outside the modal, or presses Escape. It is expected to hide the\n * modal.\n * @param {ModalTheme} [props.theme] _Ad hoc_ theme.\n */\nconst BaseModal: FunctionComponent<PropsT> = ({\n cancelOnScrolling,\n children,\n containerStyle,\n dontDisableScrolling,\n onCancel,\n overlayStyle,\n style,\n testId,\n testIdForOverlay,\n theme,\n}) => {\n const containerRef = useRef<HTMLDivElement | null>(null);\n const overlayRef = useRef<HTMLDivElement | null>(null);\n\n // Sets up modal cancellation of scrolling, if opted-in.\n useEffect(() => {\n if (cancelOnScrolling && onCancel) {\n window.addEventListener('scroll', onCancel);\n window.addEventListener('wheel', onCancel);\n }\n return () => {\n if (cancelOnScrolling && onCancel) {\n window.removeEventListener('scroll', onCancel);\n window.removeEventListener('wheel', onCancel);\n }\n };\n }, [cancelOnScrolling, onCancel]);\n\n // Disables window scrolling, if it is not opted-out.\n useEffect(() => {\n if (!dontDisableScrolling) {\n document.body.classList.add(S.scrollingDisabledByModal);\n }\n return () => {\n if (!dontDisableScrolling) {\n document.body.classList.remove(S.scrollingDisabledByModal);\n }\n };\n }, [dontDisableScrolling]);\n\n const focusLast = useMemo(() => (\n <div\n onFocus={() => {\n const elems = containerRef.current!.querySelectorAll('*');\n for (let i = elems.length - 1; i >= 0; --i) {\n (elems[i] as HTMLElement).focus();\n if (document.activeElement === elems[i]) return;\n }\n overlayRef.current?.focus();\n }}\n // TODO: Have a look at this later.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n />\n ), []);\n\n return createPortal(\n (\n <div>\n {focusLast}\n <div\n aria-label=\"Cancel\"\n className={theme.overlay}\n data-testid={\n process.env.NODE_ENV === 'production'\n ? undefined : testIdForOverlay\n }\n onClick={(e) => {\n if (onCancel) {\n onCancel();\n e.stopPropagation();\n }\n }}\n onKeyDown={(e) => {\n if (e.key === 'Escape' && onCancel) {\n onCancel();\n e.stopPropagation();\n }\n }}\n ref={(node) => {\n if (node && node !== overlayRef.current) {\n overlayRef.current = node;\n node.focus();\n }\n }}\n role=\"button\"\n style={overlayStyle}\n tabIndex={0}\n />\n {\n // NOTE: These rules are disabled because our intention is to keep\n // the element non-interactive (thus not on the keyboard focus chain),\n // and it has `onClick` handler merely to stop propagation of click\n // events to its parent container. This is needed because, for example\n // when the modal is wrapped into an interactive element we don't want\n // any clicks inside the modal to bubble-up to that parent element\n // (because visually and logically the modal dialog does not belong\n // to its parent container, where it technically belongs from\n // the HTML mark-up perpective).\n }\n <div // eslint-disable-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions\n aria-modal=\"true\"\n className={theme.container}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n onClick={(e) => {\n e.stopPropagation();\n }}\n onWheel={(event) => {\n event.stopPropagation();\n }}\n ref={containerRef}\n role=\"dialog\"\n style={style ?? containerStyle}\n >\n {children}\n </div>\n <div\n onFocus={() => {\n overlayRef.current?.focus();\n }}\n // TODO: Have a look at this later.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n />\n {focusLast}\n </div>\n ),\n document.body,\n );\n};\n\n/* Non-themed version of the Modal. */\nexport { BaseModal };\n\nconst Modal: FunctionComponent<\n Omit<PropsT, 'theme'> & { theme?: ThemeT }\n> = ({ theme, ...rest }) => {\n const composed = useTheme('Modal', defaultTheme, theme);\n\n // eslint-disable-next-line react/jsx-props-no-spreading\n return <BaseModal {...rest} theme={composed} />;\n};\n\nexport default Modal;\n"],"mappings":"4CAAA,OAIE,SAAS,CACT,OAAO,CACP,MAAM,KACD,OAAO,CAEd,OAAS,YAAY,KAAQ,WAAW,CAExC,OAAqB,QAAQ,KAAQ,0BAA0B,CAE/D,4JAC8B,yDAmB9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,KAAM,UAAoC,CAAG,oBAAC,kIAW7C,CACC,mBAAqB,MAAM,CAAwB,IAAI,CAAC,CACxD,iBAAmB,MAAM,CAAwB,IAAI,CAAC,CAAC,4DAG7C,QACR,GAAI,iBAA6B,EAA7B,QAA6B,EAC/B,MAAM,iBAAiB,CAAC,QAAQ,CAAE,QAAQ,CAAC,CAC3C,MAAM,iBAAiB,CAAC,OAAO,CAAE,QAAQ,CAAC,EAC3C,MACM,KACL,GAAI,iBAA6B,EAA7B,QAA6B,EAC/B,MAAM,oBAAoB,CAAC,QAAQ,CAAE,QAAQ,CAAC,CAC9C,MAAM,oBAAoB,CAAC,OAAO,CAAE,QAAQ,CAAC,EAC9C,CACF,EACF,CAAE,IAAC,iBAAiB,CAAE,QAAQ,CAAC,6EAXhC,SAAS,CAAC,EAWT,CAAE,EAA6B,CAAC,+CAGvB,QACR,GAAI,CAAC,oBAAoB,EACvB,QAAQ,KAAK,UAAU,IAAI,CAAC,CAAC,yBAAyB,CAAC,EACxD,MACM,KACL,GAAI,CAAC,oBAAoB,EACvB,QAAQ,KAAK,UAAU,OAAO,CAAC,CAAC,yBAAyB,CAAC,EAC3D,CACF,EACF,CAAE,IAAC,oBAAoB,CAAC,kEATzB,SAAS,CAAC,EAST,CAAE,EAAsB,CAAC,2DAGxB,4BACW,OAOR,CAPQ,KACP,YAAc,YAAY,QAAQ,iBAAkB,CAAC,GAAG,CAAC,CACzD,UAAa,KAAK,OAAO,CAAG,CAAC,CAAE,CAAC,EAAI,CAGnC,CAHsC,EAAE,CAAC,EACvC,KAAK,CAAC,CAAC,CAAC,MAAsB,CAAC,CAAC,CACjC,GAAI,QAAQ,cAAc,GAAK,KAAK,CAAC,CAAC,CAAC,UAAS,CAElD,UAAU,QAAe,OAAE,CAAD,CAAC,EAC5B,CAGS,QAAC,CAAD,CAAC,CACZ,CAAC,wBAbJ,gBACE,EAYE,CAWM,gBAAO,IAAI,SAAS,GAAK,YACO,CADhC,SACgC,CADhC,gBACgC,mCAEzB,OACP,GAAI,QAAQ,EACV,QAAQ,CAAC,CAAC,CACV,CAAC,gBAAgB,CAAC,CAAC,EACpB,CACF,CACU,SACT,GAAI,GAAC,IAAI,GAAK,QAAoB,EAA9B,QAA8B,EAChC,QAAQ,CAAC,CAAC,CACV,GAAC,gBAAgB,CAAC,CAAC,EACpB,CACF,mHACI,UACH,GAAI,IAAmC,EAA3B,IAAI,GAAK,UAAU,QAAQ,EACrC,UAAU,SAAW,IAAH,CAClB,IAAI,MAAM,CAAC,CAAC,EACb,CACF,sHAxBH,6BACa,qBAAQ,CACR,SAAa,CAAb,KAAK,QAAQ,CAEtB,gBACgC,CAEzB,OAKR,CALQ,EAKR,CACU,SAKV,CALU,EAKV,CACI,GAKJ,CALI,EAKJ,CACI,IAAQ,CAAR,QAAQ,CACN,KAAY,CAAZ,YAAY,CACT,QAAC,CAAD,CAAC,CACZ,CAAC,8FAea,iBAAO,IAAI,SAAS,GAAK,YAAiC,CAA1D,SAA0D,CAA1D,MAA0D,CAShE,eAAuB,EAAvB,cAAuB,iFAZhC,6BACa,mBAAM,CACN,SAAe,CAAf,KAAK,UAAU,CACb,iBAA0D,CAC9D,OAER,CAFQ,KAER,CACQ,OAER,CAFQ,MAER,CACI,GAAY,CAAZ,YAAY,CACZ,IAAQ,CAAR,QAAQ,CACN,KAAuB,CAAvB,GAAuB,UAE7B,QAAQ,CACN,CAAC,iJACN,6BACW,OAER,CAFQ,KACP,UAAU,QAAe,OAAE,CAAD,CAAC,EAC5B,CAGS,QAAC,CAAD,CAAC,CACZ,CAAC,iEAnED,6BAAY,cAEf,uBACG,SAAS,CACV,GA4BE,CAYF,GAeM,CACN,GAOE,CACD,SAAS,EACP,CAAC,CAER,QAAQ,KACV,CAAC,sDAxEM,IAwEN,EACF,CAED,sCACA,OAAS,SAAS,EAElB,KAAM,MAEL,CAAG,oDAAC,mBAAkB,2DACrB,eAAiB,QAAQ,CAAC,OAAO,CAAE,YAAY,CAAE,KAAK,CAAC,CAAC,wCAGjD,qBAAC,SAAS,KAAK,IAAI,CAAS,KAAQ,CAAR,QAAQ,CAAG,CAAC,sDAAxC,GAAwC,EAChD,CAED,cAAe,MAAK,CAhJyB,oBA0GjC,GAAC,gBAAgB,CAAC,CAAC,EA1Gc,uBA6GjC,KAAK,gBAAgB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as _c}from"react/compiler-runtime";import{useTheme}from"@dr.pogodin/react-themes";const baseTheme={"context":"
|
|
1
|
+
import{c as _c}from"react/compiler-runtime";import{useTheme}from"@dr.pogodin/react-themes";const baseTheme={"context":"/R5ELe","ad":"GO16nX","hoc":"KfA2gp","container":"Qecuf6","mainPanel":"zyNUPV","sidePanel":"b0V5dT"};import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";/**
|
|
2
2
|
* Simple and themeable page layout. It keeps the main content centered in
|
|
3
3
|
* a column of limited width, which fills entire viewport on small screens
|
|
4
4
|
* (under `$screen-md = 1024px` size). At larger screens the column keeps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/shared/components/PageLayout/index.tsx"],"sourcesContent":["import type { FunctionComponent, ReactNode } from 'react';\n\nimport { type Theme, useTheme } from '@dr.pogodin/react-themes';\n\nimport baseTheme from './base-theme.scss';\n\ntype ThemeKeyT = 'container' | 'leftSidePanel' | 'mainPanel' | 'rightSidePanel'\n | 'sidePanel';\n\ntype PropsT = {\n children?: ReactNode;\n leftSidePanelContent?: ReactNode;\n rightSidePanelContent?: ReactNode;\n theme?: Theme<ThemeKeyT>;\n};\n\n/**\n * Simple and themeable page layout. It keeps the main content centered in\n * a column of limited width, which fills entire viewport on small screens\n * (under `$screen-md = 1024px` size). At larger screens the column keeps\n * `$screen-md` size, and it is centered at the page, surrounded by side\n * panels, where additional content can be displayed.\n *\n * **Children:** Component children are rendered as the content of main panel.\n * @param {object} [props] Component properties.\n * @param {Node} [props.leftSidePanelContent] The content for left side panel.\n * @param {Node} [props.rightSidePanelContent] The content for right side panel.\n * @param {PageLayoutTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nconst PageLayout: FunctionComponent<PropsT> = ({\n children,\n leftSidePanelContent,\n rightSidePanelContent,\n theme,\n}) => {\n const composed = useTheme('PageLayout', baseTheme, theme);\n return (\n <div className={composed.container}>\n <div className={[composed.sidePanel, composed.leftSidePanel].join(' ')}>\n {leftSidePanelContent}\n </div>\n <div className={composed.mainPanel}>\n {children}\n </div>\n <div className={[composed.sidePanel, composed.rightSidePanel].join(' ')}>\n {rightSidePanelContent}\n </div>\n </div>\n );\n};\n\nexport default PageLayout;\n"],"mappings":"4CAEA,OAAqB,QAAQ,KAAQ,0BAA0B,CAE/D,
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/shared/components/PageLayout/index.tsx"],"sourcesContent":["import type { FunctionComponent, ReactNode } from 'react';\n\nimport { type Theme, useTheme } from '@dr.pogodin/react-themes';\n\nimport baseTheme from './base-theme.scss';\n\ntype ThemeKeyT = 'container' | 'leftSidePanel' | 'mainPanel' | 'rightSidePanel'\n | 'sidePanel';\n\ntype PropsT = {\n children?: ReactNode;\n leftSidePanelContent?: ReactNode;\n rightSidePanelContent?: ReactNode;\n theme?: Theme<ThemeKeyT>;\n};\n\n/**\n * Simple and themeable page layout. It keeps the main content centered in\n * a column of limited width, which fills entire viewport on small screens\n * (under `$screen-md = 1024px` size). At larger screens the column keeps\n * `$screen-md` size, and it is centered at the page, surrounded by side\n * panels, where additional content can be displayed.\n *\n * **Children:** Component children are rendered as the content of main panel.\n * @param {object} [props] Component properties.\n * @param {Node} [props.leftSidePanelContent] The content for left side panel.\n * @param {Node} [props.rightSidePanelContent] The content for right side panel.\n * @param {PageLayoutTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nconst PageLayout: FunctionComponent<PropsT> = ({\n children,\n leftSidePanelContent,\n rightSidePanelContent,\n theme,\n}) => {\n const composed = useTheme('PageLayout', baseTheme, theme);\n return (\n <div className={composed.container}>\n <div className={[composed.sidePanel, composed.leftSidePanel].join(' ')}>\n {leftSidePanelContent}\n </div>\n <div className={composed.mainPanel}>\n {children}\n </div>\n <div className={[composed.sidePanel, composed.rightSidePanel].join(' ')}>\n {rightSidePanelContent}\n </div>\n </div>\n );\n};\n\nexport default PageLayout;\n"],"mappings":"4CAEA,OAAqB,QAAQ,KAAQ,0BAA0B,CAE/D,iIAA0C,yDAY1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,KAAM,WAAqC,CAAG,oBAAC,mEAK9C,CACC,eAAiB,QAAQ,CAAC,YAAY,CAAE,SAAS,CAAE,KAAK,CAAC,CAEvC,iBAAQ,UAAU,qEAChB,IAAC,QAAQ,UAAU,CAAE,QAAQ,cAAc,CAAC,4EAA5C,WAA4C,KAAK,CAAC,GAAG,CAAC,mDAAtE,4BAAgB,SAAsD,CAAtD,EAAsD,UACnE,oBAAoB,CAClB,CAAC,gHACN,4BAAgB,SAAkB,CAAlB,QAAQ,UAAU,UAC/B,QAAQ,CACN,CAAC,oIACU,IAAC,QAAQ,UAAU,CAAE,QAAQ,eAAe,CAAC,gFAA7C,WAA6C,KAAK,CAAC,GAAG,CAAC,sDAAvE,4BAAgB,SAAuD,CAAvD,EAAuD,UACpE,qBAAqB,CACnB,CAAC,yIATR,6BAAgB,SAAkB,CAAlB,EAAkB,WAChC,EAEM,CACN,EAEM,CACN,EAEM,EACH,CAAC,oFAVN,GAUM,EAET,CAED,cAAe,WAAU","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as _c}from"react/compiler-runtime";import{useEffect,useLayoutEffect,useRef,useState}from"react";import{useTheme}from"@dr.pogodin/react-themes";const defaultTheme={"context":"
|
|
1
|
+
import{c as _c}from"react/compiler-runtime";import{useEffect,useLayoutEffect,useRef,useState}from"react";import{useTheme}from"@dr.pogodin/react-themes";const defaultTheme={"context":"GNvrNz","ad":"_7Nv/vc","hoc":"s7CQim","container":"U6O38x","label":"_6kWvvS","textarea":"bdhfZS","error":"UfN7sx","errorMessage":"ElKWNP","hidden":"oSQGp1"};import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const TextArea=t0=>{const $=_c(39);const{disabled,error,label,onBlur,onChange,onKeyDown,placeholder,ref,testId,theme,value}=t0;const custom=useTheme("TextArea",defaultTheme,theme);const hiddenAreaRef=useRef(null);const[height,setHeight]=useState();const textAreaRef=useRef(null);const[localValue,setLocalValue]=useState(value??"");if(value!==undefined&&localValue!==value){setLocalValue(value);}let t1;let t2;if($[0]===Symbol.for("react.memo_cache_sentinel")){t1=()=>{const el=hiddenAreaRef.current;if(!el){return;}const cb=()=>{setHeight(el.scrollHeight);};const observer=new ResizeObserver(cb);observer.observe(el);return()=>{observer.disconnect();};};t2=[];$[0]=t1;$[1]=t2;}else{t1=$[0];t2=$[1];}useEffect(t1,t2);let t3;if($[2]===Symbol.for("react.memo_cache_sentinel")){t3=()=>{const el_0=hiddenAreaRef.current;if(el_0){setHeight(el_0.scrollHeight);}};$[2]=t3;}else{t3=$[2];}let t4;if($[3]!==localValue){t4=[localValue];$[3]=localValue;$[4]=t4;}else{t4=$[4];}useLayoutEffect(t3,t4);let containerClassName=custom.container;if(error){containerClassName=containerClassName+` ${custom.error}`;}let t5;if($[5]===Symbol.for("react.memo_cache_sentinel")){t5=()=>{textAreaRef.current?.focus();};$[5]=t5;}else{t5=$[5];}let t6;if($[6]!==custom.label||$[7]!==label){t6=label===undefined?null:/*#__PURE__*/_jsx("div",{className:custom.label,children:label});$[6]=custom.label;$[7]=label;$[8]=t6;}else{t6=$[8];}const t7=`${custom.textarea} ${custom.hidden}`;const t8=localValue||" ";let t9;if($[9]!==t7||$[10]!==t8){t9=/*#__PURE__*/_jsx("textarea",{className:t7,readOnly:true,ref:hiddenAreaRef,tabIndex:-1,value:t8});$[9]=t7;$[10]=t8;$[11]=t9;}else{t9=$[11];}const t10=process.env.NODE_ENV==="production"?undefined:testId;let t11;if($[12]!==onChange||$[13]!==value){t11=value===undefined?e=>{setLocalValue(e.target.value);}:onChange;$[12]=onChange;$[13]=value;$[14]=t11;}else{t11=$[14];}let t12;if($[15]!==ref){t12=node=>{textAreaRef.current=node;if(typeof ref==="function"){ref(node);}else{if(ref){ref.current=node;}}};$[15]=ref;$[16]=t12;}else{t12=$[16];}let t13;if($[17]!==height){t13={height};$[17]=height;$[18]=t13;}else{t13=$[18];}let t14;if($[19]!==custom.textarea||$[20]!==disabled||$[21]!==localValue||$[22]!==onBlur||$[23]!==onKeyDown||$[24]!==placeholder||$[25]!==t10||$[26]!==t11||$[27]!==t12||$[28]!==t13){t14=/*#__PURE__*/_jsx("textarea",{className:custom.textarea,"data-testid":t10,disabled:disabled,onBlur:onBlur,onChange:t11,onKeyDown:onKeyDown,placeholder:placeholder,ref:t12,style:t13,value:localValue});$[19]=custom.textarea;$[20]=disabled;$[21]=localValue;$[22]=onBlur;$[23]=onKeyDown;$[24]=placeholder;$[25]=t10;$[26]=t11;$[27]=t12;$[28]=t13;$[29]=t14;}else{t14=$[29];}let t15;if($[30]!==custom.errorMessage||$[31]!==error){t15=error&&error!==true?/*#__PURE__*/_jsx("div",{className:custom.errorMessage,children:error}):null;$[30]=custom.errorMessage;$[31]=error;$[32]=t15;}else{t15=$[32];}let t16;if($[33]!==containerClassName||$[34]!==t14||$[35]!==t15||$[36]!==t6||$[37]!==t9){t16=/*#__PURE__*/_jsxs("div",{className:containerClassName,onFocus:t5,children:[t6,t9,t14,t15]});$[33]=containerClassName;$[34]=t14;$[35]=t15;$[36]=t6;$[37]=t9;$[38]=t16;}else{t16=$[38];}return t16;};export default TextArea;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as _c}from"react/compiler-runtime";import{useTheme}from"@dr.pogodin/react-themes";const defaultTheme={"context":"
|
|
1
|
+
import{c as _c}from"react/compiler-runtime";import{useTheme}from"@dr.pogodin/react-themes";const defaultTheme={"context":"O+B0Ur","ad":"IcilmU","hoc":"kKU7gk","bouncing":"xEEILe","container":"L784+0","circle":"Zjzdw8"};import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";/**
|
|
2
2
|
* Throbber is an "action in progress" indicator, which renders
|
|
3
3
|
* three bouncing circles as a simple pending activity indicator,
|
|
4
4
|
* and can be further themed to a certain degree.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/shared/components/Throbber/index.tsx"],"sourcesContent":["import type { FunctionComponent } from 'react';\n\nimport { type PRIORITY, type Theme, useTheme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\ntype ThemeKeyT = 'bouncing' | 'circle' | 'container';\n\ntype PropsT = {\n theme?: Theme<ThemeKeyT>;\n themePriority?: PRIORITY;\n};\n\n/**\n * Throbber is an \"action in progress\" indicator, which renders\n * three bouncing circles as a simple pending activity indicator,\n * and can be further themed to a certain degree.\n * @param {object} [props] Component properties.\n * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nconst Throbber: FunctionComponent<PropsT> = ({ theme, themePriority }) => {\n const custom = useTheme('Throbber', defaultTheme, theme, {\n themePriority,\n });\n\n return (\n <span className={custom.container}>\n <span className={custom.circle} />\n <span className={custom.circle} />\n <span className={custom.circle} />\n </span>\n );\n};\n\nexport default Throbber;\n"],"mappings":"4CAEA,OAAoC,QAAQ,KAAQ,0BAA0B,CAE9E,
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/shared/components/Throbber/index.tsx"],"sourcesContent":["import type { FunctionComponent } from 'react';\n\nimport { type PRIORITY, type Theme, useTheme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\ntype ThemeKeyT = 'bouncing' | 'circle' | 'container';\n\ntype PropsT = {\n theme?: Theme<ThemeKeyT>;\n themePriority?: PRIORITY;\n};\n\n/**\n * Throbber is an \"action in progress\" indicator, which renders\n * three bouncing circles as a simple pending activity indicator,\n * and can be further themed to a certain degree.\n * @param {object} [props] Component properties.\n * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nconst Throbber: FunctionComponent<PropsT> = ({ theme, themePriority }) => {\n const custom = useTheme('Throbber', defaultTheme, theme, {\n themePriority,\n });\n\n return (\n <span className={custom.container}>\n <span className={custom.circle} />\n <span className={custom.circle} />\n <span className={custom.circle} />\n </span>\n );\n};\n\nexport default Throbber;\n"],"mappings":"4CAEA,OAAoC,QAAQ,KAAQ,0BAA0B,CAE9E,gIAAwC,yDASxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,KAAM,SAAmC,CAAG,oBAAC,6BAAwB,iCACV,iBAEzD,CAAC,2CAFD,aAAe,QAAQ,CAAC,UAAU,CAAE,YAAY,CAAE,KAAK,CAAE,EAExD,CAAC,CAAC,8CAIC,6BAAiB,SAAa,CAAb,MAAM,OAAO,CAAG,CAAC,CAClC,6BAAiB,SAAa,CAAb,MAAM,OAAO,CAAG,CAAC,CAClC,6BAAiB,SAAa,CAAb,MAAM,OAAO,CAAG,CAAC,+IAHpC,8BAAiB,SAAgB,CAAhB,MAAM,UAAU,WAC/B,EAAkC,CAClC,EAAkC,CAClC,EAAkC,EAC9B,CAAC,8EAJP,GAIO,EAEV,CAED,cAAe,SAAQ","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* global window */import{useEffect,useRef,useState}from"react";import{useTheme}from"@dr.pogodin/react-themes";import Tooltip,{PLACEMENTS}from"./Tooltip.js";const defaultTheme={"ad":"
|
|
1
|
+
/* global window */import{useEffect,useRef,useState}from"react";import{useTheme}from"@dr.pogodin/react-themes";import Tooltip,{PLACEMENTS}from"./Tooltip.js";const defaultTheme={"ad":"_1iAhX9","hoc":"_60wg3G","context":"DutzAt","appearance":"azZwyN","arrow":"jvjvef","container":"DaypgH","wrapper":"JOGB0J"};import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";/**
|
|
2
2
|
* Implements a simple to use and themeable tooltip component, _e.g._
|
|
3
3
|
* ```js
|
|
4
4
|
* <WithTooltip tip="This is example tooltip.">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as _c}from"react/compiler-runtime";import qs from"qs";import{useTheme}from"@dr.pogodin/react-themes";import Throbber from"../Throbber/index.js";const defaultTheme={"context":"
|
|
1
|
+
import{c as _c}from"react/compiler-runtime";import qs from"qs";import{useTheme}from"@dr.pogodin/react-themes";import Throbber from"../Throbber/index.js";const defaultTheme={"context":"bDYWC3","ad":"TDqUVW","hoc":"_71ekxI","container":"UsZqTs","video":"Q+a3kv"};const throbberTheme={"context":"AM08bl","ad":"RZ3LDO","hoc":"qYhjMB","container":"ZwnPK1"};import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";/**
|
|
2
2
|
* A component for embeding a YouTube video.
|
|
3
3
|
* @param [props] Component properties.
|
|
4
4
|
* @param [props.autoplay] If `true` the video will start to play
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import _pushInstanceProperty from"core-js-pure/stable/instance/push.js";import{c as _c}from"react/compiler-runtime";import{useImperativeHandle,useRef}from"react";import{BaseModal}from"../../../Modal/index.js";import{optionValueName}from"../../common.js";const S={"overlay":"
|
|
1
|
+
import _pushInstanceProperty from"core-js-pure/stable/instance/push.js";import{c as _c}from"react/compiler-runtime";import{useImperativeHandle,useRef}from"react";import{BaseModal}from"../../../Modal/index.js";import{optionValueName}from"../../common.js";const S={"overlay":"rUwEKi"};import{jsx as _jsx}from"react/jsx-runtime";export function areEqual(a,b){return a?.left===b?.left&&a?.top===b?.top&&a?.width===b?.width;}const Options=t0=>{const $=_c(16);const{containerClass,containerStyle,filter,onCancel,onChange,optionClass,options,ref}=t0;const opsRef=useRef(null);let t1;let t2;if($[0]===Symbol.for("react.memo_cache_sentinel")){t1=()=>({measure:()=>{const e=opsRef.current?.parentElement;if(!e){return;}const rect=opsRef.current.getBoundingClientRect();const style=window.getComputedStyle(e);const mBottom=parseFloat(style.marginBottom);const mTop=parseFloat(style.marginTop);rect.height=rect.height+(mBottom+mTop);return rect;}});t2=[];$[0]=t1;$[1]=t2;}else{t1=$[0];t2=$[1];}useImperativeHandle(ref,t1,t2);let optionNodes;if($[2]!==filter||$[3]!==onChange||$[4]!==optionClass||$[5]!==options){optionNodes=[];for(const option of options){if(!filter||filter(option)){const[iValue,iName]=optionValueName(option);_pushInstanceProperty(optionNodes).call(optionNodes,/*#__PURE__*/_jsx("div",{className:optionClass,onClick:e_0=>{onChange(iValue);e_0.stopPropagation();},onKeyDown:e_1=>{if(e_1.key==="Enter"){onChange(iValue);e_1.stopPropagation();}},role:"button",tabIndex:0,children:iName},iValue));}}$[2]=filter;$[3]=onChange;$[4]=optionClass;$[5]=options;$[6]=optionNodes;}else{optionNodes=$[6];}let t3;if($[7]!==containerClass){t3={ad:"",container:containerClass,context:"",hoc:"",overlay:S.overlay};$[7]=containerClass;$[8]=t3;}else{t3=$[8];}let t4;if($[9]!==optionNodes){t4=/*#__PURE__*/_jsx("div",{ref:opsRef,children:optionNodes});$[9]=optionNodes;$[10]=t4;}else{t4=$[10];}let t5;if($[11]!==containerStyle||$[12]!==onCancel||$[13]!==t3||$[14]!==t4){t5=/*#__PURE__*/_jsx(BaseModal,{cancelOnScrolling:true,dontDisableScrolling:true,onCancel:onCancel,style:containerStyle,theme:t3,children:t4});$[11]=containerStyle;$[12]=onCancel;$[13]=t3;$[14]=t4;$[15]=t5;}else{t5=$[15];}return t5;};export default Options;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as _c}from"react/compiler-runtime";import{useEffect,useRef,useState}from"react";import{useTheme}from"@dr.pogodin/react-themes";import{optionValueName}from"../common.js";import Options,{areEqual}from"./Options/index.js";const defaultTheme={"context":"
|
|
1
|
+
import{c as _c}from"react/compiler-runtime";import{useEffect,useRef,useState}from"react";import{useTheme}from"@dr.pogodin/react-themes";import{optionValueName}from"../common.js";import Options,{areEqual}from"./Options/index.js";const defaultTheme={"context":"RP6Vk7","ad":"mxMIAj","hoc":"_9aPOTG","container":"LPV9XL","label":"_9dHzr+","dropdown":"B6NGsW","option":"Tnt/VV","select":"RuGmq+","arrow":"j6nrsb","active":"MbiYuy","upward":"HhaZ2q"};import{Fragment as _Fragment,jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const CustomDropdown=t0=>{const $=_c(31);const{filter,label,onChange,options,theme,value}=t0;const custom=useTheme("CustomDropdown",defaultTheme,theme);const[active,setActive]=useState(false);const dropdownRef=useRef(null);const opsRef=useRef(null);const[opsPos,setOpsPos]=useState();const[upward,setUpward]=useState(false);let t1;let t2;if($[0]!==active){t1=()=>{if(!active){return;}let id;const cb=()=>{const anchor=dropdownRef.current?.getBoundingClientRect();const opsRect=opsRef.current?.measure();if(anchor&&opsRect){const fitsDown=anchor.bottom+opsRect.height<(window.visualViewport?.height??0);const fitsUp=anchor.top-opsRect.height>0;const up=!fitsDown&&fitsUp;setUpward(up);const pos=up?{left:anchor.left,top:anchor.top-opsRect.height-1,width:anchor.width}:{left:anchor.left,top:anchor.bottom,width:anchor.width};setOpsPos(now=>areEqual(now,pos)?now:pos);}id=requestAnimationFrame(cb);};requestAnimationFrame(cb);return()=>{cancelAnimationFrame(id);};};t2=[active];$[0]=active;$[1]=t1;$[2]=t2;}else{t1=$[1];t2=$[2];}useEffect(t1,t2);let t3;if($[3]===Symbol.for("react.memo_cache_sentinel")){t3=e=>{const view=window.visualViewport;const rect=dropdownRef.current.getBoundingClientRect();setActive(true);setOpsPos({left:view?.width??0,top:view?.height??0,width:rect.width});e.stopPropagation();};$[3]=t3;}else{t3=$[3];}const openList=t3;let t4;if($[4]===Symbol.for("react.memo_cache_sentinel")){t4=/*#__PURE__*/_jsx(_Fragment,{children:""});$[4]=t4;}else{t4=$[4];}let selected=t4;if($[5]!==filter||$[6]!==options||$[7]!==value){for(const option of options){if(!filter||filter(option)){const[iValue,iName]=optionValueName(option);if(iValue===value){selected=iName;break;}}}$[5]=filter;$[6]=options;$[7]=value;$[8]=selected;}else{selected=$[8];}let containerClassName=custom.container;if(active){containerClassName=containerClassName+` ${custom.active}`;}let opsContainerClass=custom.select??"";if(upward){containerClassName=containerClassName+` ${custom.upward}`;opsContainerClass=opsContainerClass+` ${custom.upward}`;}let t5;if($[9]!==custom.label||$[10]!==label){t5=label===undefined?null:/*#__PURE__*/_jsx("div",{className:custom.label,children:label});$[9]=custom.label;$[10]=label;$[11]=t5;}else{t5=$[11];}let t6;if($[12]===Symbol.for("react.memo_cache_sentinel")){t6=e_0=>{if(e_0.key==="Enter"){openList(e_0);}};$[12]=t6;}else{t6=$[12];}let t7;if($[13]!==custom.arrow){t7=/*#__PURE__*/_jsx("div",{className:custom.arrow});$[13]=custom.arrow;$[14]=t7;}else{t7=$[14];}let t8;if($[15]!==custom.dropdown||$[16]!==selected||$[17]!==t7){t8=/*#__PURE__*/_jsxs("div",{className:custom.dropdown,onClick:openList,onKeyDown:t6,ref:dropdownRef,role:"listbox",tabIndex:0,children:[selected,t7]});$[15]=custom.dropdown;$[16]=selected;$[17]=t7;$[18]=t8;}else{t8=$[18];}let t9;if($[19]!==active||$[20]!==custom.option||$[21]!==onChange||$[22]!==opsContainerClass||$[23]!==opsPos||$[24]!==options){t9=active?/*#__PURE__*/_jsx(Options,{containerClass:opsContainerClass,containerStyle:opsPos,onCancel:()=>{setActive(false);},onChange:newValue=>{setActive(false);if(onChange){onChange(newValue);}},optionClass:custom.option??"",options:options,ref:opsRef}):null;$[19]=active;$[20]=custom.option;$[21]=onChange;$[22]=opsContainerClass;$[23]=opsPos;$[24]=options;$[25]=t9;}else{t9=$[25];}let t10;if($[26]!==containerClassName||$[27]!==t5||$[28]!==t8||$[29]!==t9){t10=/*#__PURE__*/_jsxs("div",{className:containerClassName,children:[t5,t8,t9]});$[26]=containerClassName;$[27]=t5;$[28]=t8;$[29]=t9;$[30]=t10;}else{t10=$[30];}return t10;};export default CustomDropdown;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _pushInstanceProperty from"core-js-pure/stable/instance/push.js";// Implements dropdown based on the native HTML <select> element.
|
|
2
|
-
import{useTheme}from"@dr.pogodin/react-themes";import{optionValueName}from"../common.js";const defaultTheme={"context":"
|
|
2
|
+
import{useTheme}from"@dr.pogodin/react-themes";import{optionValueName}from"../common.js";const defaultTheme={"context":"AaQ358","ad":"/3wJCb","hoc":"ptCZm5","dropdown":"un6lKF","arrow":"_5hbW5W","container":"YgJV4r","active":"A0PICa","label":"PR62Hn","option":"qiZJ4p","hiddenOption":"J8s3mU","select":"wULKZG","invalid":"b0jjs4"};/**
|
|
3
3
|
* Implements a themeable dropdown list. Internally it is rendered with help of
|
|
4
4
|
* the standard HTML `<select>` element, thus the styling support is somewhat
|
|
5
5
|
* limited.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import _pushInstanceProperty from"core-js-pure/stable/instance/push.js";import{c as _c}from"react/compiler-runtime";import{useTheme}from"@dr.pogodin/react-themes";import{optionValueName}from"../common.js";const defaultTheme={"context":"
|
|
1
|
+
import _pushInstanceProperty from"core-js-pure/stable/instance/push.js";import{c as _c}from"react/compiler-runtime";import{useTheme}from"@dr.pogodin/react-themes";import{optionValueName}from"../common.js";const defaultTheme={"context":"qsQGw8","ad":"_0tEPaR","hoc":"cH7sgP","container":"BaTkUo","option":"+7VQ7n","selected":"jlmFIq","options":"PvRxUg"};import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const Switch=t0=>{const $=_c(16);const{label,onChange,options,theme,value}=t0;const composed=useTheme("Switch",defaultTheme,theme);if(!options||!composed.option){throw Error("Internal error");}let optionNodes;if($[0]!==composed.option||$[1]!==composed.selected||$[2]!==onChange||$[3]!==options||$[4]!==value){optionNodes=[];for(const option of options){const[iValue,iName]=optionValueName(option);let className=composed.option;let onPress;if(iValue===value){className=className+` ${composed.selected}`;}else{if(onChange){onPress=()=>{onChange(iValue);};}}_pushInstanceProperty(optionNodes).call(optionNodes,onPress?/*#__PURE__*/_jsx("div",{className:className,onClick:onPress,onKeyDown:e=>{if(e.key==="Enter"){onPress();}},role:"button",tabIndex:0,children:iName},iValue):/*#__PURE__*/_jsx("div",{className:className,children:iName},iValue));}$[0]=composed.option;$[1]=composed.selected;$[2]=onChange;$[3]=options;$[4]=value;$[5]=optionNodes;}else{optionNodes=$[5];}let t1;if($[6]!==composed.label||$[7]!==label){t1=label?/*#__PURE__*/_jsx("div",{className:composed.label,children:label}):null;$[6]=composed.label;$[7]=label;$[8]=t1;}else{t1=$[8];}let t2;if($[9]!==composed.options||$[10]!==optionNodes){t2=/*#__PURE__*/_jsx("div",{className:composed.options,children:optionNodes});$[9]=composed.options;$[10]=optionNodes;$[11]=t2;}else{t2=$[11];}let t3;if($[12]!==composed.container||$[13]!==t1||$[14]!==t2){t3=/*#__PURE__*/_jsxs("div",{className:composed.container,children:[t1,t2]});$[12]=composed.container;$[13]=t1;$[14]=t2;$[15]=t3;}else{t3=$[15];}return t3;};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../src/shared/components/selectors/Switch/index.tsx"],"sourcesContent":["import type { FunctionComponent, ReactNode } from 'react';\n\nimport { type Theme, useTheme } from '@dr.pogodin/react-themes';\n\nimport {\n type OptionsT,\n type ValueT,\n optionValueName,\n} from '../common';\n\nimport defaultTheme from './theme.scss';\n\ntype ThemeT = Theme<'container' | 'label' | 'option' | 'options' | 'selected'>;\n\ntype PropsT = {\n label?: ReactNode;\n onChange?: (value: ValueT) => void;\n options?: Readonly<OptionsT<ReactNode>>;\n theme?: ThemeT;\n value?: ValueT;\n};\n\nexport const Switch: FunctionComponent<PropsT> = ({\n label,\n onChange,\n options,\n theme,\n value,\n}) => {\n const composed = useTheme('Switch', defaultTheme, theme);\n\n if (!options || !composed.option) throw Error('Internal error');\n\n const optionNodes: React.ReactNode[] = [];\n for (const option of options) {\n const [iValue, iName] = optionValueName(option);\n\n let className: string = composed.option;\n let onPress: (() => void) | undefined;\n if (iValue === value) className += ` ${composed.selected}`;\n else if (onChange) {\n onPress = () => {\n onChange(iValue);\n };\n }\n\n optionNodes.push(\n onPress\n ? (\n <div\n className={className}\n key={iValue}\n onClick={onPress}\n onKeyDown={(e) => {\n if (e.key === 'Enter') onPress();\n }}\n role=\"button\"\n tabIndex={0}\n >\n {iName}\n </div>\n )\n : <div className={className} key={iValue}>{iName}</div>,\n );\n }\n\n return (\n <div className={composed.container}>\n {label ? <div className={composed.label}>{label}</div> : null}\n\n <div className={composed.options}>\n {optionNodes}\n </div>\n </div>\n );\n};\n"],"mappings":"oHAEA,OAAqB,QAAQ,KAAQ,0BAA0B,CAAC,OAK9D,eAAe,oBAGjB,
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../src/shared/components/selectors/Switch/index.tsx"],"sourcesContent":["import type { FunctionComponent, ReactNode } from 'react';\n\nimport { type Theme, useTheme } from '@dr.pogodin/react-themes';\n\nimport {\n type OptionsT,\n type ValueT,\n optionValueName,\n} from '../common';\n\nimport defaultTheme from './theme.scss';\n\ntype ThemeT = Theme<'container' | 'label' | 'option' | 'options' | 'selected'>;\n\ntype PropsT = {\n label?: ReactNode;\n onChange?: (value: ValueT) => void;\n options?: Readonly<OptionsT<ReactNode>>;\n theme?: ThemeT;\n value?: ValueT;\n};\n\nexport const Switch: FunctionComponent<PropsT> = ({\n label,\n onChange,\n options,\n theme,\n value,\n}) => {\n const composed = useTheme('Switch', defaultTheme, theme);\n\n if (!options || !composed.option) throw Error('Internal error');\n\n const optionNodes: React.ReactNode[] = [];\n for (const option of options) {\n const [iValue, iName] = optionValueName(option);\n\n let className: string = composed.option;\n let onPress: (() => void) | undefined;\n if (iValue === value) className += ` ${composed.selected}`;\n else if (onChange) {\n onPress = () => {\n onChange(iValue);\n };\n }\n\n optionNodes.push(\n onPress\n ? (\n <div\n className={className}\n key={iValue}\n onClick={onPress}\n onKeyDown={(e) => {\n if (e.key === 'Enter') onPress();\n }}\n role=\"button\"\n tabIndex={0}\n >\n {iName}\n </div>\n )\n : <div className={className} key={iValue}>{iName}</div>,\n );\n }\n\n return (\n <div className={composed.container}>\n {label ? <div className={composed.label}>{label}</div> : null}\n\n <div className={composed.options}>\n {optionNodes}\n </div>\n </div>\n );\n};\n"],"mappings":"oHAEA,OAAqB,QAAQ,KAAQ,0BAA0B,CAAC,OAK9D,eAAe,oBAGjB,oJAAwC,yDAYxC,MAAO,MAAM,OAAiC,CAAG,oBAAC,4CAMjD,CACC,eAAiB,QAAQ,CAAC,QAAQ,CAAE,YAAY,CAAE,KAAK,CAAC,CAExD,GAAI,CAAC,OAA2B,EAA5B,CAAa,QAAQ,OAAO,EAAE,KAAM,MAAK,CAAC,gBAAgB,CAAC,CAAC,qHAEhE,YAAuC,EAAE,CACzC,IAAK,YAAY,GAAI,QAAO,EAC1B,oBAAwB,eAAe,CAAC,MAAM,CAAC,CAE/C,cAAwB,QAAQ,OAAO,CACnC,YACJ,GAAI,MAAM,GAAK,KAAK,EAAE,mBAAS,CAAI,IAAI,QAAQ,SAAS,EAAE,OACrD,GAAI,QAAQ,EACf,QAAU,KACR,QAAQ,CAAC,MAAM,CAAC,EACjB,CAFM,CAGR,CAED,iCAAW,OAAX,WAAW,CACT,OAAO,cAAP,YAGiB,SAAS,CAAT,SAAS,CAEX,OAAO,CAAP,OAAO,CACL,SAEV,CAFU,IACT,GAAI,CAAC,IAAI,GAAK,OAAO,EAAE,OAAO,CAAC,CAAC,EAAC,CAClC,CACI,IAAQ,CAAR,QAAQ,CACH,QAAC,CAAD,CAAC,UAEV,KAAK,EARD,MAW6C,CAAC,cAfzD,YAeoB,SAAS,CAAT,SAAS,UAAgB,KAAK,EAAd,MAAoB,CAC1D,CAAC,EACF,0KAII,QAAK,cAAL,YAAwB,SAAc,CAAd,QAAQ,MAAM,UAAG,KAAK,CAAa,CAAC,CAA5D,IAA4D,+GAE7D,4BAAgB,SAAgB,CAAhB,QAAQ,QAAQ,UAC7B,WAAW,CACT,CAAC,gIALR,6BAAgB,SAAkB,CAAlB,QAAQ,UAAU,WAC/B,EAA4D,CAE7D,EAEM,EACH,CAAC,2EANN,GAMM,EAET","ignoreList":[]}
|
|
@@ -18,6 +18,8 @@ export declare enum ENVIRONMENTS {
|
|
|
18
18
|
type ModuleT = 'amd' | 'auto' | 'cjs' | 'commonjs' | 'systemjs' | 'umd' | false;
|
|
19
19
|
export type OptionsT = {
|
|
20
20
|
addImportExtensions?: AddImportExtensionOptions | boolean;
|
|
21
|
+
/** Must match Webpack config context for */
|
|
22
|
+
context?: string;
|
|
21
23
|
modules?: ModuleT;
|
|
22
24
|
noRR?: boolean;
|
|
23
25
|
noReactCompiler?: boolean;
|
package/config/babel/webpack.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { generateScopedNameFactory, } from '@dr.pogodin/babel-plugin-react-css-modules/utils';
|
|
2
|
-
const generateScopedNameDev = generateScopedNameFactory('[package]___[path][name]___[local]___[hash:base64:6]');
|
|
3
|
-
const generateScopedNameProd = generateScopedNameFactory('[hash:base64:6]');
|
|
4
1
|
/**
|
|
5
2
|
* Supported Babel environments.
|
|
6
3
|
*/
|
|
@@ -61,9 +58,10 @@ function newBaseConfig(options) {
|
|
|
61
58
|
* @return {object} Returns mutated config for chaining.
|
|
62
59
|
* @ignore
|
|
63
60
|
*/
|
|
64
|
-
function addStyling(config, env) {
|
|
61
|
+
function addStyling(config, env, context) {
|
|
65
62
|
const cssModulesOps = {
|
|
66
63
|
autoResolveMultipleImports: true,
|
|
64
|
+
context,
|
|
67
65
|
filetypes: {
|
|
68
66
|
'.scss': { syntax: 'postcss-scss' },
|
|
69
67
|
},
|
|
@@ -72,10 +70,10 @@ function addStyling(config, env) {
|
|
|
72
70
|
switch (env) {
|
|
73
71
|
case ENVIRONMENTS.DEV:
|
|
74
72
|
case ENVIRONMENTS.TEST:
|
|
75
|
-
cssModulesOps.generateScopedName =
|
|
73
|
+
cssModulesOps.generateScopedName = '[file]__[local]__[fullhash:base64:6]';
|
|
76
74
|
break;
|
|
77
75
|
case ENVIRONMENTS.PROD:
|
|
78
|
-
cssModulesOps.generateScopedName =
|
|
76
|
+
cssModulesOps.generateScopedName = '[fullhash:base64:6]';
|
|
79
77
|
break;
|
|
80
78
|
default:
|
|
81
79
|
}
|
|
@@ -94,8 +92,9 @@ function addStyling(config, env) {
|
|
|
94
92
|
export default function getPreset(babel, ops = {}) {
|
|
95
93
|
const env = babel.env();
|
|
96
94
|
const res = newBaseConfig(ops);
|
|
97
|
-
if (!ops.noStyling)
|
|
98
|
-
addStyling(res, env);
|
|
95
|
+
if (!ops.noStyling) {
|
|
96
|
+
addStyling(res, env, ops.context);
|
|
97
|
+
}
|
|
99
98
|
if (env === ENVIRONMENTS.DEV && !ops.noRR) {
|
|
100
99
|
res.plugins.push('react-refresh/babel');
|
|
101
100
|
}
|
package/config/jest/default.js
CHANGED
|
@@ -3,16 +3,13 @@ import { randomBytes } from 'node:crypto';
|
|
|
3
3
|
import nodeFs from 'node:fs';
|
|
4
4
|
import { createRequire } from 'node:module';
|
|
5
5
|
import { resolve } from 'node:path';
|
|
6
|
-
import autoprefixer from 'autoprefixer';
|
|
7
6
|
import { clone, defaults, isFunction, isObject, } from 'lodash-es';
|
|
8
|
-
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
9
7
|
import { SitemapStream, streamToPromise } from 'sitemap';
|
|
10
8
|
// NOTE: As "webpack" is still distributed as CJS module, now that we have
|
|
11
9
|
// switched to MJS, importing plugins from it in MJS import style does not work,
|
|
12
10
|
// thus we need to import the default export, and use its fields.
|
|
13
11
|
import webpack from 'webpack';
|
|
14
12
|
import WorkboxPlugin from 'workbox-webpack-plugin';
|
|
15
|
-
import { getLocalIdent, } from '@dr.pogodin/babel-plugin-react-css-modules/utils';
|
|
16
13
|
const COREJS_REGEX = /\/core-js/;
|
|
17
14
|
const require = createRequire(import.meta.url);
|
|
18
15
|
/**
|
|
@@ -225,8 +222,21 @@ export default function configFactory(ops) {
|
|
|
225
222
|
const res = {
|
|
226
223
|
context: o.context,
|
|
227
224
|
entry,
|
|
225
|
+
experiments: { css: true },
|
|
228
226
|
mode: o.mode,
|
|
229
227
|
module: {
|
|
228
|
+
generator: {
|
|
229
|
+
'css/module': {
|
|
230
|
+
localIdentName: o.cssLocalIdent,
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
parser: {
|
|
234
|
+
'css/module': {
|
|
235
|
+
// We keep it "false" for now, as in our setup Babel plugins take care
|
|
236
|
+
// of injecting necessary CSS module identifiers into JS code.
|
|
237
|
+
namedExports: false,
|
|
238
|
+
},
|
|
239
|
+
},
|
|
230
240
|
rules: [{
|
|
231
241
|
/* Loads font resources from "src/assets/fonts" folder. */
|
|
232
242
|
test: /\.(eot|otf|ttf|woff2?)$/,
|
|
@@ -246,6 +256,7 @@ export default function configFactory(ops) {
|
|
|
246
256
|
exclude: babelLoaderExclude,
|
|
247
257
|
loader: 'babel-loader',
|
|
248
258
|
options: Object.assign({ babelrc: false, configFile: false, envName: o.babelEnv, presets: [['@dr.pogodin/react-utils/config/babel/webpack', {
|
|
259
|
+
context: o.context,
|
|
249
260
|
typescript: ops.typescript,
|
|
250
261
|
}]], sourceType: 'unambiguous' }, o.babelLoaderOptions),
|
|
251
262
|
}, {
|
|
@@ -258,43 +269,15 @@ export default function configFactory(ops) {
|
|
|
258
269
|
}, {
|
|
259
270
|
/* Loads SCSS stylesheets. */
|
|
260
271
|
test: /\.scss$/,
|
|
272
|
+
type: 'css/module',
|
|
261
273
|
use: [
|
|
262
|
-
|
|
263
|
-
loader: 'css-loader',
|
|
264
|
-
options: {
|
|
265
|
-
modules: {
|
|
266
|
-
getLocalIdent,
|
|
267
|
-
localIdentName: o.cssLocalIdent,
|
|
268
|
-
// This flag defaults `true` for ES module builds since css-loader@7.0.0:
|
|
269
|
-
// https://github.com/webpack-contrib/css-loader/releases/tag/v7.0.0
|
|
270
|
-
// We'll keep it `false` to avoid a breaking change for dependant
|
|
271
|
-
// projects, and I am also not sure what are the benefits of
|
|
272
|
-
// named CSS exports anyway.
|
|
273
|
-
namedExport: false,
|
|
274
|
-
},
|
|
275
|
-
},
|
|
276
|
-
}, {
|
|
277
|
-
loader: 'postcss-loader',
|
|
278
|
-
options: {
|
|
279
|
-
postcssOptions: {
|
|
280
|
-
plugins: [autoprefixer],
|
|
281
|
-
},
|
|
282
|
-
},
|
|
283
|
-
}, 'resolve-url-loader', {
|
|
274
|
+
{
|
|
284
275
|
loader: 'sass-loader',
|
|
285
276
|
options: {
|
|
286
277
|
sourceMap: true,
|
|
287
278
|
},
|
|
288
279
|
},
|
|
289
280
|
],
|
|
290
|
-
}, {
|
|
291
|
-
/* Loads CSS stylesheets. It is assumed that CSS stylesheets come only
|
|
292
|
-
* from dependencies, as we use SCSS inside our own code. */
|
|
293
|
-
test: /\.css$/,
|
|
294
|
-
use: [
|
|
295
|
-
MiniCssExtractPlugin.loader,
|
|
296
|
-
'css-loader',
|
|
297
|
-
],
|
|
298
281
|
}],
|
|
299
282
|
},
|
|
300
283
|
node: {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
2
1
|
import { type Configuration } from 'webpack';
|
|
3
2
|
import { type OptionsT as BaseOptionsT } from './app-base.js';
|
|
4
3
|
type OptionsT = BaseOptionsT & {
|
|
5
|
-
cssExtractionOptions?: MiniCssExtractPlugin.PluginOptions;
|
|
6
4
|
dontUseHmr?: boolean;
|
|
7
5
|
dontUseReactGlobalStateDebugging?: boolean;
|
|
8
6
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
2
|
import { clone, defaults } from 'lodash-es';
|
|
3
|
-
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
4
3
|
import webpack from 'webpack';
|
|
5
4
|
import { merge } from 'webpack-merge';
|
|
6
5
|
import ReactRefreshPlugin from '@pmmmwh/react-refresh-webpack-plugin';
|
|
@@ -12,14 +11,13 @@ import baseFactory from './app-base.js';
|
|
|
12
11
|
*/
|
|
13
12
|
export default function configFactory(ops) {
|
|
14
13
|
const o = defaults(clone(ops), {
|
|
15
|
-
cssLocalIdent: '[
|
|
14
|
+
cssLocalIdent: '[file]__[local]__[fullhash:base64:6]',
|
|
16
15
|
});
|
|
17
16
|
const entry = ['@dr.pogodin/react-utils/build/development/client/init'];
|
|
18
17
|
if (!o.dontUseHmr)
|
|
19
|
-
entry.push('webpack-dev-middleware/client
|
|
18
|
+
entry.push('webpack-dev-middleware/client');
|
|
20
19
|
entry.push(...Array.isArray(o.entry) ? o.entry : [o.entry]);
|
|
21
20
|
const plugins = [
|
|
22
|
-
new MiniCssExtractPlugin(Object.assign({ chunkFilename: '[id].css', filename: '[id].css' }, ops.cssExtractionOptions)),
|
|
23
21
|
new webpack.DefinePlugin({
|
|
24
22
|
'process.env.BABEL_ENV': JSON.stringify('development'),
|
|
25
23
|
'process.env.DEV_TOOLS': JSON.stringify(true),
|
|
@@ -3,12 +3,9 @@
|
|
|
3
3
|
* @module webpack/app-production
|
|
4
4
|
* @desc Production Webpack configuration for applications.
|
|
5
5
|
*/
|
|
6
|
-
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
7
6
|
import { type Configuration } from 'webpack';
|
|
8
7
|
import { type OptionsT as BaseOptionsT } from './app-base.js';
|
|
9
|
-
type OptionsT = BaseOptionsT
|
|
10
|
-
cssExtractionOptions?: MiniCssExtractPlugin.PluginOptions;
|
|
11
|
-
};
|
|
8
|
+
type OptionsT = BaseOptionsT;
|
|
12
9
|
/**
|
|
13
10
|
* @param {object} ops
|
|
14
11
|
* @param {string} ops.context Base URL for resolution of relative config paths.
|
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
* @desc Production Webpack configuration for applications.
|
|
5
5
|
*/
|
|
6
6
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
7
|
-
import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
|
|
8
|
-
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
9
7
|
import webpack from 'webpack';
|
|
10
8
|
import { merge } from 'webpack-merge';
|
|
11
9
|
import baseFactory from './app-base.js';
|
|
@@ -21,28 +19,11 @@ export default function configFactory(ops) {
|
|
|
21
19
|
...Array.isArray(ops.entry) ? ops.entry : [ops.entry],
|
|
22
20
|
];
|
|
23
21
|
const res = merge(baseFactory(Object.assign(Object.assign({ babelLoaderExclude: [] }, ops), { babelEnv: 'production', babelLoaderOptions: Object.assign({ compact: true }, ops.babelLoaderOptions), entry, mode: 'production' })), {
|
|
24
|
-
optimization: {
|
|
25
|
-
minimizer: [
|
|
26
|
-
'...',
|
|
27
|
-
new CssMinimizerPlugin({
|
|
28
|
-
minimizerOptions: {
|
|
29
|
-
preset: ['default', {
|
|
30
|
-
/* Due to the way our styles are organized, these dangerous
|
|
31
|
-
* optimizations can break our styles, thus they are disabled. */
|
|
32
|
-
discardUnused: false,
|
|
33
|
-
reduceIdents: false,
|
|
34
|
-
zindex: false,
|
|
35
|
-
}],
|
|
36
|
-
},
|
|
37
|
-
}),
|
|
38
|
-
],
|
|
39
|
-
},
|
|
40
22
|
plugins: [
|
|
41
23
|
new webpack.DefinePlugin({
|
|
42
24
|
'process.env.BABEL_ENV': JSON.stringify('production'),
|
|
43
25
|
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
44
26
|
}),
|
|
45
|
-
new MiniCssExtractPlugin(Object.assign({ chunkFilename: '[contenthash].css', filename: '[contenthash].css' }, ops.cssExtractionOptions)),
|
|
46
27
|
],
|
|
47
28
|
});
|
|
48
29
|
return res;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.57.0-alpha.1",
|
|
3
3
|
"bin": {
|
|
4
4
|
"react-utils-build": "bin/build.js",
|
|
5
5
|
"react-utils-run-with-babel": "bin/run-with-babel.js",
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
"url": "https://github.com/birdofpreyru/react-utils/issues"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@babel/runtime-corejs3": "^8.0.
|
|
12
|
+
"@babel/runtime-corejs3": "^8.0.6",
|
|
13
13
|
"@commander-js/extra-typings": "^15.0.0",
|
|
14
|
-
"@dr.pogodin/babel-plugin-react-css-modules": "^
|
|
14
|
+
"@dr.pogodin/babel-plugin-react-css-modules": "^8.0.0-alpha.5",
|
|
15
15
|
"@dr.pogodin/csurf": "^1.17.1",
|
|
16
16
|
"@dr.pogodin/js-utils": "^0.2.0",
|
|
17
17
|
"@dr.pogodin/react-global-state": "^0.25.0",
|
|
18
18
|
"@dr.pogodin/react-helmet": "^3.2.3",
|
|
19
19
|
"@dr.pogodin/react-themes": "^1.11.0",
|
|
20
|
-
"@jest/environment": "^30.5.
|
|
20
|
+
"@jest/environment": "^30.5.2",
|
|
21
21
|
"axios": "^1.20.0",
|
|
22
22
|
"commander": "^15.0.0",
|
|
23
23
|
"compression": "^1.8.1",
|
|
@@ -46,21 +46,21 @@
|
|
|
46
46
|
},
|
|
47
47
|
"description": "Collection of generic ReactJS components and utils",
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@babel/cli": "^8.0.
|
|
50
|
-
"@babel/core": "^8.0.
|
|
51
|
-
"@babel/plugin-transform-runtime": "^8.0.
|
|
49
|
+
"@babel/cli": "^8.0.6",
|
|
50
|
+
"@babel/core": "^8.0.6",
|
|
51
|
+
"@babel/plugin-transform-runtime": "^8.0.6",
|
|
52
52
|
"@babel/preset-env": "^8.0.2",
|
|
53
53
|
"@babel/preset-react": "^8.0.1",
|
|
54
54
|
"@babel/preset-typescript": "^8.0.1",
|
|
55
|
-
"@babel/register": "^8.0.
|
|
55
|
+
"@babel/register": "^8.0.6",
|
|
56
56
|
"@dr.pogodin/babel-plugin-add-import-extension": "^3.0.2",
|
|
57
57
|
"@dr.pogodin/babel-plugin-transform-assets": "^2.0.0",
|
|
58
58
|
"@dr.pogodin/babel-preset-svgr": "^2.0.0",
|
|
59
59
|
"@dr.pogodin/eslint-configs": "^0.3.7",
|
|
60
|
-
"@jest/globals": "^30.5.
|
|
60
|
+
"@jest/globals": "^30.5.2",
|
|
61
61
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.6.3",
|
|
62
62
|
"@standard-schema/spec": "^1.1.0",
|
|
63
|
-
"@testing-library/dom": "^10.4.
|
|
63
|
+
"@testing-library/dom": "^10.4.2",
|
|
64
64
|
"@testing-library/react": "^16.3.3",
|
|
65
65
|
"@testing-library/user-event": "^14.6.7",
|
|
66
66
|
"@tsconfig/recommended": "^1.0.13",
|
|
@@ -81,28 +81,21 @@
|
|
|
81
81
|
"@types/serve-favicon": "^2.5.7",
|
|
82
82
|
"@types/supertest": "^7.2.1",
|
|
83
83
|
"@types/webpack": "^5.28.5",
|
|
84
|
-
"
|
|
85
|
-
"babel-jest": "^30.5.1",
|
|
84
|
+
"babel-jest": "^30.5.2",
|
|
86
85
|
"babel-loader": "^10.1.1",
|
|
87
86
|
"babel-plugin-module-resolver": "^5.0.3",
|
|
88
87
|
"babel-plugin-polyfill-corejs3": "^1.0.0",
|
|
89
88
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
90
|
-
"css-loader": "^7.1.5",
|
|
91
|
-
"css-minimizer-webpack-plugin": "^8.0.0",
|
|
92
89
|
"identity-obj-proxy": "^3.0.0",
|
|
93
|
-
"jest": "^30.5.
|
|
94
|
-
"jest-environment-jsdom": "^30.5.
|
|
90
|
+
"jest": "^30.5.2",
|
|
91
|
+
"jest-environment-jsdom": "^30.5.2",
|
|
95
92
|
"memfs": "^4.71.0",
|
|
96
|
-
"mini-css-extract-plugin": "^2.10.2",
|
|
97
93
|
"mockdate": "^3.0.5",
|
|
98
94
|
"nodelist-foreach-polyfill": "^1.2.0",
|
|
99
|
-
"postcss": "^8.5.28",
|
|
100
|
-
"postcss-loader": "^8.2.1",
|
|
101
95
|
"postcss-scss": "^4.0.9",
|
|
102
96
|
"pretty": "^2.0.0",
|
|
103
97
|
"react-refresh": "^0.18.0",
|
|
104
|
-
"
|
|
105
|
-
"sass": "^1.104.0",
|
|
98
|
+
"sass": "^1.104.1",
|
|
106
99
|
"sass-loader": "^17.0.1",
|
|
107
100
|
"sitemap": "^9.0.1",
|
|
108
101
|
"source-map-loader": "^5.0.0",
|
|
@@ -113,7 +106,7 @@
|
|
|
113
106
|
"tstyche": "^7.2.4",
|
|
114
107
|
"typed-scss-modules": "^8.1.1",
|
|
115
108
|
"typescript": "^6.0.3",
|
|
116
|
-
"webpack": "^5.
|
|
109
|
+
"webpack": "^5.111.1",
|
|
117
110
|
"webpack-dev-middleware": "^8.3.0",
|
|
118
111
|
"webpack-merge": "^6.0.1",
|
|
119
112
|
"workbox-core": "^7.4.1",
|