@flytedan/flytebot-design-system 0.4.0 → 0.6.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 +14 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +20 -0
package/dist/index.cjs
CHANGED
|
@@ -991,7 +991,17 @@ function Topbar({ crumbs = [], actions, loading = false, onMenu, className = "",
|
|
|
991
991
|
onMenu ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("button", { type: "button", className: "fd-btn-icon", "aria-label": "Menu", onClick: onMenu, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("i", { className: "ph ph-list" }) }) : null,
|
|
992
992
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("nav", { className: "fd-crumb", "aria-label": "Breadcrumb", children: crumbs.map((c, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(React5.Fragment, { children: [
|
|
993
993
|
i > 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("i", { className: "ph ph-caret-right", style: { fontSize: 11, opacity: 0.6 }, "aria-hidden": "true" }) : null,
|
|
994
|
-
i === crumbs.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "fd-crumb-current", children: c.label }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
994
|
+
i === crumbs.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "fd-crumb-current", children: c.label }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
995
|
+
"a",
|
|
996
|
+
{
|
|
997
|
+
href: c.href || "#",
|
|
998
|
+
onClick: c.onClick ? (e) => {
|
|
999
|
+
e.preventDefault();
|
|
1000
|
+
c.onClick();
|
|
1001
|
+
} : void 0,
|
|
1002
|
+
children: c.label
|
|
1003
|
+
}
|
|
1004
|
+
)
|
|
995
1005
|
] }, i)) }),
|
|
996
1006
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { style: { flex: 1 } }),
|
|
997
1007
|
actions,
|
|
@@ -1103,12 +1113,13 @@ function hasModifier(e) {
|
|
|
1103
1113
|
|
|
1104
1114
|
// src/components/feedback/Tag.tsx
|
|
1105
1115
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1106
|
-
|
|
1116
|
+
var TONES2 = { info: "fd-tag-info", success: "fd-tag-success", warning: "fd-tag-warning", danger: "fd-tag-danger" };
|
|
1117
|
+
function Tag({ children, icon, selected = false, tone = "neutral", onRemove, onClick, className = "", ...rest }) {
|
|
1107
1118
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1108
1119
|
"button",
|
|
1109
1120
|
{
|
|
1110
1121
|
type: "button",
|
|
1111
|
-
className: ["fd-tag", className].filter(Boolean).join(" "),
|
|
1122
|
+
className: ["fd-tag", selected ? TONES2[tone] : null, className].filter(Boolean).join(" "),
|
|
1112
1123
|
"aria-pressed": selected,
|
|
1113
1124
|
onClick,
|
|
1114
1125
|
...rest,
|