@flytedan/flytebot-design-system 0.83.0 → 0.84.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 +15 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +15 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +19 -0
package/dist/index.d.cts
CHANGED
|
@@ -357,6 +357,8 @@ interface CollapsibleProps {
|
|
|
357
357
|
badge?: React.ReactNode;
|
|
358
358
|
/** Phosphor icon name shown in a soft brand chip on the left. */
|
|
359
359
|
icon?: string;
|
|
360
|
+
/** Controls drawn in the header row at its right, outside the trigger button: their own tab stops, and pressing one never opens or closes the section. */
|
|
361
|
+
actions?: React.ReactNode;
|
|
360
362
|
defaultOpen?: boolean;
|
|
361
363
|
/** Pass with onToggle for controlled use. */
|
|
362
364
|
open?: boolean;
|
|
@@ -364,7 +366,7 @@ interface CollapsibleProps {
|
|
|
364
366
|
children?: React.ReactNode;
|
|
365
367
|
className?: string;
|
|
366
368
|
}
|
|
367
|
-
declare function Collapsible({ title, subtitle, badge, icon, defaultOpen, open, onToggle, children, className, ...rest }: CollapsibleProps): React.JSX.Element;
|
|
369
|
+
declare function Collapsible({ title, subtitle, badge, icon, actions, defaultOpen, open, onToggle, children, className, ...rest }: CollapsibleProps): React.JSX.Element;
|
|
368
370
|
|
|
369
371
|
/** A right-side panel for detail and editing without losing the list behind it.
|
|
370
372
|
* MP-248: always modal (declares `aria-modal="true"`), so it is a trapping layer in the
|
|
@@ -2643,6 +2645,8 @@ interface ReferenceSection {
|
|
|
2643
2645
|
title: React.ReactNode;
|
|
2644
2646
|
/** One line under the title. */
|
|
2645
2647
|
subtitle?: React.ReactNode;
|
|
2648
|
+
/** Controls in the section's heading row, outside the open/close button, e.g. a CopyButton for the section's name. */
|
|
2649
|
+
actions?: React.ReactNode;
|
|
2646
2650
|
entries: ReferenceEntry[];
|
|
2647
2651
|
/** Uncontrolled initial state. Default closed. */
|
|
2648
2652
|
defaultOpen?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -357,6 +357,8 @@ interface CollapsibleProps {
|
|
|
357
357
|
badge?: React.ReactNode;
|
|
358
358
|
/** Phosphor icon name shown in a soft brand chip on the left. */
|
|
359
359
|
icon?: string;
|
|
360
|
+
/** Controls drawn in the header row at its right, outside the trigger button: their own tab stops, and pressing one never opens or closes the section. */
|
|
361
|
+
actions?: React.ReactNode;
|
|
360
362
|
defaultOpen?: boolean;
|
|
361
363
|
/** Pass with onToggle for controlled use. */
|
|
362
364
|
open?: boolean;
|
|
@@ -364,7 +366,7 @@ interface CollapsibleProps {
|
|
|
364
366
|
children?: React.ReactNode;
|
|
365
367
|
className?: string;
|
|
366
368
|
}
|
|
367
|
-
declare function Collapsible({ title, subtitle, badge, icon, defaultOpen, open, onToggle, children, className, ...rest }: CollapsibleProps): React.JSX.Element;
|
|
369
|
+
declare function Collapsible({ title, subtitle, badge, icon, actions, defaultOpen, open, onToggle, children, className, ...rest }: CollapsibleProps): React.JSX.Element;
|
|
368
370
|
|
|
369
371
|
/** A right-side panel for detail and editing without losing the list behind it.
|
|
370
372
|
* MP-248: always modal (declares `aria-modal="true"`), so it is a trapping layer in the
|
|
@@ -2643,6 +2645,8 @@ interface ReferenceSection {
|
|
|
2643
2645
|
title: React.ReactNode;
|
|
2644
2646
|
/** One line under the title. */
|
|
2645
2647
|
subtitle?: React.ReactNode;
|
|
2648
|
+
/** Controls in the section's heading row, outside the open/close button, e.g. a CopyButton for the section's name. */
|
|
2649
|
+
actions?: React.ReactNode;
|
|
2646
2650
|
entries: ReferenceEntry[];
|
|
2647
2651
|
/** Uncontrolled initial state. Default closed. */
|
|
2648
2652
|
defaultOpen?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -1014,6 +1014,7 @@ function Collapsible({
|
|
|
1014
1014
|
subtitle,
|
|
1015
1015
|
badge,
|
|
1016
1016
|
icon,
|
|
1017
|
+
actions,
|
|
1017
1018
|
defaultOpen = false,
|
|
1018
1019
|
open: open2,
|
|
1019
1020
|
onToggle,
|
|
@@ -1027,16 +1028,20 @@ function Collapsible({
|
|
|
1027
1028
|
if (open2 === void 0) setInternal(!isOpen);
|
|
1028
1029
|
if (onToggle) onToggle(!isOpen);
|
|
1029
1030
|
};
|
|
1030
|
-
|
|
1031
|
-
/* @__PURE__ */
|
|
1032
|
-
|
|
1033
|
-
/* @__PURE__ */
|
|
1034
|
-
|
|
1035
|
-
subtitle ? /* @__PURE__ */ jsx9("span", { className: "fd-coll-sub", style: { display: "block" }, children: subtitle }) : null
|
|
1036
|
-
] }),
|
|
1037
|
-
badge,
|
|
1038
|
-
/* @__PURE__ */ jsx9("span", { className: "fd-coll-caret", children: /* @__PURE__ */ jsx9("i", { className: "ph ph-caret-down", "aria-hidden": "true" }) })
|
|
1031
|
+
const trigger = /* @__PURE__ */ jsxs6("button", { type: "button", className: "fd-coll-trigger", "aria-expanded": isOpen, onClick: toggle, children: [
|
|
1032
|
+
icon ? /* @__PURE__ */ jsx9("span", { className: "fd-coll-caret", style: { background: "var(--brand-soft)", color: "var(--brand)", transform: "none" }, children: /* @__PURE__ */ jsx9("i", { className: "ph ph-" + icon, "aria-hidden": "true" }) }) : null,
|
|
1033
|
+
/* @__PURE__ */ jsxs6("span", { style: { flex: 1, minWidth: 0 }, children: [
|
|
1034
|
+
/* @__PURE__ */ jsx9("span", { className: "fd-coll-title", style: { display: "block" }, children: title }),
|
|
1035
|
+
subtitle ? /* @__PURE__ */ jsx9("span", { className: "fd-coll-sub", style: { display: "block" }, children: subtitle }) : null
|
|
1039
1036
|
] }),
|
|
1037
|
+
badge,
|
|
1038
|
+
/* @__PURE__ */ jsx9("span", { className: "fd-coll-caret", children: /* @__PURE__ */ jsx9("i", { className: "ph ph-caret-down", "aria-hidden": "true" }) })
|
|
1039
|
+
] });
|
|
1040
|
+
return /* @__PURE__ */ jsxs6("div", { className: ["fd-coll", className].filter(Boolean).join(" "), "data-open": isOpen ? "true" : "false", ...rest, children: [
|
|
1041
|
+
actions ? /* @__PURE__ */ jsxs6("div", { className: "fd-coll-head", children: [
|
|
1042
|
+
trigger,
|
|
1043
|
+
/* @__PURE__ */ jsx9("div", { className: "fd-coll-actions", children: actions })
|
|
1044
|
+
] }) : trigger,
|
|
1040
1045
|
/* @__PURE__ */ jsx9("div", { className: "fd-coll-panel", children: /* @__PURE__ */ jsx9("div", { children: /* @__PURE__ */ jsx9("div", { className: "fd-coll-content", children }) }) })
|
|
1041
1046
|
] });
|
|
1042
1047
|
}
|
|
@@ -7181,6 +7186,7 @@ function ReferenceList(props) {
|
|
|
7181
7186
|
className: "fd-ref-section",
|
|
7182
7187
|
title: s.title,
|
|
7183
7188
|
subtitle: s.subtitle,
|
|
7189
|
+
actions: s.actions,
|
|
7184
7190
|
badge: /* @__PURE__ */ jsx72("span", { className: "fd-badge fd-badge-count", children: searching ? `${shown.length} of ${s.entries.length}` : s.entries.length }),
|
|
7185
7191
|
open: open2,
|
|
7186
7192
|
onToggle: (next) => {
|