@asanchez-sa/abby 0.2.0 → 0.4.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/components/alert/alert.d.ts +1 -1
- package/dist/components/alert/alert.js +2 -1
- package/dist/components/alert-dialog/alert-dialog.d.ts +10 -1
- package/dist/components/alert-dialog/alert-dialog.js +80 -3
- package/dist/components/badge/badge.d.ts +3 -2
- package/dist/components/badge/badge.js +27 -11
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.js +3 -2
- package/dist/components/calendar/calendar.d.ts +26 -5
- package/dist/components/calendar/calendar.js +387 -72
- package/dist/components/chart/chart.d.ts +76 -0
- package/dist/components/chart/chart.js +565 -0
- package/dist/components/chart/parts/axes.js +126 -0
- package/dist/components/chart/parts/frame.d.ts +31 -0
- package/dist/components/chart/parts/frame.js +278 -0
- package/dist/components/chart/parts/legend.d.ts +16 -0
- package/dist/components/chart/parts/legend.js +82 -0
- package/dist/components/chart/parts/points.d.ts +1 -0
- package/dist/components/chart/parts/points.js +139 -0
- package/dist/components/chart/parts/scale.js +139 -0
- package/dist/components/chart/parts/table.js +105 -0
- package/dist/components/chart/parts/types.d.ts +44 -0
- package/dist/components/chart/parts/types.js +8 -0
- package/dist/components/dialog/dialog.d.ts +9 -1
- package/dist/components/dialog/dialog.js +82 -3
- package/dist/components/field/field.d.ts +5 -1
- package/dist/components/field/field.js +25 -21
- package/dist/components/filter-chip/filter-chip.d.ts +36 -0
- package/dist/components/filter-chip/filter-chip.js +97 -0
- package/dist/components/graph/graph.d.ts +151 -0
- package/dist/components/graph/graph.js +959 -0
- package/dist/components/input/input.d.ts +8 -1
- package/dist/components/input/input.js +2 -2
- package/dist/components/meter/meter.d.ts +52 -3
- package/dist/components/meter/meter.js +535 -33
- package/dist/components/model-selector/model-selector.d.ts +38 -3
- package/dist/components/model-selector/model-selector.js +331 -73
- package/dist/components/note-editor/parts/suggestions.js +2 -2
- package/dist/components/number-input/number-input.d.ts +14 -3
- package/dist/components/number-input/number-input.js +193 -34
- package/dist/components/otp-input/otp-input.d.ts +6 -2
- package/dist/components/otp-input/otp-input.js +40 -20
- package/dist/components/sheet/sheet.js +1 -1
- package/dist/components/spinner/spinner.d.ts +7 -1
- package/dist/components/spinner/spinner.js +86 -26
- package/dist/components/switch/switch.d.ts +9 -2
- package/dist/components/switch/switch.js +23 -17
- package/dist/components/toast/toast.d.ts +19 -2
- package/dist/components/toast/toast.js +211 -49
- package/dist/components/toggle/toggle.d.ts +18 -4
- package/dist/components/toggle/toggle.js +167 -32
- package/dist/components/week-strip/week-strip.d.ts +27 -5
- package/dist/components/week-strip/week-strip.js +288 -134
- package/package.json +4 -1
- package/skills/agent-ready-ui/SKILL.md +1 -1
- package/skills/blocks/SKILL.md +1 -1
- package/skills/compose-screens/SKILL.md +97 -10
- package/skills/compose-screens/references/calendar-week.md +77 -0
- package/skills/compose-screens/references/charts-and-maps.md +183 -0
- package/skills/compose-screens/references/filter-chips.md +61 -0
- package/skills/compose-screens/references/number-units.md +52 -0
- package/skills/note-editor/SKILL.md +1 -1
- package/skills/note-status/SKILL.md +1 -1
- package/skills/setup/SKILL.md +1 -1
- package/skills/theming/SKILL.md +1 -1
|
@@ -5,11 +5,13 @@ import "../../core/index.js";
|
|
|
5
5
|
import { markPlaced } from "../../behaviors/selection/indicator.js";
|
|
6
6
|
import "../../behaviors/selection/index.js";
|
|
7
7
|
import { cn, cnState } from "../../utilities/cn/index.js";
|
|
8
|
+
import { Icon } from "../icon/icon.js";
|
|
8
9
|
import { inputGroupButtonVariants } from "../input-group/input-group.js";
|
|
9
|
-
import { Menu, MenuContent, MenuGroupLabel, MenuItemIndicator, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuShortcut, MenuTrigger, createMenuController } from "../menu/menu.js";
|
|
10
|
+
import { Menu, MenuContent, MenuGroup, MenuGroupLabel, MenuItemIndicator, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuShortcut, MenuTrigger, createMenuController } from "../menu/menu.js";
|
|
10
11
|
import { c } from "react/compiler-runtime";
|
|
11
|
-
import { Fragment, createContext, use, useId, useState } from "react";
|
|
12
|
+
import { Fragment, createContext, use, useId, useLayoutEffect, useState } from "react";
|
|
12
13
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { Alert02Icon } from "@hugeicons/core-free-icons";
|
|
13
15
|
// src/components/model-selector/model-selector.tsx
|
|
14
16
|
const TRIGGER = "[data-slot=\"menu-trigger\"]";
|
|
15
17
|
/**
|
|
@@ -686,82 +688,74 @@ function ModelSelectorGroup(t0) {
|
|
|
686
688
|
} else t2 = $[11];
|
|
687
689
|
return t2;
|
|
688
690
|
}
|
|
689
|
-
const itemClasses = "has-data-[slot=model-selector-description]:gap-3 has-data-[slot=model-selector-description]:py-2 [&>[data-slot=icon]]:size-5";
|
|
691
|
+
const itemClasses = ["has-data-[slot=model-selector-description]:gap-3 has-data-[slot=model-selector-description]:py-2 [&>[data-slot=icon]]:size-5", "has-data-[slot=model-selector-cost]:items-start has-data-[slot=model-selector-cost]:py-2.5"];
|
|
692
|
+
const ItemContext = createContext({
|
|
693
|
+
id: "",
|
|
694
|
+
setParts: () => {}
|
|
695
|
+
});
|
|
696
|
+
/** Registers a part with its row while mounted, and returns the id its text goes under. */
|
|
697
|
+
function useItemPart(part) {
|
|
698
|
+
const $ = c(4);
|
|
699
|
+
const { id, setParts } = use(ItemContext);
|
|
700
|
+
let t0;
|
|
701
|
+
let t1;
|
|
702
|
+
if ($[0] !== part || $[1] !== setParts) {
|
|
703
|
+
t0 = () => {
|
|
704
|
+
setParts((current) => ({
|
|
705
|
+
...current,
|
|
706
|
+
[part]: current[part] + 1
|
|
707
|
+
}));
|
|
708
|
+
return () => setParts((current_0) => ({
|
|
709
|
+
...current_0,
|
|
710
|
+
[part]: current_0[part] - 1
|
|
711
|
+
}));
|
|
712
|
+
};
|
|
713
|
+
t1 = [setParts, part];
|
|
714
|
+
$[0] = part;
|
|
715
|
+
$[1] = setParts;
|
|
716
|
+
$[2] = t0;
|
|
717
|
+
$[3] = t1;
|
|
718
|
+
} else {
|
|
719
|
+
t0 = $[2];
|
|
720
|
+
t1 = $[3];
|
|
721
|
+
}
|
|
722
|
+
useLayoutEffect(t0, t1);
|
|
723
|
+
return `${id}-${part}`;
|
|
724
|
+
}
|
|
690
725
|
/**
|
|
691
726
|
* One choice. Picking it closes the menu, and the selected one shows a check.
|
|
692
727
|
* With a `ModelSelectorDescription` inside its `ModelSelectorName` it is two
|
|
693
728
|
* lines tall; give it a `label` with the name alone for typeahead.
|
|
694
729
|
*/
|
|
695
|
-
function ModelSelectorItem(
|
|
696
|
-
const
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
props = $[3];
|
|
712
|
-
t1 = $[4];
|
|
713
|
-
}
|
|
714
|
-
const closeOnSelect = t1 === void 0 ? true : t1;
|
|
715
|
-
let t2;
|
|
716
|
-
if ($[5] !== props.disabled || $[6] !== props.value) {
|
|
717
|
-
t2 = {
|
|
718
|
-
value: props.value,
|
|
719
|
-
disabled: props.disabled
|
|
720
|
-
};
|
|
721
|
-
$[5] = props.disabled;
|
|
722
|
-
$[6] = props.value;
|
|
723
|
-
$[7] = t2;
|
|
724
|
-
} else t2 = $[7];
|
|
725
|
-
let t3;
|
|
726
|
-
if ($[8] !== className) {
|
|
727
|
-
t3 = cnState(itemClasses, className);
|
|
728
|
-
$[8] = className;
|
|
729
|
-
$[9] = t3;
|
|
730
|
-
} else t3 = $[9];
|
|
731
|
-
let t4;
|
|
732
|
-
if ($[10] !== closeOnSelect || $[11] !== props || $[12] !== t3) {
|
|
733
|
-
t4 = /* @__PURE__ */ jsx(MenuRadioItem, {
|
|
730
|
+
function ModelSelectorItem({ closeOnSelect = true, className, children, "aria-describedby": describedBy, ...props }) {
|
|
731
|
+
const id = useId();
|
|
732
|
+
const [parts, setParts] = useState({
|
|
733
|
+
cost: 0,
|
|
734
|
+
warning: 0
|
|
735
|
+
});
|
|
736
|
+
const description = [
|
|
737
|
+
parts.cost > 0 ? `${id}-cost` : void 0,
|
|
738
|
+
parts.warning > 0 ? `${id}-warning` : void 0,
|
|
739
|
+
describedBy
|
|
740
|
+
].filter(Boolean).join(" ") || void 0;
|
|
741
|
+
return usePart(modelSelector, "item", {
|
|
742
|
+
value: props.value,
|
|
743
|
+
disabled: props.disabled
|
|
744
|
+
}, {
|
|
745
|
+
render: /* @__PURE__ */ jsx(MenuRadioItem, {
|
|
734
746
|
closeOnSelect,
|
|
735
|
-
className:
|
|
736
|
-
...props
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
} else t5 = $[14];
|
|
748
|
-
let t6;
|
|
749
|
-
if ($[15] !== children) {
|
|
750
|
-
t6 = /* @__PURE__ */ jsxs(Fragment$1, { children: [children, t5] });
|
|
751
|
-
$[15] = children;
|
|
752
|
-
$[16] = t6;
|
|
753
|
-
} else t6 = $[16];
|
|
754
|
-
let t7;
|
|
755
|
-
if ($[17] !== t4 || $[18] !== t6) {
|
|
756
|
-
t7 = {
|
|
757
|
-
render: t4,
|
|
758
|
-
children: t6
|
|
759
|
-
};
|
|
760
|
-
$[17] = t4;
|
|
761
|
-
$[18] = t6;
|
|
762
|
-
$[19] = t7;
|
|
763
|
-
} else t7 = $[19];
|
|
764
|
-
return usePart(modelSelector, "item", t2, t7, "div");
|
|
747
|
+
className: cnState(itemClasses, className),
|
|
748
|
+
...props,
|
|
749
|
+
"aria-describedby": description
|
|
750
|
+
}),
|
|
751
|
+
children: /* @__PURE__ */ jsxs(ItemContext, {
|
|
752
|
+
value: {
|
|
753
|
+
id,
|
|
754
|
+
setParts
|
|
755
|
+
},
|
|
756
|
+
children: [children, /* @__PURE__ */ jsx(MenuItemIndicator, {})]
|
|
757
|
+
})
|
|
758
|
+
}, "div");
|
|
765
759
|
}
|
|
766
760
|
/** A line between two groups, from one edge of the popup to the other. */
|
|
767
761
|
function ModelSelectorSeparator(props) {
|
|
@@ -902,4 +896,268 @@ function ModelSelectorDescription(t0) {
|
|
|
902
896
|
} else t2 = $[7];
|
|
903
897
|
return t2;
|
|
904
898
|
}
|
|
905
|
-
|
|
899
|
+
/**
|
|
900
|
+
* What a model costs, at the end of its `ModelSelectorItem`: the figure over a
|
|
901
|
+
* smaller one, with tabular numbers so a column of them lines up. It is hidden
|
|
902
|
+
* from the row's name; its text goes to the row's description.
|
|
903
|
+
*/
|
|
904
|
+
function ModelSelectorCost(t0) {
|
|
905
|
+
const $ = c(25);
|
|
906
|
+
let children;
|
|
907
|
+
let className;
|
|
908
|
+
let monthly;
|
|
909
|
+
let props;
|
|
910
|
+
if ($[0] !== t0) {
|
|
911
|
+
({children, monthly, className, ...props} = t0);
|
|
912
|
+
$[0] = t0;
|
|
913
|
+
$[1] = children;
|
|
914
|
+
$[2] = className;
|
|
915
|
+
$[3] = monthly;
|
|
916
|
+
$[4] = props;
|
|
917
|
+
} else {
|
|
918
|
+
children = $[1];
|
|
919
|
+
className = $[2];
|
|
920
|
+
monthly = $[3];
|
|
921
|
+
props = $[4];
|
|
922
|
+
}
|
|
923
|
+
const id = useItemPart("cost");
|
|
924
|
+
let t1;
|
|
925
|
+
if ($[5] !== className) {
|
|
926
|
+
t1 = cn("ms-auto flex w-30 shrink-0 flex-col items-end gap-0.5 tabular-nums", className);
|
|
927
|
+
$[5] = className;
|
|
928
|
+
$[6] = t1;
|
|
929
|
+
} else t1 = $[6];
|
|
930
|
+
let t2;
|
|
931
|
+
if ($[7] !== children) {
|
|
932
|
+
t2 = /* @__PURE__ */ jsx("span", {
|
|
933
|
+
className: "text-label leading-5 text-foreground",
|
|
934
|
+
children
|
|
935
|
+
});
|
|
936
|
+
$[7] = children;
|
|
937
|
+
$[8] = t2;
|
|
938
|
+
} else t2 = $[8];
|
|
939
|
+
let t3;
|
|
940
|
+
if ($[9] !== monthly) {
|
|
941
|
+
t3 = monthly !== void 0 && /* @__PURE__ */ jsx("span", {
|
|
942
|
+
className: "text-supporting text-muted-foreground",
|
|
943
|
+
children: monthly
|
|
944
|
+
});
|
|
945
|
+
$[9] = monthly;
|
|
946
|
+
$[10] = t3;
|
|
947
|
+
} else t3 = $[10];
|
|
948
|
+
let t4;
|
|
949
|
+
if ($[11] !== props || $[12] !== t1 || $[13] !== t2 || $[14] !== t3) {
|
|
950
|
+
t4 = /* @__PURE__ */ jsxs("div", {
|
|
951
|
+
"aria-hidden": true,
|
|
952
|
+
"data-slot": "model-selector-cost",
|
|
953
|
+
className: t1,
|
|
954
|
+
...props,
|
|
955
|
+
children: [t2, t3]
|
|
956
|
+
});
|
|
957
|
+
$[11] = props;
|
|
958
|
+
$[12] = t1;
|
|
959
|
+
$[13] = t2;
|
|
960
|
+
$[14] = t3;
|
|
961
|
+
$[15] = t4;
|
|
962
|
+
} else t4 = $[15];
|
|
963
|
+
let t5;
|
|
964
|
+
if ($[16] !== monthly) {
|
|
965
|
+
t5 = monthly !== void 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [", ", monthly] });
|
|
966
|
+
$[16] = monthly;
|
|
967
|
+
$[17] = t5;
|
|
968
|
+
} else t5 = $[17];
|
|
969
|
+
let t6;
|
|
970
|
+
if ($[18] !== children || $[19] !== id || $[20] !== t5) {
|
|
971
|
+
t6 = /* @__PURE__ */ jsxs("span", {
|
|
972
|
+
hidden: true,
|
|
973
|
+
"aria-hidden": true,
|
|
974
|
+
id,
|
|
975
|
+
children: [children, t5]
|
|
976
|
+
});
|
|
977
|
+
$[18] = children;
|
|
978
|
+
$[19] = id;
|
|
979
|
+
$[20] = t5;
|
|
980
|
+
$[21] = t6;
|
|
981
|
+
} else t6 = $[21];
|
|
982
|
+
let t7;
|
|
983
|
+
if ($[22] !== t4 || $[23] !== t6) {
|
|
984
|
+
t7 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t4, t6] });
|
|
985
|
+
$[22] = t4;
|
|
986
|
+
$[23] = t6;
|
|
987
|
+
$[24] = t7;
|
|
988
|
+
} else t7 = $[24];
|
|
989
|
+
return t7;
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* Why a model may not fit, like going over a limit, in `warning` with an icon.
|
|
993
|
+
* It goes inside a `ModelSelectorName`, under the description. It is hidden
|
|
994
|
+
* from the row's name; its text goes to the row's description.
|
|
995
|
+
*/
|
|
996
|
+
function ModelSelectorWarning(t0) {
|
|
997
|
+
const $ = c(19);
|
|
998
|
+
let children;
|
|
999
|
+
let className;
|
|
1000
|
+
let props;
|
|
1001
|
+
if ($[0] !== t0) {
|
|
1002
|
+
({children, className, ...props} = t0);
|
|
1003
|
+
$[0] = t0;
|
|
1004
|
+
$[1] = children;
|
|
1005
|
+
$[2] = className;
|
|
1006
|
+
$[3] = props;
|
|
1007
|
+
} else {
|
|
1008
|
+
children = $[1];
|
|
1009
|
+
className = $[2];
|
|
1010
|
+
props = $[3];
|
|
1011
|
+
}
|
|
1012
|
+
const id = useItemPart("warning");
|
|
1013
|
+
let t1;
|
|
1014
|
+
if ($[4] !== className) {
|
|
1015
|
+
t1 = cn("flex items-start gap-1.5 pt-1 text-supporting whitespace-normal text-warning", className);
|
|
1016
|
+
$[4] = className;
|
|
1017
|
+
$[5] = t1;
|
|
1018
|
+
} else t1 = $[5];
|
|
1019
|
+
let t2;
|
|
1020
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1021
|
+
t2 = /* @__PURE__ */ jsx(Icon, {
|
|
1022
|
+
icon: Alert02Icon,
|
|
1023
|
+
className: "mt-0.5 size-3 shrink-0"
|
|
1024
|
+
});
|
|
1025
|
+
$[6] = t2;
|
|
1026
|
+
} else t2 = $[6];
|
|
1027
|
+
let t3;
|
|
1028
|
+
if ($[7] !== children) {
|
|
1029
|
+
t3 = /* @__PURE__ */ jsx("span", { children });
|
|
1030
|
+
$[7] = children;
|
|
1031
|
+
$[8] = t3;
|
|
1032
|
+
} else t3 = $[8];
|
|
1033
|
+
let t4;
|
|
1034
|
+
if ($[9] !== props || $[10] !== t1 || $[11] !== t3) {
|
|
1035
|
+
t4 = /* @__PURE__ */ jsxs("span", {
|
|
1036
|
+
"aria-hidden": true,
|
|
1037
|
+
"data-slot": "model-selector-warning",
|
|
1038
|
+
className: t1,
|
|
1039
|
+
...props,
|
|
1040
|
+
children: [t2, t3]
|
|
1041
|
+
});
|
|
1042
|
+
$[9] = props;
|
|
1043
|
+
$[10] = t1;
|
|
1044
|
+
$[11] = t3;
|
|
1045
|
+
$[12] = t4;
|
|
1046
|
+
} else t4 = $[12];
|
|
1047
|
+
let t5;
|
|
1048
|
+
if ($[13] !== children || $[14] !== id) {
|
|
1049
|
+
t5 = /* @__PURE__ */ jsx("span", {
|
|
1050
|
+
hidden: true,
|
|
1051
|
+
"aria-hidden": true,
|
|
1052
|
+
id,
|
|
1053
|
+
children
|
|
1054
|
+
});
|
|
1055
|
+
$[13] = children;
|
|
1056
|
+
$[14] = id;
|
|
1057
|
+
$[15] = t5;
|
|
1058
|
+
} else t5 = $[15];
|
|
1059
|
+
let t6;
|
|
1060
|
+
if ($[16] !== t4 || $[17] !== t5) {
|
|
1061
|
+
t6 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t4, t5] });
|
|
1062
|
+
$[16] = t4;
|
|
1063
|
+
$[17] = t5;
|
|
1064
|
+
$[18] = t6;
|
|
1065
|
+
} else t6 = $[18];
|
|
1066
|
+
return t6;
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* The titles over the list, first the names and then, with `end`, the costs.
|
|
1070
|
+
* Put it first in a `ModelSelectorContent`. It is a group with a label, so the
|
|
1071
|
+
* menu keeps only menu items and groups.
|
|
1072
|
+
*/
|
|
1073
|
+
function ModelSelectorHeader(t0) {
|
|
1074
|
+
const $ = c(16);
|
|
1075
|
+
let children;
|
|
1076
|
+
let className;
|
|
1077
|
+
let end;
|
|
1078
|
+
let props;
|
|
1079
|
+
if ($[0] !== t0) {
|
|
1080
|
+
({end, children, className, ...props} = t0);
|
|
1081
|
+
$[0] = t0;
|
|
1082
|
+
$[1] = children;
|
|
1083
|
+
$[2] = className;
|
|
1084
|
+
$[3] = end;
|
|
1085
|
+
$[4] = props;
|
|
1086
|
+
} else {
|
|
1087
|
+
children = $[1];
|
|
1088
|
+
className = $[2];
|
|
1089
|
+
end = $[3];
|
|
1090
|
+
props = $[4];
|
|
1091
|
+
}
|
|
1092
|
+
let t1;
|
|
1093
|
+
if ($[5] !== className) {
|
|
1094
|
+
t1 = cnState("flex items-center justify-between gap-3 pe-8 pt-2 pb-1.5 text-footnote font-semibold tracking-[0.01em] text-subtle", className);
|
|
1095
|
+
$[5] = className;
|
|
1096
|
+
$[6] = t1;
|
|
1097
|
+
} else t1 = $[6];
|
|
1098
|
+
let t2;
|
|
1099
|
+
if ($[7] !== children) {
|
|
1100
|
+
t2 = /* @__PURE__ */ jsx("span", { children });
|
|
1101
|
+
$[7] = children;
|
|
1102
|
+
$[8] = t2;
|
|
1103
|
+
} else t2 = $[8];
|
|
1104
|
+
let t3;
|
|
1105
|
+
if ($[9] !== end) {
|
|
1106
|
+
t3 = end !== void 0 && /* @__PURE__ */ jsx("span", { children: end });
|
|
1107
|
+
$[9] = end;
|
|
1108
|
+
$[10] = t3;
|
|
1109
|
+
} else t3 = $[10];
|
|
1110
|
+
let t4;
|
|
1111
|
+
if ($[11] !== props || $[12] !== t1 || $[13] !== t2 || $[14] !== t3) {
|
|
1112
|
+
t4 = /* @__PURE__ */ jsx(MenuGroup, { children: /* @__PURE__ */ jsxs(MenuGroupLabel, {
|
|
1113
|
+
className: t1,
|
|
1114
|
+
...props,
|
|
1115
|
+
children: [t2, t3]
|
|
1116
|
+
}) });
|
|
1117
|
+
$[11] = props;
|
|
1118
|
+
$[12] = t1;
|
|
1119
|
+
$[13] = t2;
|
|
1120
|
+
$[14] = t3;
|
|
1121
|
+
$[15] = t4;
|
|
1122
|
+
} else t4 = $[15];
|
|
1123
|
+
return t4;
|
|
1124
|
+
}
|
|
1125
|
+
/**
|
|
1126
|
+
* A note under the list, like where the prices come from, over a hairline. Put
|
|
1127
|
+
* it last in a `ModelSelectorContent`. Its text is the group's label.
|
|
1128
|
+
*/
|
|
1129
|
+
function ModelSelectorFooter(t0) {
|
|
1130
|
+
const $ = c(8);
|
|
1131
|
+
let className;
|
|
1132
|
+
let props;
|
|
1133
|
+
if ($[0] !== t0) {
|
|
1134
|
+
({className, ...props} = t0);
|
|
1135
|
+
$[0] = t0;
|
|
1136
|
+
$[1] = className;
|
|
1137
|
+
$[2] = props;
|
|
1138
|
+
} else {
|
|
1139
|
+
className = $[1];
|
|
1140
|
+
props = $[2];
|
|
1141
|
+
}
|
|
1142
|
+
let t1;
|
|
1143
|
+
if ($[3] !== className) {
|
|
1144
|
+
t1 = cnState("flex flex-col gap-0.5 pe-8 pt-2.5 pb-2 text-supporting text-muted-foreground", className);
|
|
1145
|
+
$[3] = className;
|
|
1146
|
+
$[4] = t1;
|
|
1147
|
+
} else t1 = $[4];
|
|
1148
|
+
let t2;
|
|
1149
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
1150
|
+
t2 = /* @__PURE__ */ jsx(MenuGroup, {
|
|
1151
|
+
className: "mt-1 border-t border-border",
|
|
1152
|
+
children: /* @__PURE__ */ jsx(MenuGroupLabel, {
|
|
1153
|
+
className: t1,
|
|
1154
|
+
...props
|
|
1155
|
+
})
|
|
1156
|
+
});
|
|
1157
|
+
$[5] = props;
|
|
1158
|
+
$[6] = t1;
|
|
1159
|
+
$[7] = t2;
|
|
1160
|
+
} else t2 = $[7];
|
|
1161
|
+
return t2;
|
|
1162
|
+
}
|
|
1163
|
+
export { ModelSelector, ModelSelectorContent, ModelSelectorCost, ModelSelectorDescription, ModelSelectorFooter, ModelSelectorGroup, ModelSelectorHeader, ModelSelectorItem, ModelSelectorLogo, ModelSelectorLogoGroup, ModelSelectorName, ModelSelectorSegments, ModelSelectorSeparator, ModelSelectorSetting, ModelSelectorShortcut, ModelSelectorTrigger, ModelSelectorWarning, createMenuController as createModelSelectorController, useModelSelector };
|
|
@@ -41,13 +41,13 @@ function NoteEditorAssistantMark(t0) {
|
|
|
41
41
|
}
|
|
42
42
|
let t1;
|
|
43
43
|
if ($[3] !== className) {
|
|
44
|
-
t1 = cn("flex size-4 shrink-0 items-center justify-center rounded-xs bg-
|
|
44
|
+
t1 = cn("flex size-4 shrink-0 items-center justify-center rounded-xs bg-[#1d1d1f] dark:ring-1 dark:ring-[#ffffff24] dark:ring-inset", className);
|
|
45
45
|
$[3] = className;
|
|
46
46
|
$[4] = t1;
|
|
47
47
|
} else t1 = $[4];
|
|
48
48
|
let t2;
|
|
49
49
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50
|
-
t2 = /* @__PURE__ */ jsx("span", { className: "size-1 rounded-full bg-
|
|
50
|
+
t2 = /* @__PURE__ */ jsx("span", { className: "size-1 rounded-full bg-[#8e5be0]" });
|
|
51
51
|
$[5] = t2;
|
|
52
52
|
} else t2 = $[5];
|
|
53
53
|
let t3;
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
import { ComponentProps } from "react";
|
|
1
|
+
import { ComponentProps, Ref } from "react";
|
|
2
2
|
import { NumberInput as NumberInput$1, NumberInputControl as NumberInputControl$1, NumberInputDecrement as NumberInputDecrement$1, NumberInputGroup as NumberInputGroup$1, NumberInputIncrement as NumberInputIncrement$1, NumberInputScrubArea as NumberInputScrubArea$1, NumberInputScrubAreaCursor as NumberInputScrubAreaCursor$1, createNumberInputController } from "@ui-sdk/react/number-input";
|
|
3
3
|
declare function NumberInput({ className, ...props }: ComponentProps<typeof NumberInput$1>): import("react").JSX.Element;
|
|
4
4
|
declare function NumberInputScrubArea({ className, ...props }: ComponentProps<typeof NumberInputScrubArea$1>): import("react").JSX.Element;
|
|
5
5
|
declare function NumberInputScrubAreaCursor({ className, ...props }: ComponentProps<typeof NumberInputScrubAreaCursor$1>): import("react").JSX.Element;
|
|
6
6
|
declare function NumberInputGroup({ className, ...props }: ComponentProps<typeof NumberInputGroup$1>): import("react").JSX.Element;
|
|
7
|
+
/**
|
|
8
|
+
* A unit at the end of the field, inside its edge and in gray: `USD` after an
|
|
9
|
+
* amount. It sits over the control's trailing padding, which grows to make room,
|
|
10
|
+
* so the number never runs under it. Put it after `NumberInputControl` and
|
|
11
|
+
* before `NumberInputIncrement`. It can't be edited or selected, and a click on
|
|
12
|
+
* it focuses the field. A screen reader hears it once, as the control's
|
|
13
|
+
* description, not as a part of its own.
|
|
14
|
+
*/
|
|
15
|
+
declare function NumberInputUnit({ className, id, ref, ...props }: ComponentProps<"span"> & {
|
|
16
|
+
ref?: Ref<HTMLSpanElement>;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
7
18
|
/** Steps down. Name it with `aria-label`. Without children it draws a minus icon. */
|
|
8
19
|
declare function NumberInputDecrement({ className, children, ...props }: ComponentProps<typeof NumberInputDecrement$1>): import("react").JSX.Element;
|
|
9
|
-
declare function NumberInputControl({ className, ...props }: ComponentProps<typeof NumberInputControl$1>): import("react").JSX.Element;
|
|
20
|
+
declare function NumberInputControl({ className, "aria-describedby": describedBy, ...props }: ComponentProps<typeof NumberInputControl$1>): import("react").JSX.Element;
|
|
10
21
|
/** Steps up. Name it with `aria-label`. Without children it draws a plus icon. */
|
|
11
22
|
declare function NumberInputIncrement({ className, children, ...props }: ComponentProps<typeof NumberInputIncrement$1>): import("react").JSX.Element;
|
|
12
|
-
export { NumberInput, NumberInputControl, NumberInputDecrement, NumberInputGroup, NumberInputIncrement, NumberInputScrubArea, NumberInputScrubAreaCursor, createNumberInputController };
|
|
23
|
+
export { NumberInput, NumberInputControl, NumberInputDecrement, NumberInputGroup, NumberInputIncrement, NumberInputScrubArea, NumberInputScrubAreaCursor, NumberInputUnit, createNumberInputController };
|