@hh.ru/magritte-ui-action-list 6.0.0 → 6.0.2

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/ActionList.js CHANGED
@@ -4,6 +4,7 @@ import { keyboardMatches, keyboardKeys } from '@hh.ru/magritte-common-keyboard';
4
4
  import { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';
5
5
  import { BottomSheet } from '@hh.ru/magritte-ui-bottom-sheet';
6
6
  import { Drop } from '@hh.ru/magritte-ui-drop';
7
+ import { VSpacing } from '@hh.ru/magritte-ui-spacing';
7
8
 
8
9
  const ActionList = ({ children, dropProps, bottomSheetProps, visible, ...commonProps }) => {
9
10
  const closedByKeyboardRef = useRef(false);
@@ -25,7 +26,7 @@ const ActionList = ({ children, dropProps, bottomSheetProps, visible, ...commonP
25
26
  ])) {
26
27
  closedByKeyboardRef.current = true;
27
28
  }
28
- }, ref: dropRefCallback, space: 400, visible: visible, children: children }), jsx(BottomSheet, { ...bottomSheetProps, ...commonProps, height: "content", visible: visible, children: children })] }));
29
+ }, ref: dropRefCallback, space: 400, visible: visible, children: children }), jsxs(BottomSheet, { ...bottomSheetProps, ...commonProps, height: "content", visible: visible, children: [children, jsx(VSpacing, { default: 16 })] })] }));
29
30
  };
30
31
  ActionList.displayName = 'ActionList';
31
32
 
package/ActionList.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ActionList.js","sources":["../src/ActionList.tsx"],"sourcesContent":["import { FC, KeyboardEvent as ReactKeyboardEvent, useEffect, useRef } from 'react';\n\nimport { keyboardKeys, keyboardMatches } from '@hh.ru/magritte-common-keyboard';\nimport { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';\nimport { ActionListProps } from '@hh.ru/magritte-ui-action-list/types';\nimport { BottomSheet } from '@hh.ru/magritte-ui-bottom-sheet';\nimport { Drop } from '@hh.ru/magritte-ui-drop';\n\nexport const ActionList: FC<ActionListProps> = ({ children, dropProps, bottomSheetProps, visible, ...commonProps }) => {\n const closedByKeyboardRef = useRef(false);\n const dropRef = useRef<HTMLElement>(null);\n const dropRefCallback = useMultipleRefs(dropRef, dropProps.ref);\n\n useEffect(() => {\n if (!visible) {\n if (closedByKeyboardRef.current && dropProps.activatorRef.current !== null) {\n dropProps.activatorRef.current.focus();\n }\n closedByKeyboardRef.current = false;\n }\n }, [dropProps.activatorRef, visible]);\n\n return (\n <>\n <Drop\n {...dropProps}\n {...commonProps}\n autoFocusWhenOpened\n keyboardNavigationMode=\"list\"\n onKeyDownCapture={(event: ReactKeyboardEvent) => {\n if (\n keyboardMatches(event.nativeEvent, [\n keyboardKeys.Enter,\n keyboardKeys.Escape,\n keyboardKeys.Space,\n ])\n ) {\n closedByKeyboardRef.current = true;\n }\n }}\n ref={dropRefCallback}\n space={400}\n visible={visible}\n >\n {children}\n </Drop>\n <BottomSheet {...bottomSheetProps} {...commonProps} height=\"content\" visible={visible}>\n {children}\n </BottomSheet>\n </>\n );\n};\n\nActionList.displayName = 'ActionList';\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;AAQa,MAAA,UAAU,GAAwB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,OAAO,EAAE,GAAG,WAAW,EAAE,KAAI;AAClH,IAAA,MAAM,mBAAmB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1C,IAAA,MAAM,OAAO,GAAG,MAAM,CAAc,IAAI,CAAC,CAAC;IAC1C,MAAM,eAAe,GAAG,eAAe,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IAEhE,SAAS,CAAC,MAAK;QACX,IAAI,CAAC,OAAO,EAAE;YACV,IAAI,mBAAmB,CAAC,OAAO,IAAI,SAAS,CAAC,YAAY,CAAC,OAAO,KAAK,IAAI,EAAE;AACxE,gBAAA,SAAS,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;AAC1C,aAAA;AACD,YAAA,mBAAmB,CAAC,OAAO,GAAG,KAAK,CAAC;AACvC,SAAA;KACJ,EAAE,CAAC,SAAS,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC;IAEtC,QACIA,4BACIC,GAAC,CAAA,IAAI,OACG,SAAS,EAAA,GACT,WAAW,EACf,mBAAmB,QACnB,sBAAsB,EAAC,MAAM,EAC7B,gBAAgB,EAAE,CAAC,KAAyB,KAAI;AAC5C,oBAAA,IACI,eAAe,CAAC,KAAK,CAAC,WAAW,EAAE;AAC/B,wBAAA,YAAY,CAAC,KAAK;AAClB,wBAAA,YAAY,CAAC,MAAM;AACnB,wBAAA,YAAY,CAAC,KAAK;AACrB,qBAAA,CAAC,EACJ;AACE,wBAAA,mBAAmB,CAAC,OAAO,GAAG,IAAI,CAAC;AACtC,qBAAA;AACL,iBAAC,EACD,GAAG,EAAE,eAAe,EACpB,KAAK,EAAE,GAAG,EACV,OAAO,EAAE,OAAO,EAEf,QAAA,EAAA,QAAQ,GACN,EACPA,GAAA,CAAC,WAAW,EAAA,EAAA,GAAK,gBAAgB,EAAM,GAAA,WAAW,EAAE,MAAM,EAAC,SAAS,EAAC,OAAO,EAAE,OAAO,EAChF,QAAA,EAAA,QAAQ,EACC,CAAA,CAAA,EAAA,CACf,EACL;AACN,EAAE;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}
1
+ {"version":3,"file":"ActionList.js","sources":["../src/ActionList.tsx"],"sourcesContent":["import { FC, KeyboardEvent as ReactKeyboardEvent, useEffect, useRef } from 'react';\n\nimport { keyboardKeys, keyboardMatches } from '@hh.ru/magritte-common-keyboard';\nimport { useMultipleRefs } from '@hh.ru/magritte-common-use-multiple-refs';\nimport { ActionListProps } from '@hh.ru/magritte-ui-action-list/types';\nimport { BottomSheet } from '@hh.ru/magritte-ui-bottom-sheet';\nimport { Drop } from '@hh.ru/magritte-ui-drop';\nimport { VSpacing } from '@hh.ru/magritte-ui-spacing';\n\nexport const ActionList: FC<ActionListProps> = ({ children, dropProps, bottomSheetProps, visible, ...commonProps }) => {\n const closedByKeyboardRef = useRef(false);\n const dropRef = useRef<HTMLElement>(null);\n const dropRefCallback = useMultipleRefs(dropRef, dropProps.ref);\n\n useEffect(() => {\n if (!visible) {\n if (closedByKeyboardRef.current && dropProps.activatorRef.current !== null) {\n dropProps.activatorRef.current.focus();\n }\n closedByKeyboardRef.current = false;\n }\n }, [dropProps.activatorRef, visible]);\n\n return (\n <>\n <Drop\n {...dropProps}\n {...commonProps}\n autoFocusWhenOpened\n keyboardNavigationMode=\"list\"\n onKeyDownCapture={(event: ReactKeyboardEvent) => {\n if (\n keyboardMatches(event.nativeEvent, [\n keyboardKeys.Enter,\n keyboardKeys.Escape,\n keyboardKeys.Space,\n ])\n ) {\n closedByKeyboardRef.current = true;\n }\n }}\n ref={dropRefCallback}\n space={400}\n visible={visible}\n >\n {children}\n </Drop>\n <BottomSheet {...bottomSheetProps} {...commonProps} height=\"content\" visible={visible}>\n {children}\n <VSpacing default={16} />\n </BottomSheet>\n </>\n );\n};\n\nActionList.displayName = 'ActionList';\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;AASa,MAAA,UAAU,GAAwB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,OAAO,EAAE,GAAG,WAAW,EAAE,KAAI;AAClH,IAAA,MAAM,mBAAmB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1C,IAAA,MAAM,OAAO,GAAG,MAAM,CAAc,IAAI,CAAC,CAAC;IAC1C,MAAM,eAAe,GAAG,eAAe,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IAEhE,SAAS,CAAC,MAAK;QACX,IAAI,CAAC,OAAO,EAAE;YACV,IAAI,mBAAmB,CAAC,OAAO,IAAI,SAAS,CAAC,YAAY,CAAC,OAAO,KAAK,IAAI,EAAE;AACxE,gBAAA,SAAS,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;AAC1C,aAAA;AACD,YAAA,mBAAmB,CAAC,OAAO,GAAG,KAAK,CAAC;AACvC,SAAA;KACJ,EAAE,CAAC,SAAS,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC;IAEtC,QACIA,4BACIC,GAAC,CAAA,IAAI,OACG,SAAS,EAAA,GACT,WAAW,EACf,mBAAmB,QACnB,sBAAsB,EAAC,MAAM,EAC7B,gBAAgB,EAAE,CAAC,KAAyB,KAAI;AAC5C,oBAAA,IACI,eAAe,CAAC,KAAK,CAAC,WAAW,EAAE;AAC/B,wBAAA,YAAY,CAAC,KAAK;AAClB,wBAAA,YAAY,CAAC,MAAM;AACnB,wBAAA,YAAY,CAAC,KAAK;AACrB,qBAAA,CAAC,EACJ;AACE,wBAAA,mBAAmB,CAAC,OAAO,GAAG,IAAI,CAAC;AACtC,qBAAA;AACL,iBAAC,EACD,GAAG,EAAE,eAAe,EACpB,KAAK,EAAE,GAAG,EACV,OAAO,EAAE,OAAO,YAEf,QAAQ,EAAA,CACN,EACPD,IAAC,CAAA,WAAW,OAAK,gBAAgB,EAAA,GAAM,WAAW,EAAE,MAAM,EAAC,SAAS,EAAC,OAAO,EAAE,OAAO,aAChF,QAAQ,EACTC,IAAC,QAAQ,EAAA,EAAC,OAAO,EAAE,EAAE,GAAI,CACf,EAAA,CAAA,CAAA,EAAA,CACf,EACL;AACN,EAAE;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}
package/index.js CHANGED
@@ -6,4 +6,5 @@ import '@hh.ru/magritte-common-keyboard';
6
6
  import '@hh.ru/magritte-common-use-multiple-refs';
7
7
  import '@hh.ru/magritte-ui-bottom-sheet';
8
8
  import '@hh.ru/magritte-ui-drop';
9
+ import '@hh.ru/magritte-ui-spacing';
9
10
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-action-list",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -22,11 +22,12 @@
22
22
  "dependencies": {
23
23
  "@hh.ru/magritte-common-keyboard": "4.0.1",
24
24
  "@hh.ru/magritte-common-use-multiple-refs": "1.1.4",
25
- "@hh.ru/magritte-internal-drop-base": "7.0.0",
26
- "@hh.ru/magritte-ui-bottom-sheet": "5.1.3",
25
+ "@hh.ru/magritte-internal-drop-base": "7.0.1",
26
+ "@hh.ru/magritte-ui-bottom-sheet": "5.1.4",
27
27
  "@hh.ru/magritte-ui-breakpoint": "4.0.3",
28
28
  "@hh.ru/magritte-ui-button": "5.1.1",
29
- "@hh.ru/magritte-ui-drop": "7.0.0",
29
+ "@hh.ru/magritte-ui-drop": "7.0.1",
30
+ "@hh.ru/magritte-ui-spacing": "2.0.26",
30
31
  "@hh.ru/magritte-ui-theme-provider": "1.1.26"
31
32
  },
32
33
  "peerDependencies": {
@@ -35,5 +36,5 @@
35
36
  "publishConfig": {
36
37
  "access": "public"
37
38
  },
38
- "gitHead": "e7a6ffbcfdc2a1626062c73336e4d389433327d8"
39
+ "gitHead": "c91bf52c832472bc78b6cd37e5f8ff12a5866075"
39
40
  }