@mittwald/flow-react-components 0.2.0-alpha.180 → 0.2.0-alpha.181

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuSection.mjs","sources":["../../../../../../../../src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { PropsWithChildren } from \"react\";\nimport React from \"react\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport styles from \"../../ContextMenu.module.scss\";\nimport type { ContextMenuSelectionMode } from \"@/components/ContextMenu/lib\";\nimport {\n getAriaSelectionMode,\n getCloseOverlayType,\n getMenuItemSelectionVariant,\n} from \"@/components/ContextMenu/lib\";\nimport { Action } from \"@/components/Action\";\n\nexport type ContextMenuSectionProps = PropsWithChildren &\n FlowComponentProps & {\n selectionMode?: ContextMenuSelectionMode;\n };\n\n/** @flr-generate all */\nexport const ContextMenuSection = flowComponent(\n \"ContextMenuSection\",\n (props) => {\n const { children, selectionMode, ref, ...rest } = props;\n\n const selectionVariant = getMenuItemSelectionVariant(selectionMode);\n\n const propsContext: PropsContext = {\n Heading: {\n level: 5,\n wrapWith: <Aria.Header />,\n },\n MenuItem: {\n selectionVariant,\n },\n };\n\n return (\n <Aria.MenuSection\n ref={ref}\n {...rest}\n selectionMode={getAriaSelectionMode(selectionMode)}\n className={styles.section}\n >\n <PropsContextProvider props={propsContext} mergeInParentContext>\n <Action skip>\n <Action closeOverlay={getCloseOverlayType(selectionMode)}>\n {children}\n </Action>\n </Action>\n </PropsContextProvider>\n </Aria.MenuSection>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;;;;AAsBO,MAAM,kBAAqB,GAAA,aAAA;AAAA,EAChC,oBAAA;AAAA,EACA,CAAC,KAAU,KAAA;AACT,IAAA,MAAM,EAAE,QAAU,EAAA,aAAA,EAAe,GAAK,EAAA,GAAG,MAAS,GAAA,KAAA;AAElD,IAAM,MAAA,gBAAA,GAAmB,4BAA4B,aAAa,CAAA;AAElE,IAAA,MAAM,YAA6B,GAAA;AAAA,MACjC,OAAS,EAAA;AAAA,QACP,KAAO,EAAA,CAAA;AAAA,QACP,QAAU,kBAAA,GAAA,CAAC,IAAK,CAAA,MAAA,EAAL,EAAY;AAAA,OACzB;AAAA,MACA,QAAU,EAAA;AAAA,QACR;AAAA;AACF,KACF;AAEA,IACE,uBAAA,GAAA;AAAA,MAAC,IAAK,CAAA,WAAA;AAAA,MAAL;AAAA,QACC,GAAA;AAAA,QACC,GAAG,IAAA;AAAA,QACJ,aAAA,EAAe,qBAAqB,aAAa,CAAA;AAAA,QACjD,WAAW,MAAO,CAAA,OAAA;AAAA,QAElB,8BAAC,oBAAqB,EAAA,EAAA,KAAA,EAAO,cAAc,oBAAoB,EAAA,IAAA,EAC7D,8BAAC,MAAO,EAAA,EAAA,IAAA,EAAI,IACV,EAAA,QAAA,kBAAA,GAAA,CAAC,UAAO,YAAc,EAAA,mBAAA,CAAoB,aAAa,CACpD,EAAA,QAAA,EACH,GACF,CACF,EAAA;AAAA;AAAA,KACF;AAAA;AAGN;;;;"}
1
+ {"version":3,"file":"ContextMenuSection.mjs","sources":["../../../../../../../../src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { PropsWithChildren } from \"react\";\nimport React from \"react\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport styles from \"../../ContextMenu.module.scss\";\nimport type { ContextMenuSelectionMode } from \"@/components/ContextMenu/lib\";\nimport {\n getAriaSelectionMode,\n getCloseOverlayType,\n getMenuItemSelectionVariant,\n} from \"@/components/ContextMenu/lib\";\nimport { Action } from \"@/components/Action\";\nimport type { MenuItemProps } from \"@/components/MenuItem\";\n\nexport type ContextMenuSectionProps = PropsWithChildren &\n FlowComponentProps &\n Pick<Aria.MenuSectionProps<MenuItemProps>, \"defaultSelectedKeys\"> & {\n selectionMode?: ContextMenuSelectionMode;\n };\n\n/** @flr-generate all */\nexport const ContextMenuSection = flowComponent(\n \"ContextMenuSection\",\n (props) => {\n const { children, selectionMode, ref, ...rest } = props;\n\n const selectionVariant = getMenuItemSelectionVariant(selectionMode);\n\n const propsContext: PropsContext = {\n Heading: {\n level: 5,\n wrapWith: <Aria.Header />,\n },\n MenuItem: {\n selectionVariant,\n },\n };\n\n return (\n <Aria.MenuSection\n ref={ref}\n {...rest}\n selectionMode={getAriaSelectionMode(selectionMode)}\n className={styles.section}\n >\n <PropsContextProvider props={propsContext} mergeInParentContext>\n <Action skip>\n <Action closeOverlay={getCloseOverlayType(selectionMode)}>\n {children}\n </Action>\n </Action>\n </PropsContextProvider>\n </Aria.MenuSection>\n );\n },\n);\n"],"names":[],"mappings":";;;;;;;;;;;AAwBO,MAAM,kBAAqB,GAAA,aAAA;AAAA,EAChC,oBAAA;AAAA,EACA,CAAC,KAAU,KAAA;AACT,IAAA,MAAM,EAAE,QAAU,EAAA,aAAA,EAAe,GAAK,EAAA,GAAG,MAAS,GAAA,KAAA;AAElD,IAAM,MAAA,gBAAA,GAAmB,4BAA4B,aAAa,CAAA;AAElE,IAAA,MAAM,YAA6B,GAAA;AAAA,MACjC,OAAS,EAAA;AAAA,QACP,KAAO,EAAA,CAAA;AAAA,QACP,QAAU,kBAAA,GAAA,CAAC,IAAK,CAAA,MAAA,EAAL,EAAY;AAAA,OACzB;AAAA,MACA,QAAU,EAAA;AAAA,QACR;AAAA;AACF,KACF;AAEA,IACE,uBAAA,GAAA;AAAA,MAAC,IAAK,CAAA,WAAA;AAAA,MAAL;AAAA,QACC,GAAA;AAAA,QACC,GAAG,IAAA;AAAA,QACJ,aAAA,EAAe,qBAAqB,aAAa,CAAA;AAAA,QACjD,WAAW,MAAO,CAAA,OAAA;AAAA,QAElB,8BAAC,oBAAqB,EAAA,EAAA,KAAA,EAAO,cAAc,oBAAoB,EAAA,IAAA,EAC7D,8BAAC,MAAO,EAAA,EAAA,IAAA,EAAI,IACV,EAAA,QAAA,kBAAA,GAAA,CAAC,UAAO,YAAc,EAAA,mBAAA,CAAoB,aAAa,CACpD,EAAA,QAAA,EACH,GACF,CACF,EAAA;AAAA;AAAA,KACF;AAAA;AAGN;;;;"}
@@ -1,13 +1,15 @@
1
1
  import { PropsWithChildren, default as React } from 'react';
2
2
  import { FlowComponentProps } from '../../../../lib/componentFactory/flowComponent';
3
3
  import { ContextMenuSelectionMode } from '../../lib';
4
- export type ContextMenuSectionProps = PropsWithChildren & FlowComponentProps & {
4
+ import { MenuItemProps } from '../../../MenuItem';
5
+ import * as Aria from "react-aria-components";
6
+ export type ContextMenuSectionProps = PropsWithChildren & FlowComponentProps & Pick<Aria.MenuSectionProps<MenuItemProps>, "defaultSelectedKeys"> & {
5
7
  selectionMode?: ContextMenuSelectionMode;
6
8
  };
7
9
  /** @flr-generate all */
8
10
  export declare const ContextMenuSection: React.FunctionComponent<{
9
11
  children?: React.ReactNode | undefined;
10
- } & FlowComponentProps<HTMLDivElement> & {
12
+ } & FlowComponentProps<HTMLDivElement> & Pick<Aria.MenuSectionProps<MenuItemProps>, "defaultSelectedKeys"> & {
11
13
  selectionMode?: ContextMenuSelectionMode;
12
14
  } & React.RefAttributes<HTMLDivElement>>;
13
15
  //# sourceMappingURL=ContextMenuSection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenuSection.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG/E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAQ7E,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GACrD,kBAAkB,GAAG;IACnB,aAAa,CAAC,EAAE,wBAAwB,CAAC;CAC1C,CAAC;AAEJ,wBAAwB;AACxB,eAAO,MAAM,kBAAkB;;;oBAJX,wBAAwB;wCAsC3C,CAAC"}
1
+ {"version":3,"file":"ContextMenuSection.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG/E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAO7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GACrD,kBAAkB,GAClB,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,qBAAqB,CAAC,GAAG;IAClE,aAAa,CAAC,EAAE,wBAAwB,CAAC;CAC1C,CAAC;AAEJ,wBAAwB;AACxB,eAAO,MAAM,kBAAkB;;;oBAJX,wBAAwB;wCAsC3C,CAAC"}
@@ -40,13 +40,13 @@ export declare const typedList: <T>() => {
40
40
  onHoverStart?: ((e: import('react-aria').HoverEvent) => void) | undefined;
41
41
  onHoverEnd?: ((e: import('react-aria').HoverEvent) => void) | undefined;
42
42
  onHoverChange?: ((isHovering: boolean) => void) | undefined;
43
- dependencies?: ReadonlyArray<any> | undefined;
44
- download?: boolean | string | undefined;
43
+ textValue?: string | undefined;
45
44
  hrefLang?: string | undefined;
45
+ download?: boolean | string | undefined;
46
46
  ping?: string | undefined;
47
47
  referrerPolicy?: import('react').HTMLAttributeReferrerPolicy | undefined;
48
48
  routerOptions?: import('@react-types/shared').RouterOptions | undefined;
49
- textValue?: string | undefined;
49
+ dependencies?: ReadonlyArray<any> | undefined;
50
50
  columns?: Iterable<never> | undefined;
51
51
  }) => null;
52
52
  TableCell: (ignoredProps: Omit<import('./model/table/types').TableCellShape<T>, "renderFn"> & {
@@ -57,6 +57,7 @@ export declare const typedList: <T>() => {
57
57
  style?: import('react').CSSProperties | ((values: import('react-aria-components').TableRenderProps & {
58
58
  defaultStyle: import('react').CSSProperties;
59
59
  }) => import('react').CSSProperties | undefined) | undefined;
60
+ defaultSelectedKeys?: ("all" | Iterable<import('react-aria').Key>) | undefined;
60
61
  children?: import('react').ReactNode;
61
62
  className?: string | ((values: import('react-aria-components').TableRenderProps & {
62
63
  defaultClassName: string | undefined;
@@ -70,7 +71,6 @@ export declare const typedList: <T>() => {
70
71
  onSelectionChange?: ((keys: import('react-stately').Selection) => void) | undefined;
71
72
  disabledKeys?: Iterable<import('react-aria').Key> | undefined;
72
73
  selectedKeys?: ("all" | Iterable<import('react-aria').Key>) | undefined;
73
- defaultSelectedKeys?: ("all" | Iterable<import('react-aria').Key>) | undefined;
74
74
  selectionMode?: import('react-stately').SelectionMode | undefined;
75
75
  selectionBehavior?: import('react-stately').SelectionBehavior | undefined;
76
76
  dragAndDropHooks?: import('react-aria-components').DragAndDropHooks | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.2.0-alpha.180",
3
+ "version": "0.2.0-alpha.181",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -53,7 +53,7 @@
53
53
  "dependencies": {
54
54
  "@chakra-ui/live-region": "^2.1.0",
55
55
  "@internationalized/string-compiler": "^3.2.6",
56
- "@mittwald/react-tunnel": "0.2.0-alpha.180",
56
+ "@mittwald/react-tunnel": "0.2.0-alpha.181",
57
57
  "@mittwald/react-use-promise": "^3.0.4",
58
58
  "@react-aria/form": "^3.0.14",
59
59
  "@react-aria/utils": "^3.28.1",
@@ -92,7 +92,7 @@
92
92
  "devDependencies": {
93
93
  "@faker-js/faker": "^9.6.0",
94
94
  "@internationalized/date": "^3.7.0",
95
- "@mittwald/flow-design-tokens": "0.2.0-alpha.180",
95
+ "@mittwald/flow-design-tokens": "0.2.0-alpha.181",
96
96
  "@mittwald/react-use-promise": "^2.6.0",
97
97
  "@mittwald/remote-dom-react": "1.2.2-mittwald.3",
98
98
  "@mittwald/typescript-config": "",
@@ -173,5 +173,5 @@
173
173
  "optional": true
174
174
  }
175
175
  },
176
- "gitHead": "9807472563ca01fd3025e5a36112eed0cda0c40f"
176
+ "gitHead": "5b52b043996b1dac1def293dcb701d795dbdadec"
177
177
  }