@react-fabric/core 1.0.0-beta.53 → 1.0.0-beta.54

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.
@@ -82,7 +82,7 @@
82
82
  }
83
83
 
84
84
  @utility flex-content {
85
- flex: 0 1 auto;
85
+ flex: 0 0 auto;
86
86
  }
87
87
 
88
88
  @utility flex-full {
@@ -95,7 +95,7 @@ var Chip = function Chip(_ref) {
95
95
  }, aria), {}, {
96
96
  children: [icon && /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
97
97
  "data-ref": "chipIcon",
98
- className: classNames("fabric-chipIcon", "m-1 flex-auto"),
98
+ className: classNames("fabric-chipIcon", "m-1 flex-content"),
99
99
  icon: icon,
100
100
  bg: iconBg,
101
101
  onClick: onIconClick,
@@ -101,13 +101,13 @@ var EmptyContent = function EmptyContent(_ref) {
101
101
  icon: icon
102
102
  }), /*#__PURE__*/react.isValidElement(icon) && icon, !icon && /*#__PURE__*/jsxRuntime.jsx(DefaultIcon, {})]
103
103
  }), title && /*#__PURE__*/jsxRuntime.jsx("div", {
104
- className: "font-medium text-center text-dimmed",
104
+ className: "font-medium text-center opacity-85",
105
105
  style: {
106
106
  fontSize: "1.5em"
107
107
  },
108
108
  children: title
109
109
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
110
- className: "font-medium text-center text-muted",
110
+ className: "font-medium text-center opacity-65",
111
111
  style: {
112
112
  fontSize: "0.875em"
113
113
  },
@@ -9,6 +9,7 @@ var usePropToggle = require('../../hooks/usePropToggle.js');
9
9
  var icons = require('../../types/icons.js');
10
10
  var Animations = require('../animations/Animations.js');
11
11
  var Icon = require('../icon/Icon.js');
12
+ var HotKey = require('../../hotkeys/HotKey.js');
12
13
  var jsxRuntime = require('react/jsx-runtime');
13
14
 
14
15
  var _excluded = ["children", "className", "titleClassName", "headerClassName", "title", "actions", "icon", "iconBg", "iconColor", "rtlFlip", "panelId", "height", "width", "minHeight", "minWidth", "maxHeight", "maxWidth", "loading", "expandable", "expanded", "onExpand", "collapsable", "collapsed", "onCollapse", "onClose", "onBack"];
@@ -107,7 +108,10 @@ var Panel = function Panel(_ref) {
107
108
  maxHeight: maxHeight
108
109
  }
109
110
  }, aria), {}, {
110
- children: [/*#__PURE__*/jsxRuntime.jsxs("header", {
111
+ children: [expanded && /*#__PURE__*/jsxRuntime.jsx(HotKey.HotKey, {
112
+ keyCombo: "esc",
113
+ handler: toggleExpand
114
+ }), /*#__PURE__*/jsxRuntime.jsxs("header", {
111
115
  role: "none",
112
116
  className: classNames("fabric-panelHeader", headerClassName, "flex flex-nowrap items-center area-head"),
113
117
  "data-ref": "panelHeader",
@@ -120,7 +120,7 @@ var Flyout = function Flyout(_ref) {
120
120
  children: title
121
121
  }), actions, /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
122
122
  "data-ref": "panelClose",
123
- className: classNames("fabric-panelAction", "cursor-pointer p-1 text-xl self-stretch"),
123
+ className: classNames("fabric-panelAction", "cursor-pointer p-1 text-xl self-center"),
124
124
  icon: icons.CoreIcons.close,
125
125
  onClick: function onClick() {
126
126
  return handleClose(false);
@@ -114,7 +114,7 @@ var Modal = function Modal(_ref) {
114
114
  children: title
115
115
  }), actions, /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
116
116
  "data-ref": "panelClose",
117
- className: classNames("fabric-panelAction", "cursor-pointer p-1 text-xl self-stretch"),
117
+ className: classNames("fabric-panelAction", "cursor-pointer p-1 text-xl self-center"),
118
118
  icon: icons.CoreIcons.close,
119
119
  onClick: function onClick() {
120
120
  return handleClose(false);
@@ -95,7 +95,7 @@ var Chip = function Chip(_ref) {
95
95
  }, aria), {}, {
96
96
  children: [icon && /*#__PURE__*/jsx(Icon, {
97
97
  "data-ref": "chipIcon",
98
- className: classNames("fabric-chipIcon", "m-1 flex-auto"),
98
+ className: classNames("fabric-chipIcon", "m-1 flex-content"),
99
99
  icon: icon,
100
100
  bg: iconBg,
101
101
  onClick: onIconClick,
@@ -101,13 +101,13 @@ var EmptyContent = function EmptyContent(_ref) {
101
101
  icon: icon
102
102
  }), /*#__PURE__*/isValidElement(icon) && icon, !icon && /*#__PURE__*/jsx(DefaultIcon, {})]
103
103
  }), title && /*#__PURE__*/jsx("div", {
104
- className: "font-medium text-center text-dimmed",
104
+ className: "font-medium text-center opacity-85",
105
105
  style: {
106
106
  fontSize: "1.5em"
107
107
  },
108
108
  children: title
109
109
  }), /*#__PURE__*/jsx("div", {
110
- className: "font-medium text-center text-muted",
110
+ className: "font-medium text-center opacity-65",
111
111
  style: {
112
112
  fontSize: "0.875em"
113
113
  },
@@ -9,6 +9,7 @@ import { usePropToggle } from '../../hooks/usePropToggle.js';
9
9
  import { CoreIcons } from '../../types/icons.js';
10
10
  import { Loading } from '../animations/Animations.js';
11
11
  import { Icon } from '../icon/Icon.js';
12
+ import { HotKey } from '../../hotkeys/HotKey.js';
12
13
  import { jsxs, jsx } from 'react/jsx-runtime';
13
14
 
14
15
  var _excluded = ["children", "className", "titleClassName", "headerClassName", "title", "actions", "icon", "iconBg", "iconColor", "rtlFlip", "panelId", "height", "width", "minHeight", "minWidth", "maxHeight", "maxWidth", "loading", "expandable", "expanded", "onExpand", "collapsable", "collapsed", "onCollapse", "onClose", "onBack"];
@@ -107,7 +108,10 @@ var Panel = function Panel(_ref) {
107
108
  maxHeight: maxHeight
108
109
  }
109
110
  }, aria), {}, {
110
- children: [/*#__PURE__*/jsxs("header", {
111
+ children: [expanded && /*#__PURE__*/jsx(HotKey, {
112
+ keyCombo: "esc",
113
+ handler: toggleExpand
114
+ }), /*#__PURE__*/jsxs("header", {
111
115
  role: "none",
112
116
  className: classNames("fabric-panelHeader", headerClassName, "flex flex-nowrap items-center area-head"),
113
117
  "data-ref": "panelHeader",
@@ -120,7 +120,7 @@ var Flyout = function Flyout(_ref) {
120
120
  children: title
121
121
  }), actions, /*#__PURE__*/jsx(Icon, {
122
122
  "data-ref": "panelClose",
123
- className: classNames("fabric-panelAction", "cursor-pointer p-1 text-xl self-stretch"),
123
+ className: classNames("fabric-panelAction", "cursor-pointer p-1 text-xl self-center"),
124
124
  icon: CoreIcons.close,
125
125
  onClick: function onClick() {
126
126
  return handleClose(false);
@@ -114,7 +114,7 @@ var Modal = function Modal(_ref) {
114
114
  children: title
115
115
  }), actions, /*#__PURE__*/jsx(Icon, {
116
116
  "data-ref": "panelClose",
117
- className: classNames("fabric-panelAction", "cursor-pointer p-1 text-xl self-stretch"),
117
+ className: classNames("fabric-panelAction", "cursor-pointer p-1 text-xl self-center"),
118
118
  icon: CoreIcons.close,
119
119
  onClick: function onClick() {
120
120
  return handleClose(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-fabric/core",
3
- "version": "1.0.0-beta.53",
3
+ "version": "1.0.0-beta.54",
4
4
  "description": "RUF: Core package",
5
5
  "author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
6
6
  "license": "MIT",
@@ -54,5 +54,5 @@
54
54
  "node": ">=18.12.0",
55
55
  "npm": ">=8.19.0"
56
56
  },
57
- "gitHead": "1042327831f9c908912c552d5c2704b765a6f9c2"
57
+ "gitHead": "242f15e3de29d365cce6f41f4ef99ab36bb6b995"
58
58
  }
@@ -190,7 +190,7 @@ export const Chip = <Tag extends React.ElementType = "div">({
190
190
  {icon && (
191
191
  <Icon
192
192
  data-ref="chipIcon"
193
- className={classNames("fabric-chipIcon", "m-1 flex-auto")}
193
+ className={classNames("fabric-chipIcon", "m-1 flex-content")}
194
194
  icon={icon}
195
195
  bg={iconBg}
196
196
  onClick={onIconClick}
@@ -164,14 +164,14 @@ export const EmptyContent = ({
164
164
  </div>
165
165
  {title && (
166
166
  <div
167
- className="font-medium text-center text-dimmed"
167
+ className="font-medium text-center opacity-85"
168
168
  style={{ fontSize: "1.5em" }}
169
169
  >
170
170
  {title}
171
171
  </div>
172
172
  )}
173
173
  <div
174
- className="font-medium text-center text-muted"
174
+ className="font-medium text-center opacity-65"
175
175
  style={{ fontSize: "0.875em" }}
176
176
  >
177
177
  {message}
@@ -38,6 +38,7 @@ import {
38
38
  import { CoreIcons } from "../../types/icons";
39
39
  import { Loading } from "../animations/Animations";
40
40
  import { Icon } from "../icon/Icon";
41
+ import { HotKey } from "../../hotkeys/HotKey";
41
42
 
42
43
  export interface PanelProps
43
44
  extends CssProp,
@@ -205,6 +206,7 @@ export const Panel = ({
205
206
  }
206
207
  {...aria}
207
208
  >
209
+ {expanded && <HotKey keyCombo="esc" handler={toggleExpand} />}
208
210
  <header
209
211
  role="none"
210
212
  className={classNames(
@@ -245,7 +245,7 @@ export const Flyout = ({
245
245
  data-ref="panelClose"
246
246
  className={classNames(
247
247
  "fabric-panelAction",
248
- "cursor-pointer p-1 text-xl self-stretch",
248
+ "cursor-pointer p-1 text-xl self-center",
249
249
  )}
250
250
  icon={CoreIcons.close}
251
251
  onClick={() => handleClose(false)}
@@ -240,7 +240,7 @@ export const Modal = ({
240
240
  data-ref="panelClose"
241
241
  className={classNames(
242
242
  "fabric-panelAction",
243
- "cursor-pointer p-1 text-xl self-stretch",
243
+ "cursor-pointer p-1 text-xl self-center",
244
244
  )}
245
245
  icon={CoreIcons.close}
246
246
  onClick={() => handleClose(false)}