@dr.pogodin/react-utils 1.57.0-alpha.1 → 1.57.0-alpha.2
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/CHANGELOG.md +7 -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 +0 -2
- package/config/babel/webpack.js +8 -7
- package/config/webpack/app-base.d.ts +1 -1
- package/config/webpack/app-base.js +7 -9
- package/config/webpack/app-development.js +1 -1
- package/config/webpack/app-production.js +30 -0
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -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": "-dr-pogodin-react-utils___build-web-shared-components-Button-style___context___0S7CYa",
|
|
6
|
+
"ad": "-dr-pogodin-react-utils___build-web-shared-components-Button-style___ad___YFXz0-",
|
|
7
|
+
"hoc": "-dr-pogodin-react-utils___build-web-shared-components-Button-style___hoc___BElFuo",
|
|
8
|
+
"button": "-dr-pogodin-react-utils___build-web-shared-components-Button-style___button___hXiBOw",
|
|
9
|
+
"active": "-dr-pogodin-react-utils___build-web-shared-components-Button-style___active___biX-UA",
|
|
10
|
+
"disabled": "-dr-pogodin-react-utils___build-web-shared-components-Button-style___disabled___-6CH9q"
|
|
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": "-dr-pogodin-react-utils___build-web-shared-components-Checkbox-theme___context___08mmmo",
|
|
5
|
+
"ad": "-dr-pogodin-react-utils___build-web-shared-components-Checkbox-theme___ad___Hc06MV",
|
|
6
|
+
"hoc": "-dr-pogodin-react-utils___build-web-shared-components-Checkbox-theme___hoc___toOtOd",
|
|
7
|
+
"checkbox": "-dr-pogodin-react-utils___build-web-shared-components-Checkbox-theme___checkbox___v4DmWM",
|
|
8
|
+
"indeterminate": "-dr-pogodin-react-utils___build-web-shared-components-Checkbox-theme___indeterminate___ckSC8W",
|
|
9
|
+
"container": "-dr-pogodin-react-utils___build-web-shared-components-Checkbox-theme___container___g7wee9",
|
|
10
|
+
"label": "-dr-pogodin-react-utils___build-web-shared-components-Checkbox-theme___label___XQ57WS",
|
|
11
|
+
"error": "-dr-pogodin-react-utils___build-web-shared-components-Checkbox-theme___error___foaF-C",
|
|
12
|
+
"errorMessage": "-dr-pogodin-react-utils___build-web-shared-components-Checkbox-theme___errorMessage___WC9mi1",
|
|
13
|
+
"disabled": "-dr-pogodin-react-utils___build-web-shared-components-Checkbox-theme___disabled___baVvQA"
|
|
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": "-dr-pogodin-react-utils___build-web-shared-components-GenericLink-style___link___hXmkf-"
|
|
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": "-dr-pogodin-react-utils___build-web-shared-components-Input-theme___context___-Jj9Dp",
|
|
6
|
+
"ad": "-dr-pogodin-react-utils___build-web-shared-components-Input-theme___ad___IOZUc8",
|
|
7
|
+
"hoc": "-dr-pogodin-react-utils___build-web-shared-components-Input-theme___hoc___nSzLXc",
|
|
8
|
+
"container": "-dr-pogodin-react-utils___build-web-shared-components-Input-theme___container___wW08uK",
|
|
9
|
+
"children": "-dr-pogodin-react-utils___build-web-shared-components-Input-theme___children___hCuQWP",
|
|
10
|
+
"input": "-dr-pogodin-react-utils___build-web-shared-components-Input-theme___input___oYQ-Uo",
|
|
11
|
+
"label": "-dr-pogodin-react-utils___build-web-shared-components-Input-theme___label___OTmX5n",
|
|
12
|
+
"error": "-dr-pogodin-react-utils___build-web-shared-components-Input-theme___error___7jrZ-X",
|
|
13
|
+
"errorMessage": "-dr-pogodin-react-utils___build-web-shared-components-Input-theme___errorMessage___qjYbwz"
|
|
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": "-dr-pogodin-react-utils___build-web-shared-components-Modal-base-theme___context___sCYXfW",
|
|
7
|
+
"ad": "-dr-pogodin-react-utils___build-web-shared-components-Modal-base-theme___ad___e0BH-f",
|
|
8
|
+
"hoc": "-dr-pogodin-react-utils___build-web-shared-components-Modal-base-theme___hoc___vqUuSP",
|
|
9
|
+
"overlay": "-dr-pogodin-react-utils___build-web-shared-components-Modal-base-theme___overlay___uAH4as",
|
|
10
|
+
"container": "-dr-pogodin-react-utils___build-web-shared-components-Modal-base-theme___container___zqpc6q"
|
|
11
11
|
};
|
|
12
12
|
const S = {
|
|
13
|
-
"scrollingDisabledByModal": "
|
|
13
|
+
"scrollingDisabledByModal": "-dr-pogodin-react-utils___build-web-shared-components-Modal-styles___scrollingDisabledByModal___yfvOIZ"
|
|
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": "-dr-pogodin-react-utils___build-web-shared-components-PageLayout-base-theme___context___zv9tdn",
|
|
5
|
+
"ad": "-dr-pogodin-react-utils___build-web-shared-components-PageLayout-base-theme___ad___yr8hbI",
|
|
6
|
+
"hoc": "-dr-pogodin-react-utils___build-web-shared-components-PageLayout-base-theme___hoc___01Mz0J",
|
|
7
|
+
"container": "-dr-pogodin-react-utils___build-web-shared-components-PageLayout-base-theme___container___blPmpk",
|
|
8
|
+
"mainPanel": "-dr-pogodin-react-utils___build-web-shared-components-PageLayout-base-theme___mainPanel___zPoY0u",
|
|
9
|
+
"sidePanel": "-dr-pogodin-react-utils___build-web-shared-components-PageLayout-base-theme___sidePanel___mRD159"
|
|
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": "-dr-pogodin-react-utils___build-web-shared-components-TextArea-style___context___tECG8C",
|
|
6
|
+
"ad": "-dr-pogodin-react-utils___build-web-shared-components-TextArea-style___ad___epeH4O",
|
|
7
|
+
"hoc": "-dr-pogodin-react-utils___build-web-shared-components-TextArea-style___hoc___2kFnSt",
|
|
8
|
+
"container": "-dr-pogodin-react-utils___build-web-shared-components-TextArea-style___container___lV5ZyX",
|
|
9
|
+
"label": "-dr-pogodin-react-utils___build-web-shared-components-TextArea-style___label___7qDPW1",
|
|
10
|
+
"textarea": "-dr-pogodin-react-utils___build-web-shared-components-TextArea-style___textarea___gkaNJJ",
|
|
11
|
+
"error": "-dr-pogodin-react-utils___build-web-shared-components-TextArea-style___error___ObwtG4",
|
|
12
|
+
"errorMessage": "-dr-pogodin-react-utils___build-web-shared-components-TextArea-style___errorMessage___ikIw0x",
|
|
13
|
+
"hidden": "-dr-pogodin-react-utils___build-web-shared-components-TextArea-style___hidden___-UyujK"
|
|
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": "-dr-pogodin-react-utils___build-web-shared-components-Throbber-theme___context___eVCJf-",
|
|
5
|
+
"ad": "-dr-pogodin-react-utils___build-web-shared-components-Throbber-theme___ad___CU2B6H",
|
|
6
|
+
"hoc": "-dr-pogodin-react-utils___build-web-shared-components-Throbber-theme___hoc___1V5iVx",
|
|
7
|
+
"bouncing": "-dr-pogodin-react-utils___build-web-shared-components-Throbber-theme___bouncing___h6ZYmQ",
|
|
8
|
+
"container": "-dr-pogodin-react-utils___build-web-shared-components-Throbber-theme___container___VDVI-X",
|
|
9
|
+
"circle": "-dr-pogodin-react-utils___build-web-shared-components-Throbber-theme___circle___Y2rzbL"
|
|
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": "-dr-pogodin-react-utils___build-web-shared-components-WithTooltip-default-theme___ad___n6OiU9",
|
|
6
|
+
"hoc": "-dr-pogodin-react-utils___build-web-shared-components-WithTooltip-default-theme___hoc___zwsjGc",
|
|
7
|
+
"context": "-dr-pogodin-react-utils___build-web-shared-components-WithTooltip-default-theme___context___JVJPcU",
|
|
8
|
+
"appearance": "-dr-pogodin-react-utils___build-web-shared-components-WithTooltip-default-theme___appearance___9U4YiR",
|
|
9
|
+
"arrow": "-dr-pogodin-react-utils___build-web-shared-components-WithTooltip-default-theme___arrow___9n65k-",
|
|
10
|
+
"container": "-dr-pogodin-react-utils___build-web-shared-components-WithTooltip-default-theme___container___uA1tHZ",
|
|
11
|
+
"wrapper": "-dr-pogodin-react-utils___build-web-shared-components-WithTooltip-default-theme___wrapper___JFVmGf"
|
|
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": "-dr-pogodin-react-utils___build-web-shared-components-YouTubeVideo-base___context___Pa7GiX",
|
|
7
|
+
"ad": "-dr-pogodin-react-utils___build-web-shared-components-YouTubeVideo-base___ad___NikZ57",
|
|
8
|
+
"hoc": "-dr-pogodin-react-utils___build-web-shared-components-YouTubeVideo-base___hoc___FydyFQ",
|
|
9
|
+
"container": "-dr-pogodin-react-utils___build-web-shared-components-YouTubeVideo-base___container___pQTzJV",
|
|
10
|
+
"video": "-dr-pogodin-react-utils___build-web-shared-components-YouTubeVideo-base___video___iFTALT"
|
|
11
11
|
};
|
|
12
12
|
const throbberTheme = {
|
|
13
|
-
"context": "
|
|
14
|
-
"ad": "
|
|
15
|
-
"hoc": "
|
|
16
|
-
"container": "
|
|
13
|
+
"context": "-dr-pogodin-react-utils___build-web-shared-components-YouTubeVideo-throbber___context___0Piy3R",
|
|
14
|
+
"ad": "-dr-pogodin-react-utils___build-web-shared-components-YouTubeVideo-throbber___ad___GD-lgk",
|
|
15
|
+
"hoc": "-dr-pogodin-react-utils___build-web-shared-components-YouTubeVideo-throbber___hoc___T5TGzT",
|
|
16
|
+
"container": "-dr-pogodin-react-utils___build-web-shared-components-YouTubeVideo-throbber___container___IgN6Uf"
|
|
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": "-dr-pogodin-react-utils___build-web-shared-components-selectors-CustomDropdown-Options-style___overlay___ntZ5My"
|
|
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": "-dr-pogodin-react-utils___build-web-shared-components-selectors-CustomDropdown-theme___context___SNj3wp",
|
|
8
|
+
"ad": "-dr-pogodin-react-utils___build-web-shared-components-selectors-CustomDropdown-theme___ad___T6eOJ-",
|
|
9
|
+
"hoc": "-dr-pogodin-react-utils___build-web-shared-components-selectors-CustomDropdown-theme___hoc___KG-OKN",
|
|
10
|
+
"container": "-dr-pogodin-react-utils___build-web-shared-components-selectors-CustomDropdown-theme___container___SzHHPE",
|
|
11
|
+
"label": "-dr-pogodin-react-utils___build-web-shared-components-selectors-CustomDropdown-theme___label___KTG4ai",
|
|
12
|
+
"dropdown": "-dr-pogodin-react-utils___build-web-shared-components-selectors-CustomDropdown-theme___dropdown___xdotm7",
|
|
13
|
+
"option": "-dr-pogodin-react-utils___build-web-shared-components-selectors-CustomDropdown-theme___option___y-WCDM",
|
|
14
|
+
"select": "-dr-pogodin-react-utils___build-web-shared-components-selectors-CustomDropdown-theme___select___PP5Siy",
|
|
15
|
+
"arrow": "-dr-pogodin-react-utils___build-web-shared-components-selectors-CustomDropdown-theme___arrow___7-A7Lh",
|
|
16
|
+
"active": "-dr-pogodin-react-utils___build-web-shared-components-selectors-CustomDropdown-theme___active___RoOAZK",
|
|
17
|
+
"upward": "-dr-pogodin-react-utils___build-web-shared-components-selectors-CustomDropdown-theme___upward___--5Xpy"
|
|
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": "-dr-pogodin-react-utils___build-web-shared-components-selectors-NativeDropdown-theme___context___WbwY1Y",
|
|
6
|
+
"ad": "-dr-pogodin-react-utils___build-web-shared-components-selectors-NativeDropdown-theme___ad___AP5hsY",
|
|
7
|
+
"hoc": "-dr-pogodin-react-utils___build-web-shared-components-selectors-NativeDropdown-theme___hoc___ODAJeW",
|
|
8
|
+
"dropdown": "-dr-pogodin-react-utils___build-web-shared-components-selectors-NativeDropdown-theme___dropdown___wabw76",
|
|
9
|
+
"arrow": "-dr-pogodin-react-utils___build-web-shared-components-selectors-NativeDropdown-theme___arrow___WFSB9z",
|
|
10
|
+
"container": "-dr-pogodin-react-utils___build-web-shared-components-selectors-NativeDropdown-theme___container___vE9M8Z",
|
|
11
|
+
"active": "-dr-pogodin-react-utils___build-web-shared-components-selectors-NativeDropdown-theme___active___sfLSJA",
|
|
12
|
+
"label": "-dr-pogodin-react-utils___build-web-shared-components-selectors-NativeDropdown-theme___label___bQLBhS",
|
|
13
|
+
"option": "-dr-pogodin-react-utils___build-web-shared-components-selectors-NativeDropdown-theme___option___wgCtdC",
|
|
14
|
+
"hiddenOption": "-dr-pogodin-react-utils___build-web-shared-components-selectors-NativeDropdown-theme___hiddenOption___ty19C2",
|
|
15
|
+
"select": "-dr-pogodin-react-utils___build-web-shared-components-selectors-NativeDropdown-theme___select___ntbzPR",
|
|
16
|
+
"invalid": "-dr-pogodin-react-utils___build-web-shared-components-selectors-NativeDropdown-theme___invalid___3CzMM4"
|
|
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": "-dr-pogodin-react-utils___build-web-shared-components-selectors-Switch-theme___context___akD3dQ",
|
|
7
|
+
"ad": "-dr-pogodin-react-utils___build-web-shared-components-selectors-Switch-theme___ad___xcXtdE",
|
|
8
|
+
"hoc": "-dr-pogodin-react-utils___build-web-shared-components-selectors-Switch-theme___hoc___N3iziJ",
|
|
9
|
+
"container": "-dr-pogodin-react-utils___build-web-shared-components-selectors-Switch-theme___container___BYeWyJ",
|
|
10
|
+
"option": "-dr-pogodin-react-utils___build-web-shared-components-selectors-Switch-theme___option___7MFXEN",
|
|
11
|
+
"selected": "-dr-pogodin-react-utils___build-web-shared-components-selectors-Switch-theme___selected___CDbWAd",
|
|
12
|
+
"options": "-dr-pogodin-react-utils___build-web-shared-components-selectors-Switch-theme___options___9-eOZo"
|
|
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":"_0S7CYa","ad":"YFXz0-","hoc":"BElFuo","button":"hXiBOw","active":"biX-UA","disabled":"_-6CH9q"};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,+HAAwC,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":"_08mmmo","ad":"Hc06MV","hoc":"toOtOd","checkbox":"v4DmWM","indeterminate":"ckSC8W","container":"g7wee9","label":"XQ57WS","error":"foaF-C","errorMessage":"WC9mi1","disabled":"baVvQA"};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,sNAAwC,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":"hXmkf-"};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":"-Jj9Dp","ad":"IOZUc8","hoc":"nSzLXc","container":"wW08uK","children":"hCuQWP","input":"oYQ-Uo","label":"OTmX5n","error":"_7jrZ-X","errorMessage":"qjYbwz"};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":"sCYXfW","ad":"e0BH-f","hoc":"vqUuSP","overlay":"uAH4as","container":"zqpc6q"};const S={"scrollingDisabledByModal":"yfvOIZ"};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,2JAC8B,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":"zv9tdn","ad":"yr8hbI","hoc":"_01Mz0J","container":"blPmpk","mainPanel":"zPoY0u","sidePanel":"mRD159"};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,kIAA0C,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":"tECG8C","ad":"epeH4O","hoc":"_2kFnSt","container":"lV5ZyX","label":"_7qDPW1","textarea":"gkaNJJ","error":"ObwtG4","errorMessage":"ikIw0x","hidden":"-UyujK"};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":"eVCJf-","ad":"CU2B6H","hoc":"_1V5iVx","bouncing":"h6ZYmQ","container":"VDVI-X","circle":"Y2rzbL"};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,iIAAwC,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":"n6OiU9","hoc":"zwsjGc","context":"JVJPcU","appearance":"_9U4YiR","arrow":"_9n65k-","container":"uA1tHZ","wrapper":"JFVmGf"};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":"Pa7GiX","ad":"NikZ57","hoc":"FydyFQ","container":"pQTzJV","video":"iFTALT"};const throbberTheme={"context":"_0Piy3R","ad":"GD-lgk","hoc":"T5TGzT","container":"IgN6Uf"};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":"ntZ5My"};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":"SNj3wp","ad":"T6eOJ-","hoc":"KG-OKN","container":"SzHHPE","label":"KTG4ai","dropdown":"xdotm7","option":"y-WCDM","select":"PP5Siy","arrow":"_7-A7Lh","active":"RoOAZK","upward":"_--5Xpy"};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":"WbwY1Y","ad":"AP5hsY","hoc":"ODAJeW","dropdown":"wabw76","arrow":"WFSB9z","container":"vE9M8Z","active":"sfLSJA","label":"bQLBhS","option":"wgCtdC","hiddenOption":"ty19C2","select":"ntbzPR","invalid":"_3CzMM4"};/**
|
|
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":"akD3dQ","ad":"xcXtdE","hoc":"N3iziJ","container":"BYeWyJ","option":"_7MFXEN","selected":"CDbWAd","options":"_9-eOZo"};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,qJAAwC,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,8 +18,6 @@ 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;
|
|
23
21
|
modules?: ModuleT;
|
|
24
22
|
noRR?: boolean;
|
|
25
23
|
noReactCompiler?: boolean;
|
package/config/babel/webpack.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { localIdentNameFactory, } from '@dr.pogodin/babel-plugin-react-css-modules/utils';
|
|
2
|
+
const localIdentNameDev = localIdentNameFactory('[package]___[path][name]___[local]___[hash:base64:6]');
|
|
3
|
+
const localIdentNameProd = localIdentNameFactory('[hash:base64:6]');
|
|
1
4
|
/**
|
|
2
5
|
* Supported Babel environments.
|
|
3
6
|
*/
|
|
@@ -58,10 +61,9 @@ function newBaseConfig(options) {
|
|
|
58
61
|
* @return {object} Returns mutated config for chaining.
|
|
59
62
|
* @ignore
|
|
60
63
|
*/
|
|
61
|
-
function addStyling(config, env
|
|
64
|
+
function addStyling(config, env) {
|
|
62
65
|
const cssModulesOps = {
|
|
63
66
|
autoResolveMultipleImports: true,
|
|
64
|
-
context,
|
|
65
67
|
filetypes: {
|
|
66
68
|
'.scss': { syntax: 'postcss-scss' },
|
|
67
69
|
},
|
|
@@ -70,10 +72,10 @@ function addStyling(config, env, context) {
|
|
|
70
72
|
switch (env) {
|
|
71
73
|
case ENVIRONMENTS.DEV:
|
|
72
74
|
case ENVIRONMENTS.TEST:
|
|
73
|
-
cssModulesOps.
|
|
75
|
+
cssModulesOps.localIdentName = localIdentNameDev;
|
|
74
76
|
break;
|
|
75
77
|
case ENVIRONMENTS.PROD:
|
|
76
|
-
cssModulesOps.
|
|
78
|
+
cssModulesOps.localIdentName = localIdentNameProd;
|
|
77
79
|
break;
|
|
78
80
|
default:
|
|
79
81
|
}
|
|
@@ -92,9 +94,8 @@ function addStyling(config, env, context) {
|
|
|
92
94
|
export default function getPreset(babel, ops = {}) {
|
|
93
95
|
const env = babel.env();
|
|
94
96
|
const res = newBaseConfig(ops);
|
|
95
|
-
if (!ops.noStyling)
|
|
96
|
-
addStyling(res, env
|
|
97
|
-
}
|
|
97
|
+
if (!ops.noStyling)
|
|
98
|
+
addStyling(res, env);
|
|
98
99
|
if (env === ENVIRONMENTS.DEV && !ops.noRR) {
|
|
99
100
|
res.plugins.push('react-refresh/babel');
|
|
100
101
|
}
|
|
@@ -11,7 +11,7 @@ export type OptionsT = {
|
|
|
11
11
|
babelLoaderExclude?: RuleSetRule['exclude'];
|
|
12
12
|
babelLoaderOptions?: object;
|
|
13
13
|
context: string;
|
|
14
|
-
cssLocalIdent
|
|
14
|
+
cssLocalIdent: string;
|
|
15
15
|
dontEmitBuildInfo?: boolean;
|
|
16
16
|
dontUseProgressPlugin?: boolean;
|
|
17
17
|
entry: string | string[];
|
|
@@ -10,6 +10,7 @@ import { SitemapStream, streamToPromise } from 'sitemap';
|
|
|
10
10
|
// thus we need to import the default export, and use its fields.
|
|
11
11
|
import webpack from 'webpack';
|
|
12
12
|
import WorkboxPlugin from 'workbox-webpack-plugin';
|
|
13
|
+
import { localIdentNameFactory, } from '@dr.pogodin/babel-plugin-react-css-modules/utils';
|
|
13
14
|
const COREJS_REGEX = /\/core-js/;
|
|
14
15
|
const require = createRequire(import.meta.url);
|
|
15
16
|
/**
|
|
@@ -227,7 +228,7 @@ export default function configFactory(ops) {
|
|
|
227
228
|
module: {
|
|
228
229
|
generator: {
|
|
229
230
|
'css/module': {
|
|
230
|
-
localIdentName: o.cssLocalIdent,
|
|
231
|
+
localIdentName: localIdentNameFactory(o.cssLocalIdent),
|
|
231
232
|
},
|
|
232
233
|
},
|
|
233
234
|
parser: {
|
|
@@ -256,7 +257,6 @@ export default function configFactory(ops) {
|
|
|
256
257
|
exclude: babelLoaderExclude,
|
|
257
258
|
loader: 'babel-loader',
|
|
258
259
|
options: Object.assign({ babelrc: false, configFile: false, envName: o.babelEnv, presets: [['@dr.pogodin/react-utils/config/babel/webpack', {
|
|
259
|
-
context: o.context,
|
|
260
260
|
typescript: ops.typescript,
|
|
261
261
|
}]], sourceType: 'unambiguous' }, o.babelLoaderOptions),
|
|
262
262
|
}, {
|
|
@@ -270,14 +270,12 @@ export default function configFactory(ops) {
|
|
|
270
270
|
/* Loads SCSS stylesheets. */
|
|
271
271
|
test: /\.scss$/,
|
|
272
272
|
type: 'css/module',
|
|
273
|
-
use:
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
sourceMap: true,
|
|
278
|
-
},
|
|
273
|
+
use: {
|
|
274
|
+
loader: 'sass-loader',
|
|
275
|
+
options: {
|
|
276
|
+
sourceMap: true,
|
|
279
277
|
},
|
|
280
|
-
|
|
278
|
+
},
|
|
281
279
|
}],
|
|
282
280
|
},
|
|
283
281
|
node: {
|
|
@@ -11,7 +11,7 @@ import baseFactory from './app-base.js';
|
|
|
11
11
|
*/
|
|
12
12
|
export default function configFactory(ops) {
|
|
13
13
|
const o = defaults(clone(ops), {
|
|
14
|
-
cssLocalIdent: '[
|
|
14
|
+
cssLocalIdent: '[package]___[path][name]___[local]___[hash:base64:6]',
|
|
15
15
|
});
|
|
16
16
|
const entry = ['@dr.pogodin/react-utils/build/development/client/init'];
|
|
17
17
|
if (!o.dontUseHmr)
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @desc Production Webpack configuration for applications.
|
|
5
5
|
*/
|
|
6
6
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
7
|
+
import MinimizerPlugin from 'minimizer-webpack-plugin';
|
|
7
8
|
import webpack from 'webpack';
|
|
8
9
|
import { merge } from 'webpack-merge';
|
|
9
10
|
import baseFactory from './app-base.js';
|
|
@@ -19,6 +20,35 @@ export default function configFactory(ops) {
|
|
|
19
20
|
...Array.isArray(ops.entry) ? ops.entry : [ops.entry],
|
|
20
21
|
];
|
|
21
22
|
const res = merge(baseFactory(Object.assign(Object.assign({ babelLoaderExclude: [] }, ops), { babelEnv: 'production', babelLoaderOptions: Object.assign({ compact: true }, ops.babelLoaderOptions), entry, mode: 'production' })), {
|
|
23
|
+
optimization: {
|
|
24
|
+
minimizer: [
|
|
25
|
+
'...',
|
|
26
|
+
// TODO: This sets up (S)CSS minimization with CSS Nano minimizer
|
|
27
|
+
// (the same we relied upon in previous versions of Webpack setup);
|
|
28
|
+
// however, Webpack now includes its own, build-in CSS minimizer,
|
|
29
|
+
// and encourages to drop CSS Nano / PostCSS dependency for minimization.
|
|
30
|
+
// At the first glance, out of the box the built-in minimizer does not
|
|
31
|
+
// produce identical results (perhaps, because it does not handle .scss
|
|
32
|
+
// modules by default); because of this, and to be on the safer side,
|
|
33
|
+
// we'll keep CSS Nano in the pipeline for now, and look to get rid of
|
|
34
|
+
// it later.
|
|
35
|
+
new MinimizerPlugin({
|
|
36
|
+
minify: {
|
|
37
|
+
implementation: MinimizerPlugin.cssnanoMinify,
|
|
38
|
+
options: {
|
|
39
|
+
preset: ['default', {
|
|
40
|
+
// Due to the way our styles are organized, these dangerous
|
|
41
|
+
// optimizations can break our styles, thus they are disabled.
|
|
42
|
+
discardUnused: false,
|
|
43
|
+
reduceIdents: false,
|
|
44
|
+
zindex: false,
|
|
45
|
+
}],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
test: /\.s?css$/,
|
|
49
|
+
}),
|
|
50
|
+
],
|
|
51
|
+
},
|
|
22
52
|
plugins: [
|
|
23
53
|
new webpack.DefinePlugin({
|
|
24
54
|
'process.env.BABEL_ENV': JSON.stringify('production'),
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.57.0-alpha.
|
|
2
|
+
"version": "1.57.0-alpha.2",
|
|
3
3
|
"bin": {
|
|
4
4
|
"react-utils-build": "bin/build.js",
|
|
5
5
|
"react-utils-run-with-babel": "bin/run-with-babel.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@babel/runtime-corejs3": "^8.0.6",
|
|
13
13
|
"@commander-js/extra-typings": "^15.0.0",
|
|
14
|
-
"@dr.pogodin/babel-plugin-react-css-modules": "^8.0.0-alpha.
|
|
14
|
+
"@dr.pogodin/babel-plugin-react-css-modules": "^8.0.0-alpha.8",
|
|
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",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@babel/cli": "^8.0.6",
|
|
50
50
|
"@babel/core": "^8.0.6",
|
|
51
51
|
"@babel/plugin-transform-runtime": "^8.0.6",
|
|
52
|
-
"@babel/preset-env": "^8.0.
|
|
52
|
+
"@babel/preset-env": "^8.0.6",
|
|
53
53
|
"@babel/preset-react": "^8.0.1",
|
|
54
54
|
"@babel/preset-typescript": "^8.0.1",
|
|
55
55
|
"@babel/register": "^8.0.6",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
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.1",
|
|
64
64
|
"@testing-library/react": "^16.3.3",
|
|
65
65
|
"@testing-library/user-event": "^14.6.7",
|
|
66
66
|
"@tsconfig/recommended": "^1.0.13",
|
|
@@ -86,12 +86,15 @@
|
|
|
86
86
|
"babel-plugin-module-resolver": "^5.0.3",
|
|
87
87
|
"babel-plugin-polyfill-corejs3": "^1.0.0",
|
|
88
88
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
89
|
+
"cssnano": "^9.1.2",
|
|
89
90
|
"identity-obj-proxy": "^3.0.0",
|
|
90
91
|
"jest": "^30.5.2",
|
|
91
92
|
"jest-environment-jsdom": "^30.5.2",
|
|
92
93
|
"memfs": "^4.71.0",
|
|
94
|
+
"minimizer-webpack-plugin": "^5.12.0",
|
|
93
95
|
"mockdate": "^3.0.5",
|
|
94
96
|
"nodelist-foreach-polyfill": "^1.2.0",
|
|
97
|
+
"postcss": "^8.5.28",
|
|
95
98
|
"postcss-scss": "^4.0.9",
|
|
96
99
|
"pretty": "^2.0.0",
|
|
97
100
|
"react-refresh": "^0.18.0",
|