@bitrise/bitkit-v2 0.3.502-beta.3238 → 0.3.502-beta.3240

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.
@@ -6,7 +6,9 @@ import { MouseEvent } from 'react';
6
6
  *
7
7
  * Spread it after the consumer's props. `onClick` cancels the click, which a mouse press, Enter,
8
8
  * Space and a form's implicit submission all go through, so nothing activates the button; it also
9
- * replaces a dialog or popover trigger's handler, which bails on `defaultPrevented` anyway.
9
+ * replaces a dialog or popover trigger's handler, which bails on `defaultPrevented` anyway. It stops
10
+ * propagation too: a natively disabled button fires no click at all, so a clickable row or card
11
+ * around it must not get one either.
10
12
  * `onKeyDown` is cleared so a menu trigger's arrow keys don't open the menu. `data-disabled` must be
11
13
  * exactly `""`: the recipe's `_disabled` matches any value, but Zag's menu trigger only treats `""`
12
14
  * as disabled.
@@ -6,7 +6,9 @@
6
6
  *
7
7
  * Spread it after the consumer's props. `onClick` cancels the click, which a mouse press, Enter,
8
8
  * Space and a form's implicit submission all go through, so nothing activates the button; it also
9
- * replaces a dialog or popover trigger's handler, which bails on `defaultPrevented` anyway.
9
+ * replaces a dialog or popover trigger's handler, which bails on `defaultPrevented` anyway. It stops
10
+ * propagation too: a natively disabled button fires no click at all, so a clickable row or card
11
+ * around it must not get one either.
10
12
  * `onKeyDown` is cleared so a menu trigger's arrow keys don't open the menu. `data-disabled` must be
11
13
  * exactly `""`: the recipe's `_disabled` matches any value, but Zag's menu trigger only treats `""`
12
14
  * as disabled.
@@ -14,7 +16,10 @@
14
16
  var focusableDisabledProps = {
15
17
  "aria-disabled": true,
16
18
  "data-disabled": "",
17
- onClick: (event) => event.preventDefault(),
19
+ onClick: (event) => {
20
+ event.preventDefault();
21
+ event.stopPropagation();
22
+ },
18
23
  onKeyDown: void 0
19
24
  };
20
25
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"focusableDisabledProps.js","names":[],"sources":["../../lib/utilities/focusableDisabledProps.ts"],"sourcesContent":["import { type MouseEvent } from 'react';\n\n/**\n * Disables a button without the native `disabled` attribute, for a button whose tooltip explains\n * why: a natively disabled `<button>` gets no pointer events and no focus, so that tooltip could\n * never open. It stays focusable and is announced as unavailable via `aria-disabled`.\n *\n * Spread it after the consumer's props. `onClick` cancels the click, which a mouse press, Enter,\n * Space and a form's implicit submission all go through, so nothing activates the button; it also\n * replaces a dialog or popover trigger's handler, which bails on `defaultPrevented` anyway.\n * `onKeyDown` is cleared so a menu trigger's arrow keys don't open the menu. `data-disabled` must be\n * exactly `\"\"`: the recipe's `_disabled` matches any value, but Zag's menu trigger only treats `\"\"`\n * as disabled.\n */\nconst focusableDisabledProps = {\n 'aria-disabled': true,\n 'data-disabled': '',\n onClick: (event: MouseEvent) => event.preventDefault(),\n onKeyDown: undefined,\n} as const;\n\nexport default focusableDisabledProps;\n"],"mappings":";;;;;;;;;;;;;AAcA,IAAM,yBAAyB;CAC7B,iBAAiB;CACjB,iBAAiB;CACjB,UAAU,UAAsB,MAAM,eAAe;CACrD,WAAW,KAAA;AACb"}
1
+ {"version":3,"file":"focusableDisabledProps.js","names":[],"sources":["../../lib/utilities/focusableDisabledProps.ts"],"sourcesContent":["import { type MouseEvent } from 'react';\n\n/**\n * Disables a button without the native `disabled` attribute, for a button whose tooltip explains\n * why: a natively disabled `<button>` gets no pointer events and no focus, so that tooltip could\n * never open. It stays focusable and is announced as unavailable via `aria-disabled`.\n *\n * Spread it after the consumer's props. `onClick` cancels the click, which a mouse press, Enter,\n * Space and a form's implicit submission all go through, so nothing activates the button; it also\n * replaces a dialog or popover trigger's handler, which bails on `defaultPrevented` anyway. It stops\n * propagation too: a natively disabled button fires no click at all, so a clickable row or card\n * around it must not get one either.\n * `onKeyDown` is cleared so a menu trigger's arrow keys don't open the menu. `data-disabled` must be\n * exactly `\"\"`: the recipe's `_disabled` matches any value, but Zag's menu trigger only treats `\"\"`\n * as disabled.\n */\nconst focusableDisabledProps = {\n 'aria-disabled': true,\n 'data-disabled': '',\n onClick: (event: MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n },\n onKeyDown: undefined,\n} as const;\n\nexport default focusableDisabledProps;\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,IAAM,yBAAyB;CAC7B,iBAAiB;CACjB,iBAAiB;CACjB,UAAU,UAAsB;EAC9B,MAAM,eAAe;EACrB,MAAM,gBAAgB;CACxB;CACA,WAAW,KAAA;AACb"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit-v2",
3
3
  "private": false,
4
- "version": "0.3.502-beta.3238",
4
+ "version": "0.3.502-beta.3240",
5
5
  "description": "Bitrise Design System Components built with Chakra UI V3",
6
6
  "keywords": [
7
7
  "react",