@uniformdev/mesh-sdk-react 19.186.4-alpha.3 → 19.187.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
- import React__default, { SVGProps, ReactNode, MutableRefObject, ComponentType, PropsWithChildren, HTMLAttributes, AnchorHTMLAttributes } from 'react';
3
+ import React__default, { SVGProps, ReactNode, MutableRefObject, ComponentType, PropsWithChildren, HTMLAttributes, AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react';
4
4
  import { TDate } from 'timeago.js';
5
5
  import * as _emotion_react from '@emotion/react';
6
6
  import { Interpolation, Theme, SerializedStyles } from '@emotion/react';
@@ -1997,12 +1997,14 @@ type FilterButtonProps = {
1997
1997
  hasSelectedValue?: boolean;
1998
1998
  /** sets the data-testid attribute on the button */
1999
1999
  dataTestId?: string;
2000
- } & HTMLAttributes<HTMLButtonElement>;
2000
+ /** sets whether to show the dropdown icon, we do not recommend using this option when filterCount is enabled */
2001
+ showDropdownIcon?: boolean;
2002
+ } & ButtonHTMLAttributes<HTMLButtonElement>;
2001
2003
  /**
2002
2004
  * @deprecated beta - A filter button component used to display filter menu options
2003
2005
  * @example <FilterButton text="Filters" filterCount={3} />
2004
2006
  */
2005
- declare const FilterButton: ({ text, icon, filterCount, hasSelectedValue, dataTestId, ...props }: FilterButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
2007
+ declare const FilterButton: ({ text, icon, filterCount, hasSelectedValue, dataTestId, showDropdownIcon, ...props }: FilterButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
2006
2008
 
2007
2009
  /**
2008
2010
  * @deprecated beta - Default filter controls for search and filter
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
2
2
  import * as React$1 from 'react';
3
- import React__default, { SVGProps, ReactNode, MutableRefObject, ComponentType, PropsWithChildren, HTMLAttributes, AnchorHTMLAttributes } from 'react';
3
+ import React__default, { SVGProps, ReactNode, MutableRefObject, ComponentType, PropsWithChildren, HTMLAttributes, AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react';
4
4
  import { TDate } from 'timeago.js';
5
5
  import * as _emotion_react from '@emotion/react';
6
6
  import { Interpolation, Theme, SerializedStyles } from '@emotion/react';
@@ -1997,12 +1997,14 @@ type FilterButtonProps = {
1997
1997
  hasSelectedValue?: boolean;
1998
1998
  /** sets the data-testid attribute on the button */
1999
1999
  dataTestId?: string;
2000
- } & HTMLAttributes<HTMLButtonElement>;
2000
+ /** sets whether to show the dropdown icon, we do not recommend using this option when filterCount is enabled */
2001
+ showDropdownIcon?: boolean;
2002
+ } & ButtonHTMLAttributes<HTMLButtonElement>;
2001
2003
  /**
2002
2004
  * @deprecated beta - A filter button component used to display filter menu options
2003
2005
  * @example <FilterButton text="Filters" filterCount={3} />
2004
2006
  */
2005
- declare const FilterButton: ({ text, icon, filterCount, hasSelectedValue, dataTestId, ...props }: FilterButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
2007
+ declare const FilterButton: ({ text, icon, filterCount, hasSelectedValue, dataTestId, showDropdownIcon, ...props }: FilterButtonProps) => _emotion_react_jsx_runtime.JSX.Element;
2006
2008
 
2007
2009
  /**
2008
2010
  * @deprecated beta - Default filter controls for search and filter
package/dist/index.esm.js CHANGED
@@ -2813,7 +2813,9 @@ function serializeVariablesEditorState(editorState) {
2813
2813
  }
2814
2814
  function serializeVariablesEditorSerializedState(serializedEditorState) {
2815
2815
  const buf = [];
2816
- serializeRecursive(serializedEditorState, buf);
2816
+ if (serializedEditorState) {
2817
+ serializeRecursive(serializedEditorState, buf);
2818
+ }
2817
2819
  const result = buf.join("");
2818
2820
  return result.length > 0 ? result : void 0;
2819
2821
  }
@@ -2829,6 +2831,9 @@ function serializeRecursive(node, buffer) {
2829
2831
  }
2830
2832
  if ("children" in node && node.children) {
2831
2833
  for (const child of node.children) {
2834
+ if (!child) {
2835
+ continue;
2836
+ }
2832
2837
  serializeRecursive(child, buffer);
2833
2838
  }
2834
2839
  }
@@ -8575,6 +8580,16 @@ var SearchAndFilterButtonGroup = css38`
8575
8580
  margin-top: var(--spacing-xs);
8576
8581
  margin-left: calc(56px + var(--spacing-md));
8577
8582
  `;
8583
+ var SearchAndFilterAdditionalContainer = css38`
8584
+ align-items: center;
8585
+ border-top: 1px solid var(--gray-300);
8586
+ display: flex;
8587
+ flex-wrap: nowrap;
8588
+ gap: var(--spacing-base);
8589
+ padding: var(--spacing-base) var(--spacing-md) 0;
8590
+ position: relative;
8591
+ z-index: 0;
8592
+ `;
8578
8593
 
8579
8594
  // src/components/SearchAndFilter/FilterButton.tsx
8580
8595
  import { jsx as jsx81, jsxs as jsxs44 } from "@emotion/react/jsx-runtime";
@@ -8584,6 +8599,7 @@ var FilterButton2 = ({
8584
8599
  filterCount,
8585
8600
  hasSelectedValue,
8586
8601
  dataTestId,
8602
+ showDropdownIcon,
8587
8603
  ...props
8588
8604
  }) => {
8589
8605
  return /* @__PURE__ */ jsxs44(
@@ -8600,7 +8616,8 @@ var FilterButton2 = ({
8600
8616
  children: [
8601
8617
  /* @__PURE__ */ jsx81(Icon6, { icon, iconColor: "currentColor", size: "1rem" }),
8602
8618
  /* @__PURE__ */ jsx81("span", { css: FilterButtonText, children: text }),
8603
- filterCount ? /* @__PURE__ */ jsx81(Counter2, { count: filterCount, bgColor: "var(--white)" }) : null
8619
+ filterCount ? /* @__PURE__ */ jsx81(Counter2, { count: filterCount, bgColor: "var(--white)" }) : null,
8620
+ showDropdownIcon ? /* @__PURE__ */ jsx81(Icon6, { icon: "chevron-down", iconColor: "currentColor", size: "1rem" }) : null
8604
8621
  ]
8605
8622
  }
8606
8623
  );
@@ -9085,7 +9102,7 @@ var SearchAndFilterOptionsContainer2 = ({
9085
9102
  children: buttonRow
9086
9103
  }
9087
9104
  ) : null,
9088
- additionalFiltersContainer ? /* @__PURE__ */ jsx86("div", { children: additionalFiltersContainer }) : null
9105
+ additionalFiltersContainer ? /* @__PURE__ */ jsx86("div", { css: SearchAndFilterAdditionalContainer, children: additionalFiltersContainer }) : null
9089
9106
  ] });
9090
9107
  };
9091
9108
  var FilterMenu = ({
@@ -9669,13 +9686,9 @@ var SearchAndFilterButtonGroup2 = css39`
9669
9686
  `;
9670
9687
  var SortFilterWrapper = (hiddenLocaleInput) => css39`
9671
9688
  align-items: center;
9672
- border-top: 1px solid var(--gray-300);
9673
9689
  display: flex;
9674
- flex-wrap: wrap;
9675
9690
  gap: var(--spacing-base);
9676
- padding: var(--spacing-base) var(--spacing-md) 0;
9677
- position: relative;
9678
- z-index: 0;
9691
+ flex-grow: 1;
9679
9692
 
9680
9693
  ${cq2("420px")} {
9681
9694
  display: grid;
package/dist/index.js CHANGED
@@ -3055,7 +3055,9 @@ function serializeVariablesEditorState(editorState) {
3055
3055
  }
3056
3056
  function serializeVariablesEditorSerializedState(serializedEditorState) {
3057
3057
  const buf = [];
3058
- serializeRecursive(serializedEditorState, buf);
3058
+ if (serializedEditorState) {
3059
+ serializeRecursive(serializedEditorState, buf);
3060
+ }
3059
3061
  const result = buf.join("");
3060
3062
  return result.length > 0 ? result : void 0;
3061
3063
  }
@@ -3071,6 +3073,9 @@ function serializeRecursive(node, buffer) {
3071
3073
  }
3072
3074
  if ("children" in node && node.children) {
3073
3075
  for (const child of node.children) {
3076
+ if (!child) {
3077
+ continue;
3078
+ }
3074
3079
  serializeRecursive(child, buffer);
3075
3080
  }
3076
3081
  }
@@ -8715,6 +8720,16 @@ var SearchAndFilterButtonGroup = import_react86.css`
8715
8720
  margin-top: var(--spacing-xs);
8716
8721
  margin-left: calc(56px + var(--spacing-md));
8717
8722
  `;
8723
+ var SearchAndFilterAdditionalContainer = import_react86.css`
8724
+ align-items: center;
8725
+ border-top: 1px solid var(--gray-300);
8726
+ display: flex;
8727
+ flex-wrap: nowrap;
8728
+ gap: var(--spacing-base);
8729
+ padding: var(--spacing-base) var(--spacing-md) 0;
8730
+ position: relative;
8731
+ z-index: 0;
8732
+ `;
8718
8733
 
8719
8734
  // src/components/SearchAndFilter/FilterButton.tsx
8720
8735
  var import_jsx_runtime81 = require("@emotion/react/jsx-runtime");
@@ -8724,6 +8739,7 @@ var FilterButton2 = ({
8724
8739
  filterCount,
8725
8740
  hasSelectedValue,
8726
8741
  dataTestId,
8742
+ showDropdownIcon,
8727
8743
  ...props
8728
8744
  }) => {
8729
8745
  return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
@@ -8740,7 +8756,8 @@ var FilterButton2 = ({
8740
8756
  children: [
8741
8757
  /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_design_system54.Icon, { icon, iconColor: "currentColor", size: "1rem" }),
8742
8758
  /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { css: FilterButtonText, children: text }),
8743
- filterCount ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_design_system54.Counter, { count: filterCount, bgColor: "var(--white)" }) : null
8759
+ filterCount ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_design_system54.Counter, { count: filterCount, bgColor: "var(--white)" }) : null,
8760
+ showDropdownIcon ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_design_system54.Icon, { icon: "chevron-down", iconColor: "currentColor", size: "1rem" }) : null
8744
8761
  ]
8745
8762
  }
8746
8763
  );
@@ -9217,7 +9234,7 @@ var SearchAndFilterOptionsContainer2 = ({
9217
9234
  children: buttonRow
9218
9235
  }
9219
9236
  ) : null,
9220
- additionalFiltersContainer ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children: additionalFiltersContainer }) : null
9237
+ additionalFiltersContainer ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { css: SearchAndFilterAdditionalContainer, children: additionalFiltersContainer }) : null
9221
9238
  ] });
9222
9239
  };
9223
9240
  var FilterMenu = ({
@@ -9801,13 +9818,9 @@ var SearchAndFilterButtonGroup2 = import_react92.css`
9801
9818
  `;
9802
9819
  var SortFilterWrapper = (hiddenLocaleInput) => import_react92.css`
9803
9820
  align-items: center;
9804
- border-top: 1px solid var(--gray-300);
9805
9821
  display: flex;
9806
- flex-wrap: wrap;
9807
9822
  gap: var(--spacing-base);
9808
- padding: var(--spacing-base) var(--spacing-md) 0;
9809
- position: relative;
9810
- z-index: 0;
9823
+ flex-grow: 1;
9811
9824
 
9812
9825
  ${(0, import_design_system63.cq)("420px")} {
9813
9826
  display: grid;
package/dist/index.mjs CHANGED
@@ -2813,7 +2813,9 @@ function serializeVariablesEditorState(editorState) {
2813
2813
  }
2814
2814
  function serializeVariablesEditorSerializedState(serializedEditorState) {
2815
2815
  const buf = [];
2816
- serializeRecursive(serializedEditorState, buf);
2816
+ if (serializedEditorState) {
2817
+ serializeRecursive(serializedEditorState, buf);
2818
+ }
2817
2819
  const result = buf.join("");
2818
2820
  return result.length > 0 ? result : void 0;
2819
2821
  }
@@ -2829,6 +2831,9 @@ function serializeRecursive(node, buffer) {
2829
2831
  }
2830
2832
  if ("children" in node && node.children) {
2831
2833
  for (const child of node.children) {
2834
+ if (!child) {
2835
+ continue;
2836
+ }
2832
2837
  serializeRecursive(child, buffer);
2833
2838
  }
2834
2839
  }
@@ -8575,6 +8580,16 @@ var SearchAndFilterButtonGroup = css38`
8575
8580
  margin-top: var(--spacing-xs);
8576
8581
  margin-left: calc(56px + var(--spacing-md));
8577
8582
  `;
8583
+ var SearchAndFilterAdditionalContainer = css38`
8584
+ align-items: center;
8585
+ border-top: 1px solid var(--gray-300);
8586
+ display: flex;
8587
+ flex-wrap: nowrap;
8588
+ gap: var(--spacing-base);
8589
+ padding: var(--spacing-base) var(--spacing-md) 0;
8590
+ position: relative;
8591
+ z-index: 0;
8592
+ `;
8578
8593
 
8579
8594
  // src/components/SearchAndFilter/FilterButton.tsx
8580
8595
  import { jsx as jsx81, jsxs as jsxs44 } from "@emotion/react/jsx-runtime";
@@ -8584,6 +8599,7 @@ var FilterButton2 = ({
8584
8599
  filterCount,
8585
8600
  hasSelectedValue,
8586
8601
  dataTestId,
8602
+ showDropdownIcon,
8587
8603
  ...props
8588
8604
  }) => {
8589
8605
  return /* @__PURE__ */ jsxs44(
@@ -8600,7 +8616,8 @@ var FilterButton2 = ({
8600
8616
  children: [
8601
8617
  /* @__PURE__ */ jsx81(Icon6, { icon, iconColor: "currentColor", size: "1rem" }),
8602
8618
  /* @__PURE__ */ jsx81("span", { css: FilterButtonText, children: text }),
8603
- filterCount ? /* @__PURE__ */ jsx81(Counter2, { count: filterCount, bgColor: "var(--white)" }) : null
8619
+ filterCount ? /* @__PURE__ */ jsx81(Counter2, { count: filterCount, bgColor: "var(--white)" }) : null,
8620
+ showDropdownIcon ? /* @__PURE__ */ jsx81(Icon6, { icon: "chevron-down", iconColor: "currentColor", size: "1rem" }) : null
8604
8621
  ]
8605
8622
  }
8606
8623
  );
@@ -9085,7 +9102,7 @@ var SearchAndFilterOptionsContainer2 = ({
9085
9102
  children: buttonRow
9086
9103
  }
9087
9104
  ) : null,
9088
- additionalFiltersContainer ? /* @__PURE__ */ jsx86("div", { children: additionalFiltersContainer }) : null
9105
+ additionalFiltersContainer ? /* @__PURE__ */ jsx86("div", { css: SearchAndFilterAdditionalContainer, children: additionalFiltersContainer }) : null
9089
9106
  ] });
9090
9107
  };
9091
9108
  var FilterMenu = ({
@@ -9669,13 +9686,9 @@ var SearchAndFilterButtonGroup2 = css39`
9669
9686
  `;
9670
9687
  var SortFilterWrapper = (hiddenLocaleInput) => css39`
9671
9688
  align-items: center;
9672
- border-top: 1px solid var(--gray-300);
9673
9689
  display: flex;
9674
- flex-wrap: wrap;
9675
9690
  gap: var(--spacing-base);
9676
- padding: var(--spacing-base) var(--spacing-md) 0;
9677
- position: relative;
9678
- z-index: 0;
9691
+ flex-grow: 1;
9679
9692
 
9680
9693
  ${cq2("420px")} {
9681
9694
  display: grid;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/mesh-sdk-react",
3
- "version": "19.186.4-alpha.3+59de2f77b6",
3
+ "version": "19.187.0",
4
4
  "description": "Uniform Mesh Framework SDK for React",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -50,10 +50,10 @@
50
50
  "@lexical/selection": "0.17.1",
51
51
  "@lexical/utils": "0.17.1",
52
52
  "@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v5.2.1/react-icons-all-files-5.2.1.tgz",
53
- "@uniformdev/canvas": "19.186.4-alpha.3+59de2f77b6",
54
- "@uniformdev/design-system": "19.186.4-alpha.3+59de2f77b6",
55
- "@uniformdev/mesh-sdk": "19.186.4-alpha.3+59de2f77b6",
56
- "@uniformdev/richtext": "19.186.4-alpha.3+59de2f77b6",
53
+ "@uniformdev/canvas": "19.187.0",
54
+ "@uniformdev/design-system": "19.187.0",
55
+ "@uniformdev/mesh-sdk": "19.187.0",
56
+ "@uniformdev/richtext": "19.187.0",
57
57
  "dequal": "^2.0.3",
58
58
  "lexical": "0.17.1",
59
59
  "mitt": "3.0.1",
@@ -87,5 +87,5 @@
87
87
  "publishConfig": {
88
88
  "access": "public"
89
89
  },
90
- "gitHead": "59de2f77b6270e36c6a5e95b0bd6b1756c4dcdf0"
90
+ "gitHead": "9ccfdb652e2d67d66fe90e2df1845c3c2e3bee8b"
91
91
  }