@godxjp/ui 5.0.1 → 5.0.2
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/CHANGELOG.md +18 -0
- package/dist/components/composites.js +17 -14
- package/dist/components/composites.js.map +1 -1
- package/dist/components/primitives.d.ts +8 -0
- package/dist/components/primitives.js +20 -17
- package/dist/components/primitives.js.map +1 -1
- package/dist/index.js +20 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1145,7 +1145,15 @@ declare function Descriptions({ title, extra, items, column, layout, bordered, s
|
|
|
1145
1145
|
declare const Separator: react.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
1146
1146
|
|
|
1147
1147
|
interface PopoverProps extends Omit<ComponentPropsWithoutRef<typeof PopoverPrimitive.Root>, "children"> {
|
|
1148
|
+
/** Click-to-toggle trigger. Radix wires open/close on click. Don't combine
|
|
1149
|
+
* with a controlled `open` flag that also opens on focus — the trigger's
|
|
1150
|
+
* click handler will toggle the just-opened popup back to closed. Use
|
|
1151
|
+
* `anchor` instead in that case (combobox / typeahead pattern). */
|
|
1148
1152
|
trigger?: ReactNode;
|
|
1153
|
+
/** Positioning-only anchor. The popup floats next to this element but the
|
|
1154
|
+
* element itself does NOT handle open/close. Use this when the parent
|
|
1155
|
+
* controls `open` (combobox / typeahead / focus-managed dropdown). */
|
|
1156
|
+
anchor?: ReactNode;
|
|
1149
1157
|
children?: ReactNode;
|
|
1150
1158
|
align?: ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>["align"];
|
|
1151
1159
|
side?: ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>["side"];
|
|
@@ -1092,8 +1092,10 @@ var Spinner = forwardRef(
|
|
|
1092
1092
|
);
|
|
1093
1093
|
var Root2 = PopoverPrimitive.Root;
|
|
1094
1094
|
var Trigger2 = PopoverPrimitive.Trigger;
|
|
1095
|
+
var Anchor2 = PopoverPrimitive.Anchor;
|
|
1095
1096
|
var Popover = forwardRef(function Popover2({
|
|
1096
1097
|
trigger,
|
|
1098
|
+
anchor,
|
|
1097
1099
|
children,
|
|
1098
1100
|
align = "center",
|
|
1099
1101
|
side,
|
|
@@ -1102,23 +1104,24 @@ var Popover = forwardRef(function Popover2({
|
|
|
1102
1104
|
contentProps,
|
|
1103
1105
|
...rootProps
|
|
1104
1106
|
}, ref) {
|
|
1105
|
-
if (trigger === void 0) {
|
|
1107
|
+
if (trigger === void 0 && anchor === void 0) {
|
|
1106
1108
|
return /* @__PURE__ */ jsx(Root2, { ...rootProps, children });
|
|
1107
1109
|
}
|
|
1110
|
+
const content = /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1111
|
+
PopoverPrimitive.Content,
|
|
1112
|
+
{
|
|
1113
|
+
ref,
|
|
1114
|
+
align,
|
|
1115
|
+
side,
|
|
1116
|
+
sideOffset,
|
|
1117
|
+
...contentProps,
|
|
1118
|
+
className: cn("popover-content", className, contentProps?.className),
|
|
1119
|
+
children
|
|
1120
|
+
}
|
|
1121
|
+
) });
|
|
1108
1122
|
return /* @__PURE__ */ jsxs(Root2, { ...rootProps, children: [
|
|
1109
|
-
/* @__PURE__ */ jsx(Trigger2, { asChild: true, children: trigger }),
|
|
1110
|
-
|
|
1111
|
-
PopoverPrimitive.Content,
|
|
1112
|
-
{
|
|
1113
|
-
ref,
|
|
1114
|
-
align,
|
|
1115
|
-
side,
|
|
1116
|
-
sideOffset,
|
|
1117
|
-
...contentProps,
|
|
1118
|
-
className: cn("popover-content", className, contentProps?.className),
|
|
1119
|
-
children
|
|
1120
|
-
}
|
|
1121
|
-
) })
|
|
1123
|
+
anchor !== void 0 ? /* @__PURE__ */ jsx(Anchor2, { asChild: true, children: anchor }) : /* @__PURE__ */ jsx(Trigger2, { asChild: true, children: trigger }),
|
|
1124
|
+
content
|
|
1122
1125
|
] });
|
|
1123
1126
|
});
|
|
1124
1127
|
var AutoComplete = forwardRef(
|
|
@@ -1207,7 +1210,7 @@ var AutoComplete = forwardRef(
|
|
|
1207
1210
|
{
|
|
1208
1211
|
open: currentOpen,
|
|
1209
1212
|
onOpenChange: setOpen,
|
|
1210
|
-
|
|
1213
|
+
anchor: input,
|
|
1211
1214
|
align: "start",
|
|
1212
1215
|
sideOffset: 4,
|
|
1213
1216
|
className: "combobox-content",
|
|
@@ -5052,7 +5055,7 @@ var Breadcrumb = forwardRef(
|
|
|
5052
5055
|
)
|
|
5053
5056
|
);
|
|
5054
5057
|
Breadcrumb.displayName = "Breadcrumb";
|
|
5055
|
-
var
|
|
5058
|
+
var Anchor3 = forwardRef(function Anchor4({
|
|
5056
5059
|
orientation = "vertical",
|
|
5057
5060
|
sticky,
|
|
5058
5061
|
offset = 0,
|
|
@@ -7348,6 +7351,6 @@ function Tour({
|
|
|
7348
7351
|
);
|
|
7349
7352
|
}
|
|
7350
7353
|
|
|
7351
|
-
export { Alert, AlertDialog, AllDayChip, Anchor, AttendeeChip, AttendeeListItem, AutoComplete, AvailabilityRow, Avatar, AvatarStack, Badge, Breadcrumb, Button, Calendar, CalendarOption, Card, Carousel, Cascader, Checkbox, CheckboxGroup, Checklist, Col, Collapse, ColorPicker, ColorSwatchCheckbox, DEFAULT_GRID, DateField, DatePicker, DateRangePicker, DayHeaderPill, Descriptions, Dialog, DropdownMenu, Empty, EventBlock, EventPill, Field, Flex, Form, FormField, GridColumn, IconButton, IconRow, Image, Input, InputNumber, InputPassword, InputSearch, Label4 as Label, List2 as List, LocaleTabs, Menu, MiniMonth, MonthCell, NowLine, PageHeader, Pagination, Popconfirm, Popover, Progress, QRCode, Radio, RadioGroup, Rate, Result, Row, SegmentedControl, Select, Separator4 as Separator, Sheet, Skeleton, Slider, Space, Spinner, Statistic, Steps, SuggestedSlotCard, Switch, Table, Tabs, Tag, Textarea, TimeField, TimeGutter, TimeInput, Timeline, Toaster, Tooltip, Tour, Transfer, Tree, TreeSelect, Typography, Watermark, buildMonthGrid, cn, computePageRange, fmtHour, layoutEvents, minToY, normalizeLoading, parseHM, useFormLoading, useRowGutter, ymd };
|
|
7354
|
+
export { Alert, AlertDialog, AllDayChip, Anchor3 as Anchor, AttendeeChip, AttendeeListItem, AutoComplete, AvailabilityRow, Avatar, AvatarStack, Badge, Breadcrumb, Button, Calendar, CalendarOption, Card, Carousel, Cascader, Checkbox, CheckboxGroup, Checklist, Col, Collapse, ColorPicker, ColorSwatchCheckbox, DEFAULT_GRID, DateField, DatePicker, DateRangePicker, DayHeaderPill, Descriptions, Dialog, DropdownMenu, Empty, EventBlock, EventPill, Field, Flex, Form, FormField, GridColumn, IconButton, IconRow, Image, Input, InputNumber, InputPassword, InputSearch, Label4 as Label, List2 as List, LocaleTabs, Menu, MiniMonth, MonthCell, NowLine, PageHeader, Pagination, Popconfirm, Popover, Progress, QRCode, Radio, RadioGroup, Rate, Result, Row, SegmentedControl, Select, Separator4 as Separator, Sheet, Skeleton, Slider, Space, Spinner, Statistic, Steps, SuggestedSlotCard, Switch, Table, Tabs, Tag, Textarea, TimeField, TimeGutter, TimeInput, Timeline, Toaster, Tooltip, Tour, Transfer, Tree, TreeSelect, Typography, Watermark, buildMonthGrid, cn, computePageRange, fmtHour, layoutEvents, minToY, normalizeLoading, parseHM, useFormLoading, useRowGutter, ymd };
|
|
7352
7355
|
//# sourceMappingURL=primitives.js.map
|
|
7353
7356
|
//# sourceMappingURL=primitives.js.map
|