@preply/ds-web-lib 2.3.0 → 2.4.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.
Files changed (78) hide show
  1. package/dist/assets/AlertDialog.css +2 -2
  2. package/dist/assets/Avatar.css +3 -3
  3. package/dist/assets/AvatarWithStatus.css +2 -2
  4. package/dist/assets/Badge.css +1 -1
  5. package/dist/assets/Box.css +3 -3
  6. package/dist/assets/Button.css +4 -4
  7. package/dist/assets/ButtonBase.css +4 -4
  8. package/dist/assets/Checkbox.css +2 -2
  9. package/dist/assets/Chips.css +2 -2
  10. package/dist/assets/Dialog.css +3 -3
  11. package/dist/assets/FieldAdditionalText.css +3 -3
  12. package/dist/assets/FieldButton.css +3 -3
  13. package/dist/assets/FieldLabel.css +3 -3
  14. package/dist/assets/FieldLayout.css +4 -4
  15. package/dist/assets/FieldLayoutBase.css +1 -1
  16. package/dist/assets/Heading.css +3 -3
  17. package/dist/assets/Icon.css +3 -3
  18. package/dist/assets/LayoutFlex.css +1 -1
  19. package/dist/assets/LayoutFlexItem.css +1 -1
  20. package/dist/assets/Link.css +3 -3
  21. package/dist/assets/Loader.css +1 -1
  22. package/dist/assets/OnboardingTooltip.css +1 -1
  23. package/dist/assets/OnboardingTour.css +1 -1
  24. package/dist/assets/PreplyLogo.css +1 -1
  25. package/dist/assets/ProgressBar.css +1 -1
  26. package/dist/assets/ProgressSteps.css +1 -1
  27. package/dist/assets/SelectFieldLayout.css +4 -4
  28. package/dist/assets/Spinner.css +3 -3
  29. package/dist/assets/Steps.css +1 -1
  30. package/dist/assets/Text.css +3 -3
  31. package/dist/assets/TextHighlighted.css +3 -3
  32. package/dist/assets/TextInline.css +3 -3
  33. package/dist/assets/Toast.css +2 -2
  34. package/dist/assets/Tooltip.css +1 -1
  35. package/dist/assets/align-self.css +1 -1
  36. package/dist/assets/color.css +2 -2
  37. package/dist/assets/exp-color.css +2 -2
  38. package/dist/assets/index.css +3 -3
  39. package/dist/assets/layout-gap.css +3 -3
  40. package/dist/assets/layout-grid.css +3 -3
  41. package/dist/assets/layout-hide.css +1 -1
  42. package/dist/assets/layout-padding.css +3 -3
  43. package/dist/assets/layout-relative.css +1 -1
  44. package/dist/assets/text-accent.css +2 -2
  45. package/dist/assets/text-centered.css +1 -1
  46. package/dist/assets/text-weight.css +2 -2
  47. package/dist/components/Avatar/Avatar.d.ts.map +1 -1
  48. package/dist/components/Avatar/Avatar.js +3 -3
  49. package/dist/components/AvatarWithStatus/AvatarWithStatus.d.ts.map +1 -1
  50. package/dist/components/AvatarWithStatus/AvatarWithStatus.js +3 -3
  51. package/dist/components/Badge/Badge.js +3 -3
  52. package/dist/components/Box/Box.js +3 -3
  53. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  54. package/dist/components/Checkbox/Checkbox.js +2 -2
  55. package/dist/components/Chips/Chips.js +3 -3
  56. package/dist/components/FieldButton/FieldButton.js +3 -3
  57. package/dist/components/Heading/Heading.js +3 -3
  58. package/dist/components/Icon/Icon.d.ts.map +1 -1
  59. package/dist/components/Icon/Icon.js +3 -3
  60. package/dist/components/LayoutFlex/LayoutFlex.js +3 -3
  61. package/dist/components/LayoutFlexItem/LayoutFlexItem.d.ts.map +1 -1
  62. package/dist/components/LayoutFlexItem/LayoutFlexItem.js +3 -3
  63. package/dist/components/LayoutGrid/LayoutGrid.js +5 -5
  64. package/dist/components/LayoutGridItem/LayoutGridItem.js +3 -3
  65. package/dist/components/Link/Link.js +3 -3
  66. package/dist/components/Loader/Loader.js +3 -3
  67. package/dist/components/PreplyLogo/PreplyLogo.d.ts.map +1 -1
  68. package/dist/components/PreplyLogo/PreplyLogo.js +3 -3
  69. package/dist/components/Text/Text.js +3 -3
  70. package/dist/components/TextHighlighted/TextHighlighted.js +3 -3
  71. package/dist/components/TextInline/TextInline.js +3 -3
  72. package/dist/components/private/ButtonBase/ButtonBase.js +3 -3
  73. package/dist/utils/{filterHTMLAttributes.d.ts → filterAttributesPassedByRadixUIAtRuntime.d.ts} +3 -2
  74. package/dist/utils/filterAttributesPassedByRadixUIAtRuntime.d.ts.map +1 -0
  75. package/dist/utils/filterAttributesPassedByRadixUIAtRuntime.js +26 -0
  76. package/package.json +13 -13
  77. package/dist/utils/filterHTMLAttributes.d.ts.map +0 -1
  78. package/dist/utils/filterHTMLAttributes.js +0 -8
@@ -2,7 +2,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
3
3
  import { getDatasetProps } from "@preply/ds-web-core";
4
4
  import { forwardRef } from "react";
5
- import { filterHTMLAttributes } from "../../utils/filterHTMLAttributes.js";
5
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
6
6
  import { Icon } from "../Icon/Icon.js";
7
7
  import '../../assets/Badge.css';const badge = "badge__Aj95L";
8
8
  const styles = {
@@ -28,7 +28,7 @@ const Badge = forwardRef(function BadgeComponent({
28
28
  children,
29
29
  accent,
30
30
  inverted,
31
- ...restProps
31
+ ...restPropsPassedByRadixUI
32
32
  }, ref) {
33
33
  const size = getActualSize(sizeProp);
34
34
  const dataset = {
@@ -42,7 +42,7 @@ const Badge = forwardRef(function BadgeComponent({
42
42
  dataset.inverted = !!inverted;
43
43
  }
44
44
  const props = {
45
- ...filterHTMLAttributes(restProps),
45
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
46
46
  ref,
47
47
  className: styles.badge,
48
48
  ...getDatasetProps(dataset, {
@@ -3,7 +3,7 @@ import { BOX_RADIUS_DEFAULT, LAYOUT_TAG_DEFAULT, BOX_PADDING_DEFAULT } from "@pr
3
3
  import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
4
4
  import { moduleClassNames, stringClassNames, getDatasetProps } from "@preply/ds-web-core";
5
5
  import { forwardRef } from "react";
6
- import { filterHTMLAttributes } from "../../utils/filterHTMLAttributes.js";
6
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
7
7
  import { getLayoutPaddingClassnames } from "../../shared-styles/layout-padding/layout-padding.js";
8
8
  import '../../assets/Box.css';const Box$1 = "Box__sKgFi";
9
9
  const styles = {
@@ -165,14 +165,14 @@ const Box = forwardRef(function BoxComponent({
165
165
  padding = BOX_PADDING_DEFAULT,
166
166
  tag,
167
167
  dataset,
168
- ...restProps
168
+ ...restPropsPassedByRadixUI
169
169
  }, ref) {
170
170
  const classNames = moduleClassNames(styles, webComponentNames.Box, [stringClassNames("box-radius", radius), stringClassNames("background", background)]);
171
171
  const paddingClassNames = getLayoutPaddingClassnames(padding);
172
172
  const Tag = tag != null ? tag : LAYOUT_TAG_DEFAULT;
173
173
  const allClassNames = [...classNames, ...paddingClassNames];
174
174
  const props = {
175
- ...filterHTMLAttributes(restProps),
175
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
176
176
  ref,
177
177
  className: allClassNames.join(" "),
178
178
  ...getDatasetProps(dataset, {
@@ -46,7 +46,7 @@ export type CheckboxProps = Pick<InputHTMLAttributes<HTMLInputElement>, 'id' | '
46
46
  *
47
47
  * It is uncontrolled by default, and can be manually controlled via the `checked` prop.
48
48
  */
49
- export declare const Checkbox: React.ForwardRefExoticComponent<Pick<React.InputHTMLAttributes<HTMLInputElement>, "disabled" | "aria-describedby" | "onFocus" | "onBlur" | "id" | "defaultChecked" | "aria-label" | "aria-labelledby" | "onChange" | "name" | "checked" | "required"> & {
49
+ export declare const Checkbox: React.ForwardRefExoticComponent<Pick<React.InputHTMLAttributes<HTMLInputElement>, "disabled" | "defaultChecked" | "id" | "aria-describedby" | "aria-label" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "name" | "checked" | "required"> & {
50
50
  /**
51
51
  * Shows the component's error state, and sets `aria-invalid="true"` on the input element.
52
52
  */
@@ -5,7 +5,7 @@ import { forwardRef } from "react";
5
5
  import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
6
6
  import { moduleClassNames, stringClassNames, getDatasetProps } from "@preply/ds-web-core";
7
7
  import { renderIcon } from "../../utils/render-icon.js";
8
- import { filterHTMLAttributes } from "../../utils/filterHTMLAttributes.js";
8
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
9
9
  import { useIndeterminate } from "./hooks/useIndeterminate.js";
10
10
  import '../../assets/Checkbox.css';const SvgRemove = ({
11
11
  title,
@@ -60,7 +60,7 @@ const Checkbox = forwardRef(function Checkbox2({
60
60
  onCheckedChange
61
61
  });
62
62
  const classNames = moduleClassNames(styles, "checkbox", [stringClassNames(`dsInternalSimulation`, dsInternalSimulation)]);
63
- return /* @__PURE__ */ jsxs("div", { ...filterHTMLAttributes(restPropsPassedByRadixUI), className: classNames.join(" "), "data-preply-ds-component": webComponentNames.Checkbox, children: [
63
+ return /* @__PURE__ */ jsxs("div", { ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI), className: classNames.join(" "), "data-preply-ds-component": webComponentNames.Checkbox, children: [
64
64
  /* @__PURE__ */ jsx("input", { id, name, type: "checkbox", required, disabled, checked, defaultChecked, "aria-checked": ariaChecked, "aria-invalid": hasError === true ? true : void 0, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, onChange: onChangeHandler, ref: mergedRef, onBlur, onFocus, ...getDatasetProps(dataset) }),
65
65
  renderIcon(ForwardRef, {
66
66
  focusable: "false",
@@ -5,7 +5,7 @@ import { getDatasetProps } from "@preply/ds-web-core";
5
5
  import * as React from "react";
6
6
  import { forwardRef } from "react";
7
7
  import { Icon } from "../Icon/Icon.js";
8
- import { filterHTMLAttributes } from "../../utils/filterHTMLAttributes.js";
8
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
9
9
  import { useIntl } from "react-intl";
10
10
  import { genericAriaLabels } from "../../utils/shared-strings.js";
11
11
  import '../../assets/Chips.css';const chips = "chips__EeC-E";
@@ -44,14 +44,14 @@ Chips.Item = forwardRef(function ChipsItem({
44
44
  onRemove,
45
45
  "aria-controls": ariaControls,
46
46
  dataset,
47
- ...restProps
47
+ ...restPropsPassedByRadixUI
48
48
  }, ref) {
49
49
  const {
50
50
  formatMessage
51
51
  } = useIntl();
52
52
  const toggle = () => onToggle == null ? void 0 : onToggle(!pressed);
53
53
  const remove = onRemove != null ? onRemove : toggle;
54
- return /* @__PURE__ */ jsxs("li", { ...filterHTMLAttributes(restProps), ref, className: styles.chip, ...getDatasetProps(dataset, {
54
+ return /* @__PURE__ */ jsxs("li", { ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI), ref, className: styles.chip, ...getDatasetProps(dataset, {
55
55
  preplyDsComponent: webComponentNames.Chip
56
56
  }), children: [
57
57
  /* @__PURE__ */ jsxs("button", { type: "button", className: styles["chip-toggle"], "aria-pressed": pressed, "aria-controls": ariaControls, onClick: toggle, onKeyUp: (e) => {
@@ -3,7 +3,7 @@ import { jsx } from "react/jsx-runtime";
3
3
  import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
4
4
  import { moduleClassNames, getDatasetProps } from "@preply/ds-web-core";
5
5
  import { forwardRef } from "react";
6
- import { filterHTMLAttributes } from "../../utils/filterHTMLAttributes.js";
6
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
7
7
  import '../../assets/FieldButton.css';const FieldButton$1 = "FieldButton__OWtNd";
8
8
  const styles = {
9
9
  FieldButton: FieldButton$1
@@ -13,7 +13,7 @@ const FieldButton = forwardRef(function FieldButtonComponent({
13
13
  assistiveText,
14
14
  onClick,
15
15
  dataset,
16
- ...restProps
16
+ ...restPropsPassedByRadixUI
17
17
  }, ref) {
18
18
  const classNames = moduleClassNames(styles, webComponentNames.FieldButton);
19
19
  const handleClick = (ev) => {
@@ -21,7 +21,7 @@ const FieldButton = forwardRef(function FieldButtonComponent({
21
21
  onClick == null ? void 0 : onClick(ev);
22
22
  };
23
23
  const ownProps = {
24
- ...filterHTMLAttributes(restProps),
24
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
25
25
  ...getDatasetProps(dataset, {
26
26
  preplyDsComponent: webComponentNames.FieldButton
27
27
  }),
@@ -5,7 +5,7 @@ import { forwardRef } from "react";
5
5
  import { getColorClassNames } from "../../shared-styles/color/color.js";
6
6
  import { getTextAccentClassnames } from "../../shared-styles/text-accent/text-accent.js";
7
7
  import { getTextCenteredClassnames } from "../../shared-styles/text-centered/text-centered.js";
8
- import { filterHTMLAttributes } from "../../utils/filterHTMLAttributes.js";
8
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
9
9
  import '../../assets/Heading.css';const Heading$1 = "Heading__Lv13n";
10
10
  const styles = {
11
11
  Heading: Heading$1,
@@ -117,7 +117,7 @@ const Heading = forwardRef(function HeadingComponent({
117
117
  centered,
118
118
  dataset,
119
119
  id,
120
- ...restProps
120
+ ...restPropsPassedByRadixUI
121
121
  }, ref) {
122
122
  const Tag = tag || level || "h1";
123
123
  const classNames = moduleClassNames(styles, webComponentNames.Heading, variant ? stringClassNames("variant", variant) : booleanClassNames(`level-${level}-large`, `level-${level}-normal`, large));
@@ -128,7 +128,7 @@ const Heading = forwardRef(function HeadingComponent({
128
128
  const colorClassNames = getColorClassNames(color);
129
129
  const allClassNames = ["preply-ds-heading", ...classNames, ...centeredClassNames, ...accentClassNames, ...colorClassNames];
130
130
  const props = {
131
- ...filterHTMLAttributes(restProps),
131
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
132
132
  className: allClassNames.join(" "),
133
133
  ...getDatasetProps(dataset, {
134
134
  preplyDsComponent: webComponentNames.Heading
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,OAAO,EACP,QAAQ,EAER,UAAU,EACV,eAAe,EACf,YAAY,EACf,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAc,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAG5E,MAAM,MAAM,SAAS,GAAG;IACpB;;;;;;;;;;;;OAYG;IACH,GAAG,EAAE,qBAAqB,CAAC;IAC3B,IAAI,CAAC,EAAE,QAAQ,GAAG,eAAe,CAAC;IAClC,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,IAAI,mFAuCf,CAAC"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,OAAO,EACP,QAAQ,EAER,UAAU,EACV,eAAe,EACf,YAAY,EACf,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAc,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAG5E,MAAM,MAAM,SAAS,GAAG;IACpB;;;;;;;;;;;;OAYG;IACH,GAAG,EAAE,qBAAqB,CAAC;IAC3B,IAAI,CAAC,EAAE,QAAQ,GAAG,eAAe,CAAC;IAClC,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,IAAI,mFAgDf,CAAC"}
@@ -5,7 +5,7 @@ import { moduleClassNames, booleanClassNames, getDatasetProps } from "@preply/ds
5
5
  import { forwardRef } from "react";
6
6
  import { getColorClassNames } from "../../shared-styles/color/color.js";
7
7
  import { getTextAccentClassnames } from "../../shared-styles/text-accent/text-accent.js";
8
- import { filterHTMLAttributes } from "../../utils/filterHTMLAttributes.js";
8
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
9
9
  import { renderIcon } from "../../utils/render-icon.js";
10
10
  import { getExpColorClassNames } from "../../shared-styles/exp-color/exp-color.js";
11
11
  import '../../assets/Icon.css';const Icon$1 = "Icon__jDdMD";
@@ -29,7 +29,7 @@ const Icon = forwardRef(function IconComponent({
29
29
  color,
30
30
  label,
31
31
  dataset,
32
- ...restProps
32
+ ...restPropsPassedByRadixUI
33
33
  }, ref) {
34
34
  const useNumericSize = !Number.isNaN(Number(size));
35
35
  const style = useNumericSize ? {
@@ -43,7 +43,7 @@ const Icon = forwardRef(function IconComponent({
43
43
  const expColorClassNames = accent ? [] : getExpColorClassNames(expColor);
44
44
  const allClassNames = [...classNames, ...accentClassNames, ...colorClassNames, ...expColorClassNames];
45
45
  const props = {
46
- ...filterHTMLAttributes(restProps),
46
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
47
47
  className: allClassNames.join(" "),
48
48
  ...getDatasetProps(dataset, {
49
49
  preplyDsComponent: webComponentNames.Icon
@@ -3,7 +3,7 @@ import { forwardRef } from "react";
3
3
  import { getDatasetProps } from "@preply/ds-web-core";
4
4
  import { LAYOUT_TAG_DEFAULT } from "@preply/ds-core";
5
5
  import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
6
- import { filterHTMLAttributes } from "../../utils/filterHTMLAttributes.js";
6
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
7
7
  import { getGapAttr, getRelativeAttr, getDisplayAttr, getAlignItemsAttr, getJustifyContentAttr, getDirectionAttr, getPaddingAttr, DO_NOT_ADD_DATA_ATTRIBUTE, getWrapAttr } from "./style/getStyleAttrs.js";
8
8
  import { s as styles$1 } from "../../layout-gap.module-B_tyw31T.js";
9
9
  import { s as styles$2 } from "../../layout-hide.module-Bpl3Pl-a.js";
@@ -25,7 +25,7 @@ const LayoutFlex = forwardRef(function LayoutFlexComponent(props, ref) {
25
25
  alignItems,
26
26
  justifyContent,
27
27
  tag: Tag = LAYOUT_TAG_DEFAULT,
28
- ...restProps
28
+ ...restPropsPassedByRadixUI
29
29
  } = props;
30
30
  const classNames = [
31
31
  // Temporary trick to avoid global styles
@@ -75,7 +75,7 @@ const LayoutFlex = forwardRef(function LayoutFlexComponent(props, ref) {
75
75
  paddingAttr = paddingResult.attr;
76
76
  }
77
77
  const tagProps = {
78
- ...filterHTMLAttributes(restProps),
78
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
79
79
  ref,
80
80
  className: classNames.join(" "),
81
81
  "data-ds-gap": gapAttr,
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutFlexItem.d.ts","sourceRoot":"","sources":["../../../src/components/LayoutFlexItem/LayoutFlexItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,OAAO,EAEP,eAAe,EACf,SAAS,EACT,UAAU,EACb,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,EAA+B,SAAS,EAAE,MAAM,OAAO,CAAC;AAQtE,MAAM,WAAW,KAAK;IAClB,SAAS,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC9B,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,2EA4BzB,CAAC"}
1
+ {"version":3,"file":"LayoutFlexItem.d.ts","sourceRoot":"","sources":["../../../src/components/LayoutFlexItem/LayoutFlexItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,OAAO,EAEP,eAAe,EACf,SAAS,EACT,UAAU,EACb,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,EAA+B,SAAS,EAAE,MAAM,OAAO,CAAC;AAQtE,MAAM,WAAW,KAAK;IAClB,SAAS,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC9B,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,2EAqCzB,CAAC"}
@@ -6,7 +6,7 @@ import { forwardRef } from "react";
6
6
  import { getAlignSelfClassNames } from "../../shared-styles/align-self/align-self.js";
7
7
  import { getLayoutHideClassnames } from "../../shared-styles/layout-hide/layout-hide.js";
8
8
  import { getLayoutRelativeClassnames } from "../../shared-styles/layout-relative/layout-relative.js";
9
- import { filterHTMLAttributes } from "../../utils/filterHTMLAttributes.js";
9
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
10
10
  import '../../assets/LayoutFlexItem.css';const LayoutFlexItem$1 = "LayoutFlexItem__0eYcj";
11
11
  const styles = {
12
12
  LayoutFlexItem: LayoutFlexItem$1,
@@ -31,7 +31,7 @@ const LayoutFlexItem = forwardRef(function LayoutFlexItemComponent({
31
31
  hide,
32
32
  relative,
33
33
  dataset,
34
- ...restProps
34
+ ...restPropsPassedByRadixUI
35
35
  }, ref) {
36
36
  const classNames = moduleClassNames(styles, webComponentNames.LayoutFlexItem, booleanClassNames("stretch", "no-stretch", stretch));
37
37
  const alignSelfClassNames = getAlignSelfClassNames(alignSelf);
@@ -40,7 +40,7 @@ const LayoutFlexItem = forwardRef(function LayoutFlexItemComponent({
40
40
  const allClassNames = [...classNames, ...alignSelfClassNames, ...hideClassNames, ...relativeClassNames];
41
41
  const Tag = tag != null ? tag : LAYOUT_TAG_DEFAULT;
42
42
  const props = {
43
- ...filterHTMLAttributes(restProps),
43
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
44
44
  ref,
45
45
  className: allClassNames.join(" "),
46
46
  ...getDatasetProps(dataset, {
@@ -5,24 +5,24 @@ import { getDatasetProps } from "@preply/ds-web-core";
5
5
  import { forwardRef } from "react";
6
6
  import { getLayoutGridResponsiveColumnsStyles } from "../../shared-styles/layout-grid-responsive-columns/layout-grid-responsive-columns.js";
7
7
  import { getLayoutGridClassNames } from "../../shared-styles/layout-grid/layout-grid.js";
8
- import { filterHTMLAttributes } from "../../utils/filterHTMLAttributes.js";
8
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
9
9
  const LayoutGrid = forwardRef(function LayoutGridComponent({
10
10
  dataset,
11
11
  children,
12
- ...layoutGridBaseProps
12
+ ...layoutGridBasePropsAndPropsPassedByRadixUI
13
13
  }, ref) {
14
14
  const {
15
15
  tag: Tag = LAYOUT_TAG_DEFAULT,
16
16
  columns
17
- } = layoutGridBaseProps;
18
- const classNames = getLayoutGridClassNames("grid", layoutGridBaseProps);
17
+ } = layoutGridBasePropsAndPropsPassedByRadixUI;
18
+ const classNames = getLayoutGridClassNames("grid", layoutGridBasePropsAndPropsPassedByRadixUI);
19
19
  const {
20
20
  style,
21
21
  classNames: columnClassNames
22
22
  } = getLayoutGridResponsiveColumnsStyles(columns);
23
23
  const allClassNames = [...classNames, ...columnClassNames];
24
24
  const props = {
25
- ...filterHTMLAttributes(layoutGridBaseProps),
25
+ ...filterAttributesPassedByRadixUIAtRuntime(layoutGridBasePropsAndPropsPassedByRadixUI),
26
26
  ref,
27
27
  className: allClassNames.join(" "),
28
28
  style,
@@ -6,7 +6,7 @@ import { forwardRef } from "react";
6
6
  import { getAlignSelfClassNames } from "../../shared-styles/align-self/align-self.js";
7
7
  import { getLayoutHideClassnames } from "../../shared-styles/layout-hide/layout-hide.js";
8
8
  import { getLayoutRelativeClassnames } from "../../shared-styles/layout-relative/layout-relative.js";
9
- import { filterHTMLAttributes } from "../../utils/filterHTMLAttributes.js";
9
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
10
10
  import '../../assets/LayoutGridItem.css';const LayoutGridItem$1 = "LayoutGridItem__HXV4b";
11
11
  const styles = {
12
12
  LayoutGridItem: LayoutGridItem$1
@@ -18,7 +18,7 @@ const LayoutGridItem = forwardRef(function LayoutGridItemComponent({
18
18
  hide,
19
19
  relative,
20
20
  dataset,
21
- ...restProps
21
+ ...restPropsPassedByRadixUI
22
22
  }, ref) {
23
23
  const classNames = moduleClassNames(styles, webComponentNames.LayoutGridItem, []);
24
24
  const alignSelfClassNames = getAlignSelfClassNames(alignSelf);
@@ -27,7 +27,7 @@ const LayoutGridItem = forwardRef(function LayoutGridItemComponent({
27
27
  const allClassNames = [...classNames, ...alignSelfClassNames, ...hideClassNames, ...relativeClassNames];
28
28
  const Tag = tag != null ? tag : LAYOUT_TAG_DEFAULT;
29
29
  const props = {
30
- ...filterHTMLAttributes(restProps),
30
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
31
31
  ref,
32
32
  className: allClassNames.join(" "),
33
33
  ...getDatasetProps(dataset, {
@@ -4,7 +4,7 @@ import { LINK_VARIANT_DEFAULT } from "@preply/ds-core";
4
4
  import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
5
5
  import { useHostname, moduleClassNames, stringClassNames, booleanClassNames, getExternalUrlProps, getDatasetProps } from "@preply/ds-web-core";
6
6
  import { forwardRef, cloneElement } from "react";
7
- import { filterHTMLAttributes } from "../../utils/filterHTMLAttributes.js";
7
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
8
8
  import '../../assets/Link.css';const Link$1 = "Link__0oP-l";
9
9
  const styles = {
10
10
  Link: Link$1,
@@ -42,14 +42,14 @@ const Link = forwardRef(function LinkComponent(props, ref) {
42
42
  inline,
43
43
  dsInternalSimulation,
44
44
  noUnderline,
45
- ...restProps
45
+ ...restPropsPassedByRadixUI
46
46
  } = props;
47
47
  const hostname = useHostname();
48
48
  const classNames = moduleClassNames(styles, webComponentNames.Link, [stringClassNames(`variant-${variant}--dsInternalSimulation`, dsInternalSimulation), stringClassNames("variant", variant), booleanClassNames("inline", void 0, inline), booleanClassNames("noUnderline", void 0, noUnderline)]);
49
49
  const actualHref = href || url;
50
50
  const externalUrlProps = actualHref ? getExternalUrlProps(hostname, actualHref, opensInNewTab, nofollow) : {};
51
51
  const tagProps = {
52
- ...filterHTMLAttributes(restProps),
52
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
53
53
  ref,
54
54
  href: actualHref,
55
55
  download,
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
3
3
  import { moduleClassNames, booleanClassNames, getDatasetProps } from "@preply/ds-web-core";
4
4
  import { forwardRef } from "react";
5
- import { filterHTMLAttributes } from "../../utils/filterHTMLAttributes.js";
5
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
6
6
  import { Spinner } from "../private/Spinner/Spinner.js";
7
7
  import '../../assets/Loader.css';const Loader$1 = "Loader__sOe0E";
8
8
  const styles = {
@@ -14,11 +14,11 @@ const Loader = forwardRef(function LoaderComponent({
14
14
  size,
15
15
  inverted = false,
16
16
  dataset,
17
- ...restProps
17
+ ...restPropsPassedByRadixUI
18
18
  }, ref) {
19
19
  const classNames = moduleClassNames(styles, webComponentNames.Loader, [booleanClassNames("inverted", "normal", inverted)]);
20
20
  const props = {
21
- ...filterHTMLAttributes(restProps),
21
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
22
22
  ref,
23
23
  className: classNames.join(" "),
24
24
  ...getDatasetProps(dataset, {
@@ -1 +1 @@
1
- {"version":3,"file":"PreplyLogo.d.ts","sourceRoot":"","sources":["../../../src/components/PreplyLogo/PreplyLogo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGlE,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,MAAM,MAAM,KAAK,GAAG;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AA6BF,eAAO,MAAM,UAAU,+EAgCrB,CAAC"}
1
+ {"version":3,"file":"PreplyLogo.d.ts","sourceRoot":"","sources":["../../../src/components/PreplyLogo/PreplyLogo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGlE,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,MAAM,MAAM,KAAK,GAAG;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AA6BF,eAAO,MAAM,UAAU,+EAuCrB,CAAC"}
@@ -3,7 +3,7 @@ import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-n
3
3
  import { moduleClassNames, booleanClassNames, getDatasetProps } from "@preply/ds-web-core";
4
4
  import * as React from "react";
5
5
  import { forwardRef } from "react";
6
- import { filterHTMLAttributes } from "../../utils/filterHTMLAttributes.js";
6
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
7
7
  import '../../assets/PreplyLogo.css';const PreplyLogo$1 = "PreplyLogo__Grf-P";
8
8
  const styles = {
9
9
  PreplyLogo: PreplyLogo$1,
@@ -47,14 +47,14 @@ const PreplyLogo = forwardRef(function PreplyLogoComponent({
47
47
  inverted = false,
48
48
  size = "m",
49
49
  dataset,
50
- ...restProps
50
+ ...restPropsPassedByRadixUI
51
51
  }, ref) {
52
52
  const classNames = moduleClassNames(styles, webComponentNames.PreplyLogo, [booleanClassNames("inverted", void 0, inverted)]);
53
53
  let mode = MODES.DEFAULT;
54
54
  if (iconOnly) mode = MODES.ICON_ONLY;
55
55
  if (business) mode = MODES.BUSINESS;
56
56
  const props = {
57
- ...filterHTMLAttributes(restProps),
57
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
58
58
  ref,
59
59
  className: classNames.join(" "),
60
60
  ...getDatasetProps(dataset, {
@@ -6,7 +6,7 @@ import { forwardRef } from "react";
6
6
  import { getColorClassNames } from "../../shared-styles/color/color.js";
7
7
  import { getTextAccentClassnames } from "../../shared-styles/text-accent/text-accent.js";
8
8
  import { getTextCenteredClassnames } from "../../shared-styles/text-centered/text-centered.js";
9
- import { filterHTMLAttributes } from "../../utils/filterHTMLAttributes.js";
9
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
10
10
  import '../../assets/Text.css';const Text$1 = "Text__uVacy";
11
11
  const styles = {
12
12
  Text: Text$1,
@@ -244,7 +244,7 @@ const Text = forwardRef(function TextComponent({
244
244
  strong,
245
245
  centered,
246
246
  dataset,
247
- ...restProps
247
+ ...restPropsPassedByRadixUI
248
248
  }, ref) {
249
249
  const actualVariant = variant || (size ? void 0 : TEXT_VARIANT_DEFAULT);
250
250
  const actualSize = variant ? void 0 : size;
@@ -257,7 +257,7 @@ const Text = forwardRef(function TextComponent({
257
257
  const centeredClassNames = getTextCenteredClassnames(centered);
258
258
  const allClassNames = [...classNames, ...accentClassNames, ...colorClassNames, ...centeredClassNames];
259
259
  const props = {
260
- ...filterHTMLAttributes(restProps),
260
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
261
261
  ref,
262
262
  className: allClassNames.join(" "),
263
263
  ...getDatasetProps(dataset, {
@@ -3,7 +3,7 @@ import { TEXT_HIGHLIGHT_DEFAULT, TEXT_INLINE_TAG_DEFAULT } from "@preply/ds-core
3
3
  import { webComponentNames } from "@preply/ds-visual-coverage-preply-component-names";
4
4
  import { moduleClassNames, stringClassNames, getDatasetProps } from "@preply/ds-web-core";
5
5
  import { forwardRef } from "react";
6
- import { filterHTMLAttributes } from "../../utils/filterHTMLAttributes.js";
6
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
7
7
  import '../../assets/TextHighlighted.css';const TextHighlighted$1 = "TextHighlighted__ehLpO";
8
8
  const styles = {
9
9
  TextHighlighted: TextHighlighted$1,
@@ -23,11 +23,11 @@ const TextHighlighted = forwardRef(function TextHighlightedComponent({
23
23
  highlight = TEXT_HIGHLIGHT_DEFAULT,
24
24
  tag: Tag = TEXT_INLINE_TAG_DEFAULT,
25
25
  dataset,
26
- ...restProps
26
+ ...restPropsPassedByRadixUI
27
27
  }, ref) {
28
28
  const classNames = moduleClassNames(styles, webComponentNames.TextHighlighted, [stringClassNames("highlight", highlight)]);
29
29
  const props = {
30
- ...filterHTMLAttributes(restProps),
30
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
31
31
  ref,
32
32
  className: classNames.join(" "),
33
33
  ...getDatasetProps(dataset, {
@@ -6,7 +6,7 @@ import { forwardRef } from "react";
6
6
  import { getColorClassNames } from "../../shared-styles/color/color.js";
7
7
  import { getTextAccentClassnames } from "../../shared-styles/text-accent/text-accent.js";
8
8
  import { getTextWeightClassNames } from "../../shared-styles/text-weight/text-weight.js";
9
- import { filterHTMLAttributes } from "../../utils/filterHTMLAttributes.js";
9
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
10
10
  import '../../assets/TextInline.css';const TextInline$1 = "TextInline__SqhPj";
11
11
  const styles = {
12
12
  TextInline: TextInline$1,
@@ -20,7 +20,7 @@ const TextInline = forwardRef(function TextInlineComponent({
20
20
  italic = false,
21
21
  tag: Tag = TEXT_INLINE_TAG_DEFAULT,
22
22
  dataset,
23
- ...restProps
23
+ ...restPropsPassedByRadixUI
24
24
  }, ref) {
25
25
  const classNames = moduleClassNames(styles, webComponentNames.TextInline, [booleanClassNames("italic", void 0, italic)]);
26
26
  const actualColor = accent ? void 0 : color;
@@ -30,7 +30,7 @@ const TextInline = forwardRef(function TextInlineComponent({
30
30
  const weightClassNames = getTextWeightClassNames(weight);
31
31
  const allClassNames = [...classNames, ...accentClassNames, ...colorClassNames, ...weightClassNames];
32
32
  const props = {
33
- ...filterHTMLAttributes(restProps),
33
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
34
34
  ref,
35
35
  className: allClassNames.join(" "),
36
36
  ...getDatasetProps(dataset, {
@@ -3,9 +3,9 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
3
  import { BUTTON_VARIANT_DEFAULT, BUTTON_SIZE_DEFAULT } from "@preply/ds-core";
4
4
  import { useHostname, booleanClassNames, stringClassNames, moduleClassNames, getDatasetProps, getExternalUrlProps, moduleLocals, mapEdgeKeyToStandard } from "@preply/ds-web-core";
5
5
  import { forwardRef, useRef, cloneElement } from "react";
6
+ import { filterAttributesPassedByRadixUIAtRuntime } from "../../../utils/filterAttributesPassedByRadixUIAtRuntime.js";
6
7
  import { Spinner } from "../Spinner/Spinner.js";
7
8
  import { useMergeRefs } from "../../../utils/useMergeRefs.js";
8
- import { filterHTMLAttributes } from "../../../utils/filterHTMLAttributes.js";
9
9
  import '../../../assets/ButtonBase.css';const ButtonBase$1 = "ButtonBase__lIl-s";
10
10
  const styles = {
11
11
  "button-width--width-full": "button-width--width-full__nJNYU",
@@ -220,7 +220,7 @@ const ButtonBase = forwardRef(function ButtonBaseComponent(props, forwardedRef)
220
220
  dsInternalSimulation,
221
221
  preplyDsComponent,
222
222
  className,
223
- ...restProps
223
+ ...restPropsPassedByRadixUI
224
224
  } = props;
225
225
  const {
226
226
  selected
@@ -250,7 +250,7 @@ const ButtonBase = forwardRef(function ButtonBaseComponent(props, forwardedRef)
250
250
  ) : stringClassNames(`variant-${variant}--dsInternalSimulation`, dsInternalSimulation);
251
251
  const classNames = moduleClassNames(styles, BUTTON_BASE, [dsInternalSimulationClassname, stringClassNames("variant", variant), stringClassNames("size", size), isIconButton ? stringClassNames("is-icon-button-size", size) : [], booleanClassNames(void 0, "no-wrap", wrap), booleanClassNames("width-full", "width-auto", fullWidth), booleanClassNames("is-busy", void 0, busy), booleanClassNames("is-icon-button", void 0, isIconButton), booleanClassNames(`variant-${variant}--is-selected`, void 0, selected)]);
252
252
  const buttonProps = {
253
- ...filterHTMLAttributes(restProps),
253
+ ...filterAttributesPassedByRadixUIAtRuntime(restPropsPassedByRadixUI),
254
254
  ...getDatasetProps(dataset, {
255
255
  preplyDsComponent
256
256
  }),
@@ -1,3 +1,4 @@
1
+ import { HTMLAttributes } from 'react';
1
2
  /**
2
3
  * Filters an object to only include whitelisted HTML attributes.
3
4
  * This is useful for safe props spreading to enable integration with third-party libs like radix-ui.
@@ -7,5 +8,5 @@
7
8
  * With `filterHTMLAttributes`, we're allowing known props required for Tooltip/Popover, and avoiding
8
9
  * spreading ALL the `{...rest}` props down, to prevent opening doors to all sorts of weird "hacks".
9
10
  */
10
- export declare const filterHTMLAttributes: <T extends Record<string, unknown>>(attributes: T) => { [K in Extract<keyof T, "aria-describedby" | "onPointerMove" | "onPointerLeave" | "onPointerDown" | "onFocus" | "onBlur" | "onClick" | "onTouchStart" | "onTouchEnd" | "id">]: T[K]; };
11
- //# sourceMappingURL=filterHTMLAttributes.d.ts.map
11
+ export declare const filterAttributesPassedByRadixUIAtRuntime: <T extends Record<string, unknown>>(attributes: T) => { [K in Extract<keyof T, keyof HTMLAttributes<HTMLElement>>]: T[K]; };
12
+ //# sourceMappingURL=filterAttributesPassedByRadixUIAtRuntime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filterAttributesPassedByRadixUIAtRuntime.d.ts","sourceRoot":"","sources":["../../src/utils/filterAttributesPassedByRadixUIAtRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAwBvC;;;;;;;;GAQG;AACH,eAAO,MAAM,wCAAwC,6HAMpD,CAAC"}
@@ -0,0 +1,26 @@
1
+ const HTML_ATTRIBUTES_WHITE_LIST = [
2
+ "aria-describedby",
3
+ // @ts-expect-error data-state is not recognized as a valid HTML attribute 🤔
4
+ "data-state",
5
+ "onPointerMove",
6
+ "onPointerLeave",
7
+ "onPointerDown",
8
+ "onFocus",
9
+ // @todo double-check if this prop is actually passed.
10
+ "onBlur",
11
+ // @todo double-check if this prop is actually passed.
12
+ "onClick",
13
+ "onTouchStart",
14
+ "onTouchEnd",
15
+ "id",
16
+ // @todo double-check if this prop is actually passed.
17
+ "tabIndex"
18
+ // @todo double-check if this prop is actually passed.
19
+ ];
20
+ const ATTRIBUTES_SET = new Set(HTML_ATTRIBUTES_WHITE_LIST);
21
+ const filterAttributesPassedByRadixUIAtRuntime = (attributes) => {
22
+ return Object.fromEntries(Object.entries(attributes).filter(([key]) => ATTRIBUTES_SET.has(key)));
23
+ };
24
+ export {
25
+ filterAttributesPassedByRadixUIAtRuntime
26
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@preply/ds-web-lib",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -34,22 +34,22 @@
34
34
  "sonner": "^1.7.4"
35
35
  },
36
36
  "peerDependencies": {
37
- "@preply/ds-core": "2.3.0",
38
- "@preply/ds-media-icons": "2.3.0",
39
- "@preply/ds-visual-coverage-preply-component-names": "2.3.0",
40
- "@preply/ds-web-core": "2.3.0",
41
- "@preply/ds-web-root": "2.3.0",
37
+ "@preply/ds-core": "2.4.0",
38
+ "@preply/ds-media-icons": "2.4.0",
39
+ "@preply/ds-visual-coverage-preply-component-names": "2.4.0",
40
+ "@preply/ds-web-core": "2.4.0",
41
+ "@preply/ds-web-root": "2.4.0",
42
42
  "react": "^16 || ^18",
43
43
  "react-dom": "^16 || ^18",
44
44
  "react-intl": "^6.5.5"
45
45
  },
46
46
  "devDependencies": {
47
- "@preply/ds-core": "2.3.0",
48
- "@preply/ds-docs-toolkit": "2.3.0",
49
- "@preply/ds-media-icons": "2.3.0",
50
- "@preply/ds-visual-coverage-preply-component-names": "2.3.0",
51
- "@preply/ds-web-core": "2.3.0",
52
- "@preply/ds-web-root": "2.3.0",
47
+ "@preply/ds-core": "2.4.0",
48
+ "@preply/ds-docs-toolkit": "2.4.0",
49
+ "@preply/ds-media-icons": "2.4.0",
50
+ "@preply/ds-visual-coverage-preply-component-names": "2.4.0",
51
+ "@preply/ds-web-core": "2.4.0",
52
+ "@preply/ds-web-root": "2.4.0",
53
53
  "@storybook/react": "8.5.8",
54
54
  "@testing-library/react": "16.2.0",
55
55
  "@types/react-is": "^18.2.0",
@@ -65,5 +65,5 @@
65
65
  "vite-plugin-svgr": "4.3.0",
66
66
  "vitest-browser-react": "^0.1.1"
67
67
  },
68
- "gitHead": "211e51a1372c2f5a3141548bace21be487b1a46c"
68
+ "gitHead": "c98fb6c9479efe8c39f9c493668bb3e291b2d263"
69
69
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"filterHTMLAttributes.d.ts","sourceRoot":"","sources":["../../src/utils/filterHTMLAttributes.ts"],"names":[],"mappings":"AAqBA;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,+OAIhC,CAAC"}
@@ -1,8 +0,0 @@
1
- const ATTRIBUTES_WHITE_LIST = ["aria-describedby", "onPointerMove", "onPointerLeave", "onPointerDown", "onFocus", "onBlur", "onClick", "onTouchStart", "onTouchEnd", "id"];
2
- const ATTRIBUTES_SET = new Set(ATTRIBUTES_WHITE_LIST);
3
- const filterHTMLAttributes = (attributes) => {
4
- return Object.fromEntries(Object.entries(attributes).filter(([key]) => ATTRIBUTES_SET.has(key)));
5
- };
6
- export {
7
- filterHTMLAttributes
8
- };