@gravity-ui/dynamic-forms 5.17.1 → 5.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,13 @@ exports.ColorPicker = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const unstable_1 = require("@gravity-ui/uikit/unstable");
7
+ /**
8
+ * Dynamic-forms input that renders a color picker for `StringSpec`.
9
+ *
10
+ * Wraps `unstable_ColorPicker` from `@gravity-ui/uikit/unstable`. Because the underlying
11
+ * uikit component is **unstable**, the visual appearance, available `inputProps`, and
12
+ * supported color formats may change between uikit releases.
13
+ */
7
14
  const ColorPicker = ({ input, spec, inputProps }) => {
8
15
  const { value, onChange, onBlur, onFocus } = input;
9
16
  const handleOpenChange = react_1.default.useCallback((open) => {
@@ -4,8 +4,8 @@ exports.TextContent = exports.TextContentComponent = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const uikit_1 = require("@gravity-ui/uikit");
7
- const lodash_1 = require("lodash");
8
7
  const cloneDeep_1 = tslib_1.__importDefault(require("lodash/cloneDeep"));
8
+ const isEmpty_1 = tslib_1.__importDefault(require("lodash/isEmpty"));
9
9
  const utils_1 = require("../../../utils");
10
10
  const LazyLoader_1 = require("../../LazyLoader");
11
11
  const utils_2 = require("./utils");
@@ -25,7 +25,7 @@ const TextContentComponent = ({ spec, value, Layout, }) => {
25
25
  }
26
26
  let content = react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: text } });
27
27
  if (textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.themeAlert) {
28
- const titleAlert = (textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.titleAlert) || !(0, lodash_1.isEmpty)(textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.titleAlert)
28
+ const titleAlert = (textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.titleAlert) || !(0, isEmpty_1.default)(textContentParams === null || textContentParams === void 0 ? void 0 : textContentParams.titleAlert)
29
29
  ? textContentParams.titleAlert
30
30
  : undefined;
31
31
  content = (react_1.default.createElement(uikit_1.Alert, Object.assign({}, (alertIcon || hasIconParam ? { icon: alertIcon } : {}), { message: content,
@@ -1,6 +1,21 @@
1
1
  import React from 'react';
2
2
  import { unstable_ColorPicker as ColorPickerBase } from '@gravity-ui/uikit/unstable';
3
3
  import type { StringInput } from '../../../../core';
4
+ /**
5
+ * Props forwarded to the underlying `unstable_ColorPicker` from `@gravity-ui/uikit/unstable`.
6
+ *
7
+ * NOTE: The underlying uikit component is marked as **unstable** — its API and behavior
8
+ * may change in future uikit releases without following semver. Use with that in mind.
9
+ *
10
+ * @see https://preview.gravity-ui.com/uikit/?path=/docs/lab-colorpicker--docs
11
+ */
4
12
  export interface ColorPickerProps extends Omit<React.ComponentProps<typeof ColorPickerBase>, 'value' | 'onUpdate' | 'disabled'> {
5
13
  }
14
+ /**
15
+ * Dynamic-forms input that renders a color picker for `StringSpec`.
16
+ *
17
+ * Wraps `unstable_ColorPicker` from `@gravity-ui/uikit/unstable`. Because the underlying
18
+ * uikit component is **unstable**, the visual appearance, available `inputProps`, and
19
+ * supported color formats may change between uikit releases.
20
+ */
6
21
  export declare const ColorPicker: StringInput<ColorPickerProps>;
@@ -1,5 +1,12 @@
1
1
  import React from 'react';
2
2
  import { unstable_ColorPicker as ColorPickerBase } from '@gravity-ui/uikit/unstable';
3
+ /**
4
+ * Dynamic-forms input that renders a color picker for `StringSpec`.
5
+ *
6
+ * Wraps `unstable_ColorPicker` from `@gravity-ui/uikit/unstable`. Because the underlying
7
+ * uikit component is **unstable**, the visual appearance, available `inputProps`, and
8
+ * supported color formats may change between uikit releases.
9
+ */
3
10
  export const ColorPicker = ({ input, spec, inputProps }) => {
4
11
  const { value, onChange, onBlur, onFocus } = input;
5
12
  const handleOpenChange = React.useCallback((open) => {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Alert, Label, Text } from '@gravity-ui/uikit';
3
- import { isEmpty } from 'lodash';
4
3
  import cloneDeep from 'lodash/cloneDeep';
4
+ import isEmpty from 'lodash/isEmpty';
5
5
  import { block } from '../../../utils';
6
6
  import { LazyLoader } from '../../LazyLoader';
7
7
  import { isAlertView, loadIcon } from './utils';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/dynamic-forms",
3
- "version": "5.17.1",
3
+ "version": "5.18.0",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "main": "build/cjs/index.js",
@@ -80,7 +80,7 @@
80
80
  "@types/react-is": "^17.0.3",
81
81
  "@types/uuid": "^9.0.4",
82
82
  "@vitejs/plugin-react": "^4.2.0",
83
- "ajv": "^8.17.1",
83
+ "ajv": "^8.20.0",
84
84
  "css-loader": "^5.2.6",
85
85
  "eslint": "^8.49.0",
86
86
  "final-form": "^4.20.2",