@hh.ru/magritte-ui-action-list 8.1.17 → 8.1.18

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 (2) hide show
  1. package/ActionList.js.map +1 -1
  2. package/package.json +10 -10
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';\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 as React.Ref<HTMLElement>);\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 padding={dropProps.padding || 16}\n visible={visible}\n >\n {children}\n </Drop>\n <BottomSheet {...bottomSheetProps} {...commonProps} height=\"content\" visible={visible}>\n {children}\n <VS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AAO,YAEf,QAAQ,EAAA,CACN,EACPD,IAAA,CAAC,WAAW,EAAA,EAAA,GAAK,gBAAgB,EAAM,GAAA,WAAW,EAAE,MAAM,EAAC,SAAS,EAAC,OAAO,EAAE,OAAO,EAChF,QAAA,EAAA,CAAA,QAAQ,EACTC,GAAC,CAAA,QAAQ,IAAC,OAAO,EAAE,EAAE,EAAI,CAAA,CAAA,EAAA,CACf,CACf,EAAA,CAAA,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 as React.Ref<HTMLElement>);\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 padding={dropProps.padding || 16}\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,GAA6B,CAAC,CAAC;IAE1F,SAAS,CAAC,MAAK;QACX,IAAI,CAAC,OAAO,EAAE;AACV,YAAA,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;AACD,YAAA,mBAAmB,CAAC,OAAO,GAAG,KAAK,CAAC;SACvC;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;qBACtC;iBACJ,EACD,GAAG,EAAE,eAAe,EACpB,OAAO,EAAE,SAAS,CAAC,OAAO,IAAI,EAAE,EAChC,OAAO,EAAE,OAAO,YAEf,QAAQ,EAAA,CACN,EACPD,IAAA,CAAC,WAAW,EAAA,EAAA,GAAK,gBAAgB,EAAM,GAAA,WAAW,EAAE,MAAM,EAAC,SAAS,EAAC,OAAO,EAAE,OAAO,EAChF,QAAA,EAAA,CAAA,QAAQ,EACTC,GAAC,CAAA,QAAQ,IAAC,OAAO,EAAE,EAAE,EAAI,CAAA,CAAA,EAAA,CACf,CACf,EAAA,CAAA,EACL;AACN,EAAE;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hh.ru/magritte-ui-action-list",
3
- "version": "8.1.17",
3
+ "version": "8.1.18",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "sideEffects": [
@@ -19,14 +19,14 @@
19
19
  "watch": "yarn root:watch $(pwd)"
20
20
  },
21
21
  "dependencies": {
22
- "@hh.ru/magritte-common-keyboard": "4.3.0",
23
- "@hh.ru/magritte-common-use-multiple-refs": "1.1.10",
24
- "@hh.ru/magritte-internal-drop-base": "7.1.17",
25
- "@hh.ru/magritte-ui-bottom-sheet": "9.2.12",
26
- "@hh.ru/magritte-ui-breakpoint": "6.0.6",
27
- "@hh.ru/magritte-ui-button": "7.1.4",
28
- "@hh.ru/magritte-ui-drop": "12.2.3",
29
- "@hh.ru/magritte-ui-spacing": "2.1.10"
22
+ "@hh.ru/magritte-common-keyboard": "4.3.1",
23
+ "@hh.ru/magritte-common-use-multiple-refs": "1.1.11",
24
+ "@hh.ru/magritte-internal-drop-base": "7.1.18",
25
+ "@hh.ru/magritte-ui-bottom-sheet": "9.2.13",
26
+ "@hh.ru/magritte-ui-breakpoint": "6.0.7",
27
+ "@hh.ru/magritte-ui-button": "7.1.5",
28
+ "@hh.ru/magritte-ui-drop": "12.2.4",
29
+ "@hh.ru/magritte-ui-spacing": "2.1.11"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "react": ">=18.2.0"
@@ -34,5 +34,5 @@
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "gitHead": "7cea3ac4f7f947bba409d2fbc29284343113c4ba"
37
+ "gitHead": "ec7d56f576ca5581c2acb5010b53bbfb8da52962"
38
38
  }