@flytedan/flytebot-design-system 0.38.0 → 0.39.0
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/dist/index.cjs +3 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +3 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +51 -57
package/dist/index.cjs
CHANGED
|
@@ -248,9 +248,6 @@ var VARIANTS = {
|
|
|
248
248
|
danger: "fd-btn-danger",
|
|
249
249
|
link: "fd-btn-link"
|
|
250
250
|
};
|
|
251
|
-
function isActivationKey(key) {
|
|
252
|
-
return key === "Enter" || key === " ";
|
|
253
|
-
}
|
|
254
251
|
function Button({
|
|
255
252
|
children,
|
|
256
253
|
variant = "primary",
|
|
@@ -283,15 +280,13 @@ function Button({
|
|
|
283
280
|
{
|
|
284
281
|
className: cls,
|
|
285
282
|
disabled: Tag2 === "button" ? (disabled || loading) && !focusableWhenDisabled : void 0,
|
|
286
|
-
"aria-disabled":
|
|
283
|
+
"aria-disabled": disabled || loading ? "true" : void 0,
|
|
287
284
|
"aria-busy": loading ? "true" : void 0,
|
|
288
285
|
onClick: inert ? (e) => {
|
|
289
286
|
e.preventDefault();
|
|
287
|
+
e.stopPropagation();
|
|
290
288
|
} : onClick,
|
|
291
|
-
onKeyDown
|
|
292
|
-
if (isActivationKey(e.key)) e.preventDefault();
|
|
293
|
-
onKeyDown?.(e);
|
|
294
|
-
} : onKeyDown,
|
|
289
|
+
onKeyDown,
|
|
295
290
|
...rest,
|
|
296
291
|
children: [
|
|
297
292
|
icon && !loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { className: "ph ph-" + icon, "aria-hidden": "true" }) : null,
|