@mittwald/flow-react-components 0.2.0-alpha.1033 → 0.2.0-alpha.1034

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.
@@ -12,7 +12,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
12
12
  //#region src/components/Navigation/components/NavigationGroup/NavigationGroup.tsx
13
13
  /** @flr-generate all */
14
14
  var NavigationGroup = flowComponent("NavigationGroup", (props) => {
15
- const { children, className, collapsable, "aria-label": ariaLabel, ...rest } = props;
15
+ const { children, className, collapsable, defaultExpanded = true, "aria-label": ariaLabel, ...rest } = props;
16
16
  const rootClassName = clsx(NavigationGroup_module_default.navigationGroup, collapsable && NavigationGroup_module_default.collapsable, className);
17
17
  const generatedId = useId();
18
18
  const propsContext = {
@@ -26,7 +26,7 @@ var NavigationGroup = flowComponent("NavigationGroup", (props) => {
26
26
  } }
27
27
  };
28
28
  const collapsableUi = /* @__PURE__ */ jsxs(Accordion, {
29
- defaultExpanded: true,
29
+ defaultExpanded,
30
30
  className: rootClassName,
31
31
  children: [children, /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsx(LinkListTunnelExit, {
32
32
  id: "groupLinks",
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationGroup.mjs","names":[],"sources":["../../../../../../../../../src/components/Navigation/components/NavigationGroup/NavigationGroup.tsx"],"sourcesContent":["import { type ComponentProps, type PropsWithChildren } from \"react\";\nimport { useId } from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./NavigationGroup.module.scss\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { Accordion } from \"@/components/Accordion\";\nimport { Content } from \"@/components/Content\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { LinkListTunnelExit } from \"@/components/Navigation/components/LinkListTunnelExit/LinkListTunnelExit\";\n\nexport interface NavigationGroupProps\n extends\n PropsWithChildren<ComponentProps<\"section\">>,\n FlowComponentProps<HTMLElement> {\n collapsable?: boolean;\n}\n\n/** @flr-generate all */\nexport const NavigationGroup = flowComponent(\"NavigationGroup\", (props) => {\n const {\n children,\n className,\n collapsable,\n \"aria-label\": ariaLabel,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.navigationGroup,\n collapsable && styles.collapsable,\n className,\n );\n\n const generatedId = useId();\n\n const propsContext: PropsContext = {\n Label: {\n id: ariaLabel ? undefined : generatedId,\n className: styles.label,\n },\n Link: {\n tunnel: {\n id: \"groupLinks\",\n component: \"NavigationGroup\",\n },\n },\n };\n\n const collapsableUi = (\n <Accordion defaultExpanded className={rootClassName}>\n {children}\n <Content>\n <LinkListTunnelExit id=\"groupLinks\" component=\"NavigationGroup\" />\n </Content>\n </Accordion>\n );\n\n const defaultUi = (\n <section\n aria-labelledby={ariaLabel ? undefined : generatedId}\n aria-label={ariaLabel}\n className={rootClassName}\n {...rest}\n >\n {children}\n <LinkListTunnelExit id=\"groupLinks\" component=\"NavigationGroup\" />\n </section>\n );\n\n return (\n <PropsContextProvider props={propsContext} dependencies={[generatedId]}>\n {collapsable ? collapsableUi : defaultUi}\n </PropsContextProvider>\n );\n});\n\nexport default NavigationGroup;\n"],"mappings":";;;;;;;;;;;;;AAqBA,IAAa,kBAAkB,cAAc,oBAAoB,UAAU;CACzE,MAAM,EACJ,UACA,WACA,aACA,cAAc,WACd,GAAG,SACD;CAEJ,MAAM,gBAAgB,KACpB,+BAAO,iBACP,eAAe,+BAAO,aACtB,SACF;CAEA,MAAM,cAAc,MAAM;CAE1B,MAAM,eAA6B;EACjC,OAAO;GACL,IAAI,YAAY,KAAA,IAAY;GAC5B,WAAW,+BAAO;EACpB;EACA,MAAM,EACJ,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;CACF;CAEA,MAAM,gBACJ,qBAAC,WAAD;EAAW,iBAAA;EAAgB,WAAW;EAAtC,UAAA,CACG,UACD,oBAAC,SAAD,EAAA,UACE,oBAAC,oBAAD;GAAoB,IAAG;GAAa,WAAU;EAAmB,CAAA,EAC1D,CAAA,CACA;;CAGb,MAAM,YACJ,qBAAC,WAAD;EACE,mBAAiB,YAAY,KAAA,IAAY;EACzC,cAAY;EACZ,WAAW;EACX,GAAI;EAJN,UAAA,CAMG,UACD,oBAAC,oBAAD;GAAoB,IAAG;GAAa,WAAU;EAAmB,CAAA,CAC1D;;CAGX,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAAc,cAAc,CAAC,WAAW;EAClE,UAAA,cAAc,gBAAgB;CACX,CAAA;AAE1B,CAAC"}
1
+ {"version":3,"file":"NavigationGroup.mjs","names":[],"sources":["../../../../../../../../../src/components/Navigation/components/NavigationGroup/NavigationGroup.tsx"],"sourcesContent":["import { type ComponentProps, type PropsWithChildren } from \"react\";\nimport { useId } from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./NavigationGroup.module.scss\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { Accordion } from \"@/components/Accordion\";\nimport { Content } from \"@/components/Content\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { LinkListTunnelExit } from \"@/components/Navigation/components/LinkListTunnelExit/LinkListTunnelExit\";\n\nexport interface NavigationGroupProps\n extends\n PropsWithChildren<ComponentProps<\"section\">>,\n FlowComponentProps<HTMLElement> {\n collapsable?: boolean;\n /**\n * Whether a `collapsable` group is initially expanded.\n *\n * @default true\n */\n defaultExpanded?: boolean;\n}\n\n/** @flr-generate all */\nexport const NavigationGroup = flowComponent(\"NavigationGroup\", (props) => {\n const {\n children,\n className,\n collapsable,\n defaultExpanded = true,\n \"aria-label\": ariaLabel,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.navigationGroup,\n collapsable && styles.collapsable,\n className,\n );\n\n const generatedId = useId();\n\n const propsContext: PropsContext = {\n Label: {\n id: ariaLabel ? undefined : generatedId,\n className: styles.label,\n },\n Link: {\n tunnel: {\n id: \"groupLinks\",\n component: \"NavigationGroup\",\n },\n },\n };\n\n const collapsableUi = (\n <Accordion defaultExpanded={defaultExpanded} className={rootClassName}>\n {children}\n <Content>\n <LinkListTunnelExit id=\"groupLinks\" component=\"NavigationGroup\" />\n </Content>\n </Accordion>\n );\n\n const defaultUi = (\n <section\n aria-labelledby={ariaLabel ? undefined : generatedId}\n aria-label={ariaLabel}\n className={rootClassName}\n {...rest}\n >\n {children}\n <LinkListTunnelExit id=\"groupLinks\" component=\"NavigationGroup\" />\n </section>\n );\n\n return (\n <PropsContextProvider props={propsContext} dependencies={[generatedId]}>\n {collapsable ? collapsableUi : defaultUi}\n </PropsContextProvider>\n );\n});\n\nexport default NavigationGroup;\n"],"mappings":";;;;;;;;;;;;;AA2BA,IAAa,kBAAkB,cAAc,oBAAoB,UAAU;CACzE,MAAM,EACJ,UACA,WACA,aACA,kBAAkB,MAClB,cAAc,WACd,GAAG,SACD;CAEJ,MAAM,gBAAgB,KACpB,+BAAO,iBACP,eAAe,+BAAO,aACtB,SACF;CAEA,MAAM,cAAc,MAAM;CAE1B,MAAM,eAA6B;EACjC,OAAO;GACL,IAAI,YAAY,KAAA,IAAY;GAC5B,WAAW,+BAAO;EACpB;EACA,MAAM,EACJ,QAAQ;GACN,IAAI;GACJ,WAAW;EACb,EACF;CACF;CAEA,MAAM,gBACJ,qBAAC,WAAD;EAA4B;EAAiB,WAAW;EAAxD,UAAA,CACG,UACD,oBAAC,SAAD,EAAA,UACE,oBAAC,oBAAD;GAAoB,IAAG;GAAa,WAAU;EAAmB,CAAA,EAC1D,CAAA,CACA;;CAGb,MAAM,YACJ,qBAAC,WAAD;EACE,mBAAiB,YAAY,KAAA,IAAY;EACzC,cAAY;EACZ,WAAW;EACX,GAAI;EAJN,UAAA,CAMG,UACD,oBAAC,oBAAD;GAAoB,IAAG;GAAa,WAAU;EAAmB,CAAA,CAC1D;;CAGX,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAAc,cAAc,CAAC,WAAW;EAClE,UAAA,cAAc,gBAAgB;CACX,CAAA;AAE1B,CAAC"}
@@ -2,6 +2,12 @@ import { ComponentProps, PropsWithChildren } from 'react';
2
2
  import { FlowComponentProps } from '../../../../lib/componentFactory/flowComponent';
3
3
  export interface NavigationGroupProps extends PropsWithChildren<ComponentProps<"section">>, FlowComponentProps<HTMLElement> {
4
4
  collapsable?: boolean;
5
+ /**
6
+ * Whether a `collapsable` group is initially expanded.
7
+ *
8
+ * @default true
9
+ */
10
+ defaultExpanded?: boolean;
5
11
  }
6
12
  /** @flr-generate all */
7
13
  export declare const NavigationGroup: import('react').FunctionComponent<NavigationGroupProps & import('react').RefAttributes<HTMLElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationGroup.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Navigation/components/NavigationGroup/NavigationGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAOpE,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAG9C,MAAM,WAAW,oBACf,SACE,iBAAiB,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,EAC5C,kBAAkB,CAAC,WAAW,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAwB;AACxB,eAAO,MAAM,eAAe,sGAwD1B,CAAC;AAEH,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"NavigationGroup.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Navigation/components/NavigationGroup/NavigationGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAOpE,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAG9C,MAAM,WAAW,oBACf,SACE,iBAAiB,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,EAC5C,kBAAkB,CAAC,WAAW,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAwB;AACxB,eAAO,MAAM,eAAe,sGAyD1B,CAAC;AAEH,eAAe,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.2.0-alpha.1033",
3
+ "version": "0.2.0-alpha.1034",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://flow.mittwald.de",
@@ -74,9 +74,9 @@
74
74
  "@internationalized/string-compiler": "^3.4.1",
75
75
  "@lezer/common": "^1.5.2",
76
76
  "@lezer/highlight": "^1.2.3",
77
- "@mittwald/flow-icons": "0.2.0-alpha.1033",
77
+ "@mittwald/flow-icons": "0.2.0-alpha.1034",
78
78
  "@mittwald/password-tools-js": "3.0.0-alpha.31",
79
- "@mittwald/react-tunnel": "0.2.0-alpha.1033",
79
+ "@mittwald/react-tunnel": "0.2.0-alpha.1034",
80
80
  "@mittwald/react-use-promise": "^4.2.2",
81
81
  "@react-aria/form": "^3.2.1",
82
82
  "@react-aria/i18n": "^3.13.1",
@@ -130,12 +130,12 @@
130
130
  "@internationalized/date": "^3.12.2",
131
131
  "@lezer/generator": "^1.8.0",
132
132
  "@lezer/lr": "^1.4.10",
133
- "@mittwald/flow-core": "0.2.0-alpha.1033",
134
- "@mittwald/flow-design-tokens": "0.2.0-alpha.1033",
135
- "@mittwald/flow-icons-base": "0.2.0-alpha.1033",
133
+ "@mittwald/flow-core": "0.2.0-alpha.1034",
134
+ "@mittwald/flow-design-tokens": "0.2.0-alpha.1034",
135
+ "@mittwald/flow-icons-base": "0.2.0-alpha.1034",
136
136
  "@mittwald/react-use-promise": "^4.2.2",
137
137
  "@mittwald/remote-dom-react": "1.2.2-mittwald.10",
138
- "@mittwald/typescript-config": "0.2.0-alpha.1033",
138
+ "@mittwald/typescript-config": "0.2.0-alpha.1034",
139
139
  "@nx/storybook": "^22.7.6",
140
140
  "@storybook/addon-a11y": "^10.4.6",
141
141
  "@storybook/addon-actions": "^9.0.8",
@@ -186,7 +186,7 @@
186
186
  },
187
187
  "peerDependencies": {
188
188
  "@internationalized/date": "^3.12.2",
189
- "@mittwald/flow-icons-pro": "0.2.0-alpha.1033",
189
+ "@mittwald/flow-icons-pro": "0.2.0-alpha.1034",
190
190
  "@mittwald/react-use-promise": "^4.2.2",
191
191
  "next": "^16.2.3",
192
192
  "react": "^19.2.0",
@@ -207,5 +207,5 @@
207
207
  "optional": true
208
208
  }
209
209
  },
210
- "gitHead": "1e93dee00797e8702e30c53c403f9a33029c9634"
210
+ "gitHead": "f86c44ffa927037a7f77b40d6df99d5603ac1782"
211
211
  }