@mittwald/flow-react-components 0.2.0-alpha.62 → 0.2.0-alpha.63

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.
@@ -14,12 +14,21 @@ import { onlyText } from 'react-children-utilities';
14
14
  import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
15
15
 
16
16
  const Initials = flowComponent("Initials", (props) => {
17
- const { children, className, ref } = props;
17
+ const { children, className, "aria-hidden": ariaHidden, ref } = props;
18
18
  const textContent = onlyText(children);
19
19
  const initials = getInitialsFromString(textContent);
20
20
  const rootClassName = clsx(styles.initials, className);
21
21
  const initialsElements = initials.map((initial, index) => /* @__PURE__ */ jsx("span", { children: initial }, index));
22
- return /* @__PURE__ */ jsx(ClearPropsContext, { children: /* @__PURE__ */ jsx("div", { "aria-label": textContent, className: rootClassName, ref, children: initialsElements }) });
22
+ return /* @__PURE__ */ jsx(ClearPropsContext, { children: /* @__PURE__ */ jsx(
23
+ "div",
24
+ {
25
+ "aria-hidden": ariaHidden,
26
+ "aria-label": textContent,
27
+ className: rootClassName,
28
+ ref,
29
+ children: initialsElements
30
+ }
31
+ ) });
23
32
  });
24
33
 
25
34
  export { Initials, Initials as default };
@@ -1 +1 @@
1
- {"version":3,"file":"Initials.mjs","sources":["../../../../src/components/Initials/Initials.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport React from \"react\";\nimport { getInitialsFromString } from \"./lib/getInitialsFromString\";\nimport styles from \"./Initials.module.scss\";\nimport clsx from \"clsx\";\nimport { ClearPropsContext } from \"@/lib/propsContext\";\nimport { onlyText } from \"react-children-utilities\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\n\nexport interface InitialsProps\n extends PropsWithChildren,\n PropsWithClassName,\n FlowComponentProps {}\n\n/**\n * @flr-generate all\n * @flr-clear-props-context\n */\nexport const Initials = flowComponent(\"Initials\", (props) => {\n const { children, className, ref } = props;\n\n const textContent = onlyText(children);\n const initials = getInitialsFromString(textContent);\n\n const rootClassName = clsx(styles.initials, className);\n\n const initialsElements = initials.map((initial, index) => (\n <span key={index}>{initial}</span>\n ));\n\n return (\n <ClearPropsContext>\n <div aria-label={textContent} className={rootClassName} ref={ref}>\n {initialsElements}\n </div>\n </ClearPropsContext>\n );\n});\n\nexport default Initials;\n"],"names":[],"mappings":";;;;;;;;;;;;;AAoBO,MAAM,QAAW,GAAA,aAAA,CAAc,UAAY,EAAA,CAAC,KAAU,KAAA;AAC3D,EAAA,MAAM,EAAE,QAAA,EAAU,SAAW,EAAA,GAAA,EAAQ,GAAA,KAAA;AAErC,EAAM,MAAA,WAAA,GAAc,SAAS,QAAQ,CAAA;AACrC,EAAM,MAAA,QAAA,GAAW,sBAAsB,WAAW,CAAA;AAElD,EAAA,MAAM,aAAgB,GAAA,IAAA,CAAK,MAAO,CAAA,QAAA,EAAU,SAAS,CAAA;AAErD,EAAM,MAAA,gBAAA,GAAmB,QAAS,CAAA,GAAA,CAAI,CAAC,OAAA,EAAS,0BAC7C,GAAA,CAAA,MAAA,EAAA,EAAkB,QAAR,EAAA,OAAA,EAAA,EAAA,KAAgB,CAC5B,CAAA;AAED,EACE,uBAAA,GAAA,CAAC,iBACC,EAAA,EAAA,QAAA,kBAAA,GAAA,CAAC,KAAI,EAAA,EAAA,YAAA,EAAY,aAAa,SAAW,EAAA,aAAA,EAAe,GACrD,EAAA,QAAA,EAAA,gBAAA,EACH,CACF,EAAA,CAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"Initials.mjs","sources":["../../../../src/components/Initials/Initials.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport React from \"react\";\nimport { getInitialsFromString } from \"./lib/getInitialsFromString\";\nimport styles from \"./Initials.module.scss\";\nimport clsx from \"clsx\";\nimport { ClearPropsContext } from \"@/lib/propsContext\";\nimport { onlyText } from \"react-children-utilities\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\n\nexport interface InitialsProps\n extends PropsWithChildren,\n PropsWithClassName,\n FlowComponentProps {\n \"aria-hidden\"?: boolean;\n}\n\n/**\n * @flr-generate all\n * @flr-clear-props-context\n */\nexport const Initials = flowComponent(\"Initials\", (props) => {\n const { children, className, \"aria-hidden\": ariaHidden, ref } = props;\n\n const textContent = onlyText(children);\n const initials = getInitialsFromString(textContent);\n\n const rootClassName = clsx(styles.initials, className);\n\n const initialsElements = initials.map((initial, index) => (\n <span key={index}>{initial}</span>\n ));\n\n return (\n <ClearPropsContext>\n <div\n aria-hidden={ariaHidden}\n aria-label={textContent}\n className={rootClassName}\n ref={ref}\n >\n {initialsElements}\n </div>\n </ClearPropsContext>\n );\n});\n\nexport default Initials;\n"],"names":[],"mappings":";;;;;;;;;;;;;AAsBO,MAAM,QAAW,GAAA,aAAA,CAAc,UAAY,EAAA,CAAC,KAAU,KAAA;AAC3D,EAAA,MAAM,EAAE,QAAU,EAAA,SAAA,EAAW,aAAe,EAAA,UAAA,EAAY,KAAQ,GAAA,KAAA;AAEhE,EAAM,MAAA,WAAA,GAAc,SAAS,QAAQ,CAAA;AACrC,EAAM,MAAA,QAAA,GAAW,sBAAsB,WAAW,CAAA;AAElD,EAAA,MAAM,aAAgB,GAAA,IAAA,CAAK,MAAO,CAAA,QAAA,EAAU,SAAS,CAAA;AAErD,EAAM,MAAA,gBAAA,GAAmB,QAAS,CAAA,GAAA,CAAI,CAAC,OAAA,EAAS,0BAC7C,GAAA,CAAA,MAAA,EAAA,EAAkB,QAAR,EAAA,OAAA,EAAA,EAAA,KAAgB,CAC5B,CAAA;AAED,EAAA,2BACG,iBACC,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,aAAa,EAAA,UAAA;AAAA,MACb,YAAY,EAAA,WAAA;AAAA,MACZ,SAAW,EAAA,aAAA;AAAA,MACX,GAAA;AAAA,MAEC,QAAA,EAAA;AAAA;AAAA,GAEL,EAAA,CAAA;AAEJ,CAAC;;;;"}
@@ -2,6 +2,7 @@ import { PropsWithChildren, default as React } from 'react';
2
2
  import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
3
3
  import { PropsWithClassName } from '../../lib/types/props';
4
4
  export interface InitialsProps extends PropsWithChildren, PropsWithClassName, FlowComponentProps {
5
+ "aria-hidden"?: boolean;
5
6
  }
6
7
  /**
7
8
  * @flr-generate all
@@ -1 +1 @@
1
- {"version":3,"file":"Initials.d.ts","sourceRoot":"","sources":["../../../../src/components/Initials/Initials.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,WAAW,aACf,SAAQ,iBAAiB,EACvB,kBAAkB,EAClB,kBAAkB;CAAG;AAEzB;;;GAGG;AACH,eAAO,MAAM,QAAQ,8EAmBnB,CAAC;AAEH,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Initials.d.ts","sourceRoot":"","sources":["../../../../src/components/Initials/Initials.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,WAAW,aACf,SAAQ,iBAAiB,EACvB,kBAAkB,EAClB,kBAAkB;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,8EAwBnB,CAAC;AAEH,eAAe,QAAQ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.2.0-alpha.62",
3
+ "version": "0.2.0-alpha.63",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -52,7 +52,7 @@
52
52
  "dependencies": {
53
53
  "@chakra-ui/live-region": "^2.1.0",
54
54
  "@internationalized/string-compiler": "^3.2.6",
55
- "@mittwald/react-tunnel": "0.2.0-alpha.62",
55
+ "@mittwald/react-tunnel": "0.2.0-alpha.63",
56
56
  "@mittwald/react-use-promise": "^2.6.0",
57
57
  "@react-aria/form": "^3.0.12",
58
58
  "@react-aria/utils": "^3.27.0",
@@ -91,7 +91,7 @@
91
91
  "@faker-js/faker": "^9.5.0",
92
92
  "@internationalized/date": "^3.7.0",
93
93
  "@mfalkenberg/remote-dom-react": "^1.2.3",
94
- "@mittwald/flow-design-tokens": "0.2.0-alpha.62",
94
+ "@mittwald/flow-design-tokens": "0.2.0-alpha.63",
95
95
  "@mittwald/react-use-promise": "^2.6.0",
96
96
  "@mittwald/typescript-config": "",
97
97
  "@nx/storybook": "^20.4.5",
@@ -168,5 +168,5 @@
168
168
  "optional": true
169
169
  }
170
170
  },
171
- "gitHead": "ba5b17103d31a38b4b72a19b29b74ea0a9cd18e0"
171
+ "gitHead": "e2ec875a4616bd7eb0ad3437d2ebe6261cad43ce"
172
172
  }