@kud/ink-ui 0.12.0 → 0.13.1
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.d.ts +12 -1
- package/dist/index.js +52 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -220,6 +220,17 @@ type ToggleSwitchProps = {
|
|
|
220
220
|
};
|
|
221
221
|
declare const ToggleSwitch: ({ on, label, onColor, offColor, }: ToggleSwitchProps) => React.JSX.Element;
|
|
222
222
|
|
|
223
|
+
type UpdateBannerProps = {
|
|
224
|
+
name: string;
|
|
225
|
+
current: string;
|
|
226
|
+
latest: string;
|
|
227
|
+
command: string;
|
|
228
|
+
onConfirm: () => void;
|
|
229
|
+
onDecline: () => void;
|
|
230
|
+
focused?: boolean;
|
|
231
|
+
};
|
|
232
|
+
declare const UpdateBanner: ({ name, current, latest, command, onConfirm, onDecline, focused, }: UpdateBannerProps) => React.JSX.Element;
|
|
233
|
+
|
|
223
234
|
type ProgressBarProps = {
|
|
224
235
|
value: number;
|
|
225
236
|
width?: number;
|
|
@@ -279,4 +290,4 @@ declare const spacing: {
|
|
|
279
290
|
};
|
|
280
291
|
type Spacing = (typeof spacing)[keyof typeof spacing];
|
|
281
292
|
|
|
282
|
-
export { Alert, Badge, type BadgeVariant, Banner, type Color, type Column, Columns, ConfirmInput, EmailInput, FooterHints, Header, type Hint, type IconMode, KeyValue, LoadingScreen, MultiSelect, type NotifyOptions, OrderedList, Panel, PasswordInput, ProgressBar, ScrollView, Select, type SelectOption, SelectableRow, type Spacing, type Span, Spinner, StatusMessage, type StatusVariant, type StyledLine, Switch, type SwitchValue, type TabItem, Table, Tabs, TextInput, Toast, Toggle, ToggleSwitch, UnorderedList, colors, getIconMode, notify, setIconMode, spacing };
|
|
293
|
+
export { Alert, Badge, type BadgeVariant, Banner, type Color, type Column, Columns, ConfirmInput, EmailInput, FooterHints, Header, type Hint, type IconMode, KeyValue, LoadingScreen, MultiSelect, type NotifyOptions, OrderedList, Panel, PasswordInput, ProgressBar, ScrollView, Select, type SelectOption, SelectableRow, type Spacing, type Span, Spinner, StatusMessage, type StatusVariant, type StyledLine, Switch, type SwitchValue, type TabItem, Table, Tabs, TextInput, Toast, Toggle, ToggleSwitch, UnorderedList, UpdateBanner, colors, getIconMode, notify, setIconMode, spacing };
|
package/dist/index.js
CHANGED
|
@@ -601,6 +601,57 @@ var ToggleSwitch = ({
|
|
|
601
601
|
label !== void 0 && /* @__PURE__ */ jsx(Text, { color: on ? onColor : void 0, dimColor: !on, children: label })
|
|
602
602
|
] });
|
|
603
603
|
};
|
|
604
|
+
var UpdateBanner = ({
|
|
605
|
+
name,
|
|
606
|
+
current: current2,
|
|
607
|
+
latest,
|
|
608
|
+
command,
|
|
609
|
+
onConfirm,
|
|
610
|
+
onDecline,
|
|
611
|
+
focused = true
|
|
612
|
+
}) => {
|
|
613
|
+
useInput(
|
|
614
|
+
(input, key) => {
|
|
615
|
+
if (key.return || /^y$/i.test(input)) onConfirm();
|
|
616
|
+
else if (key.escape || /^n$/i.test(input)) onDecline();
|
|
617
|
+
},
|
|
618
|
+
{ isActive: focused }
|
|
619
|
+
);
|
|
620
|
+
return /* @__PURE__ */ jsxs(
|
|
621
|
+
Box,
|
|
622
|
+
{
|
|
623
|
+
flexDirection: "column",
|
|
624
|
+
borderStyle: "round",
|
|
625
|
+
borderColor: colors.accent,
|
|
626
|
+
paddingX: 2,
|
|
627
|
+
paddingY: 1,
|
|
628
|
+
rowGap: 1,
|
|
629
|
+
children: [
|
|
630
|
+
/* @__PURE__ */ jsxs(Box, { columnGap: 1, children: [
|
|
631
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: colors.accent, children: name }),
|
|
632
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "\xB7" }),
|
|
633
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "update available" })
|
|
634
|
+
] }),
|
|
635
|
+
/* @__PURE__ */ jsxs(Box, { columnGap: 1, children: [
|
|
636
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: current2 }),
|
|
637
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "\u2192" }),
|
|
638
|
+
/* @__PURE__ */ jsx(Text, { bold: true, color: colors.success, children: latest })
|
|
639
|
+
] }),
|
|
640
|
+
/* @__PURE__ */ jsxs(Box, { columnGap: 1, children: [
|
|
641
|
+
/* @__PURE__ */ jsx(Text, { backgroundColor: colors.accent, color: "black", bold: true, children: " Y " }),
|
|
642
|
+
/* @__PURE__ */ jsx(Text, { children: "upgrade now" }),
|
|
643
|
+
/* @__PURE__ */ jsx(Text, { dimColor: true, children: "\xB7" }),
|
|
644
|
+
/* @__PURE__ */ jsx(Text, { backgroundColor: "#2b323d", color: "#8fa3ad", children: " N " }),
|
|
645
|
+
/* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
646
|
+
"later \u2014 run ",
|
|
647
|
+
command,
|
|
648
|
+
" yourself"
|
|
649
|
+
] })
|
|
650
|
+
] })
|
|
651
|
+
]
|
|
652
|
+
}
|
|
653
|
+
);
|
|
654
|
+
};
|
|
604
655
|
var ProgressBar = ({
|
|
605
656
|
value,
|
|
606
657
|
width = 20,
|
|
@@ -715,4 +766,4 @@ var notify = (message, options = {}) => {
|
|
|
715
766
|
child.unref();
|
|
716
767
|
};
|
|
717
768
|
|
|
718
|
-
export { Alert, Badge, Banner, Columns, ConfirmInput, EmailInput, FooterHints, Header, KeyValue, LoadingScreen, MultiSelect, OrderedList, Panel, PasswordInput, ProgressBar, ScrollView, Select, SelectableRow, Spinner, StatusMessage, Switch, Table, Tabs, TextInput, Toast, Toggle, ToggleSwitch, UnorderedList, colors, getIconMode, notify, setIconMode, spacing };
|
|
769
|
+
export { Alert, Badge, Banner, Columns, ConfirmInput, EmailInput, FooterHints, Header, KeyValue, LoadingScreen, MultiSelect, OrderedList, Panel, PasswordInput, ProgressBar, ScrollView, Select, SelectableRow, Spinner, StatusMessage, Switch, Table, Tabs, TextInput, Toast, Toggle, ToggleSwitch, UnorderedList, UpdateBanner, colors, getIconMode, notify, setIconMode, spacing };
|