@synerise/ds-subtle-form 2.1.0 → 2.1.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 CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.1.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-subtle-form@2.1.1...@synerise/ds-subtle-form@2.1.2) (2026-09-18)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-subtle-form
9
+
10
+
11
+
12
+
13
+
14
+ ## [2.1.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-subtle-form@2.1.0...@synerise/ds-subtle-form@2.1.1) (2026-09-16)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-subtle-form
17
+
6
18
  # [2.1.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-subtle-form@2.0.4...@synerise/ds-subtle-form@2.1.0) (2026-09-10)
7
19
 
8
20
  ### Features
@@ -42,7 +42,7 @@ const SubtleDatePicker = ({
42
42
  }), [showTime, valueFormatOptions]);
43
43
  const formatDisplayValue = useCallback((val) => val ? formatValue(val, displayOptions) : "", [formatValue, displayOptions]);
44
44
  const getDisplayText = useCallback(() => {
45
- return value && !!String(value).trim() ? formatDisplayValue(value) : placeholder;
45
+ return value && String(value).trim() ? formatDisplayValue(value) : placeholder;
46
46
  }, [value, placeholder, formatDisplayValue]);
47
47
  const maskSample = useMemo(() => formatDisplayValue(new Date(2026, 10, 22, 22, 22)), [formatDisplayValue]);
48
48
  useEffect(() => {
@@ -44,7 +44,7 @@ const SubtleInput = ({
44
44
  margin: 0,
45
45
  paddingRight: suffix ? "28px" : "12px"
46
46
  }, placeholder, error, errorText, ...rest, ...inputProps }) : /* @__PURE__ */ jsxs(Inactive, { onClick: !disabled ? handleActivate : void 0, $blurred: blurred, $disabled: disabled, children: [
47
- /* @__PURE__ */ jsx(MainContent, { children: value && !!value.trim() ? value : placeholder }),
47
+ /* @__PURE__ */ jsx(MainContent, { children: value && value.trim() ? value : placeholder }),
48
48
  suffix && /* @__PURE__ */ jsx(Suffix, { children: /* @__PURE__ */ jsx(Tooltip, { title: suffixTooltip, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(EditS, {}), color: theme.palette["grey-600"] }) }) })
49
49
  ] }) }) }) });
50
50
  };
@@ -33,7 +33,7 @@ const SubtleSelect = ({
33
33
  }, []);
34
34
  const theme = useTheme();
35
35
  return /* @__PURE__ */ jsx(Subtle, { className: "ds-subtle-form", $disabled: disabled, children: /* @__PURE__ */ jsx(SubtleFormField, { $active: active, label, tooltip: labelTooltip, children: /* @__PURE__ */ jsx(SelectContainer, { ref: containerRef, className: "ds-subtle-select", active, children: active && !blurred || hasError ? /* @__PURE__ */ jsx(Select, { disabled, autoFocus: !hasError, size: "middle", onBlur: handleDeactivate, value, placeholder, errorText, error, defaultOpen: !hasError, ...rest, children }) : /* @__PURE__ */ jsxs(Inactive, { className: "inactive-content", onClick: !disabled ? handleActivate : void 0, $blurred: blurred, $disabled: disabled, children: [
36
- /* @__PURE__ */ jsx(MainContent, { className: "main-content", hasMargin: true, children: /* @__PURE__ */ jsx(Fragment, { children: value && !!String(value).trim() ? value : placeholder }) }),
36
+ /* @__PURE__ */ jsx(MainContent, { className: "main-content", hasMargin: true, children: /* @__PURE__ */ jsx(Fragment, { children: value && String(value).trim() ? value : placeholder }) }),
37
37
  !active && !disabled && suffix && /* @__PURE__ */ jsx(Suffix, { select: true, children: /* @__PURE__ */ jsx(Tooltip, { title: suffixTooltip, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(AngleDownS, {}), color: theme.palette["grey-600"] }) }) })
38
38
  ] }) }) }) });
39
39
  };
@@ -37,7 +37,7 @@ const SubtleTextArea = ({
37
37
  const hasError = error || !!errorText;
38
38
  const calculateTextHeight = useCallback(() => {
39
39
  let textHeight = 0;
40
- if (!!value && !!containerRef.current) {
40
+ if (value && containerRef.current) {
41
41
  const {
42
42
  height
43
43
  } = calculateSize(value, {
@@ -57,7 +57,7 @@ const SubtleTextArea = ({
57
57
  setVisibleRows(minRows);
58
58
  return;
59
59
  }
60
- if (lines && !!maxRows && lines > maxRows) {
60
+ if (lines && maxRows && lines > maxRows) {
61
61
  setVisibleRows(maxRows);
62
62
  return;
63
63
  }
@@ -107,7 +107,7 @@ const SubtleTextArea = ({
107
107
  }, placeholder, error, errorText, wrapperStyle: {
108
108
  margin: 0
109
109
  }, ...rest, ...textAreaProps }) : /* @__PURE__ */ jsxs(Inactive, { $rows: visibleRows, onClick: !disabled ? handleActivate : void 0, $blurred: blurred, $disabled: disabled, isSuffixVisible: suffix, children: [
110
- /* @__PURE__ */ jsx(MainContent, { breakWord: true, children: /* @__PURE__ */ jsx(ValueArea, { disabled, value: value && !!value.trim() ? value : placeholder, onBlur: !disabled ? handleDeactivate : void 0, isPlaceholder: !value && !!placeholder }) }),
110
+ /* @__PURE__ */ jsx(MainContent, { breakWord: true, children: /* @__PURE__ */ jsx(ValueArea, { disabled, value: value && value.trim() ? value : placeholder, onBlur: !disabled ? handleDeactivate : void 0, isPlaceholder: !value && !!placeholder }) }),
111
111
  suffix && /* @__PURE__ */ jsx(Suffix, { children: /* @__PURE__ */ jsx(Tooltip, { title: suffixTooltip, children: /* @__PURE__ */ jsx(Icon, { component: /* @__PURE__ */ jsx(EditS, {}), color: theme.palette["grey-600"] }) }) })
112
112
  ] }) }) }) });
113
113
  };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { default } from './SubtleForm';
2
1
  export type { SubtleTextAreaProps } from './Elements/TextArea/TextArea.types';
2
+ export { default } from './SubtleForm';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-subtle-form",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "SubtleForm UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -42,13 +42,13 @@
42
42
  ],
43
43
  "types": "dist/index.d.ts",
44
44
  "dependencies": {
45
- "@synerise/ds-date-picker": "^2.1.0",
46
- "@synerise/ds-form-field": "^2.0.2",
47
- "@synerise/ds-icon": "^2.1.0",
48
- "@synerise/ds-input": "^2.0.3",
49
- "@synerise/ds-select": "^2.0.4",
50
- "@synerise/ds-tooltip": "^2.0.2",
51
- "@synerise/ds-utils": "^2.0.0",
45
+ "@synerise/ds-date-picker": "^2.1.2",
46
+ "@synerise/ds-form-field": "^2.0.4",
47
+ "@synerise/ds-icon": "^2.1.2",
48
+ "@synerise/ds-input": "^2.0.5",
49
+ "@synerise/ds-select": "^2.1.1",
50
+ "@synerise/ds-tooltip": "^2.0.4",
51
+ "@synerise/ds-utils": "^2.1.1",
52
52
  "calculate-size": "^1.1.1"
53
53
  },
54
54
  "peerDependencies": {
@@ -57,5 +57,5 @@
57
57
  "styled-components": "^5.3.3",
58
58
  "vitest": "4"
59
59
  },
60
- "gitHead": "a49acd96b6f71f5617548ae5ce6126cb9b0985dc"
60
+ "gitHead": "b1d905617dfb186b5d80966d63ce55bf29df743d"
61
61
  }