@godxjp/ui 5.0.0 → 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 +30 -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 +23 -18
- package/dist/components/primitives.js.map +1 -1
- package/dist/index.js +23 -18
- 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"];
|
|
@@ -159,11 +159,13 @@ function Col({
|
|
|
159
159
|
const merged = {
|
|
160
160
|
flexBasis: flex !== void 0 ? void 0 : `${SPAN_TO_PCT(resolved)}%`,
|
|
161
161
|
maxWidth: flex !== void 0 ? void 0 : `${SPAN_TO_PCT(resolved)}%`,
|
|
162
|
-
flex: typeof flex === "number" ? `${flex} ${flex} auto` : flex,
|
|
163
162
|
paddingLeft: h ? `${h / 2}px` : void 0,
|
|
164
163
|
paddingRight: h ? `${h / 2}px` : void 0,
|
|
165
164
|
marginLeft: offset ? `${SPAN_TO_PCT(offset)}%` : void 0,
|
|
166
165
|
order,
|
|
166
|
+
...flex !== void 0 && {
|
|
167
|
+
flex: typeof flex === "number" ? `${flex} ${flex} auto` : flex
|
|
168
|
+
},
|
|
167
169
|
...style
|
|
168
170
|
};
|
|
169
171
|
return /* @__PURE__ */ jsx("div", { className: cn("min-w-0", className), style: merged, ...rest, children });
|
|
@@ -1090,8 +1092,10 @@ var Spinner = forwardRef(
|
|
|
1090
1092
|
);
|
|
1091
1093
|
var Root2 = PopoverPrimitive.Root;
|
|
1092
1094
|
var Trigger2 = PopoverPrimitive.Trigger;
|
|
1095
|
+
var Anchor2 = PopoverPrimitive.Anchor;
|
|
1093
1096
|
var Popover = forwardRef(function Popover2({
|
|
1094
1097
|
trigger,
|
|
1098
|
+
anchor,
|
|
1095
1099
|
children,
|
|
1096
1100
|
align = "center",
|
|
1097
1101
|
side,
|
|
@@ -1100,23 +1104,24 @@ var Popover = forwardRef(function Popover2({
|
|
|
1100
1104
|
contentProps,
|
|
1101
1105
|
...rootProps
|
|
1102
1106
|
}, ref) {
|
|
1103
|
-
if (trigger === void 0) {
|
|
1107
|
+
if (trigger === void 0 && anchor === void 0) {
|
|
1104
1108
|
return /* @__PURE__ */ jsx(Root2, { ...rootProps, children });
|
|
1105
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
|
+
) });
|
|
1106
1122
|
return /* @__PURE__ */ jsxs(Root2, { ...rootProps, children: [
|
|
1107
|
-
/* @__PURE__ */ jsx(Trigger2, { asChild: true, children: trigger }),
|
|
1108
|
-
|
|
1109
|
-
PopoverPrimitive.Content,
|
|
1110
|
-
{
|
|
1111
|
-
ref,
|
|
1112
|
-
align,
|
|
1113
|
-
side,
|
|
1114
|
-
sideOffset,
|
|
1115
|
-
...contentProps,
|
|
1116
|
-
className: cn("popover-content", className, contentProps?.className),
|
|
1117
|
-
children
|
|
1118
|
-
}
|
|
1119
|
-
) })
|
|
1123
|
+
anchor !== void 0 ? /* @__PURE__ */ jsx(Anchor2, { asChild: true, children: anchor }) : /* @__PURE__ */ jsx(Trigger2, { asChild: true, children: trigger }),
|
|
1124
|
+
content
|
|
1120
1125
|
] });
|
|
1121
1126
|
});
|
|
1122
1127
|
var AutoComplete = forwardRef(
|
|
@@ -1205,7 +1210,7 @@ var AutoComplete = forwardRef(
|
|
|
1205
1210
|
{
|
|
1206
1211
|
open: currentOpen,
|
|
1207
1212
|
onOpenChange: setOpen,
|
|
1208
|
-
|
|
1213
|
+
anchor: input,
|
|
1209
1214
|
align: "start",
|
|
1210
1215
|
sideOffset: 4,
|
|
1211
1216
|
className: "combobox-content",
|
|
@@ -5050,7 +5055,7 @@ var Breadcrumb = forwardRef(
|
|
|
5050
5055
|
)
|
|
5051
5056
|
);
|
|
5052
5057
|
Breadcrumb.displayName = "Breadcrumb";
|
|
5053
|
-
var
|
|
5058
|
+
var Anchor3 = forwardRef(function Anchor4({
|
|
5054
5059
|
orientation = "vertical",
|
|
5055
5060
|
sticky,
|
|
5056
5061
|
offset = 0,
|
|
@@ -7346,6 +7351,6 @@ function Tour({
|
|
|
7346
7351
|
);
|
|
7347
7352
|
}
|
|
7348
7353
|
|
|
7349
|
-
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 };
|
|
7350
7355
|
//# sourceMappingURL=primitives.js.map
|
|
7351
7356
|
//# sourceMappingURL=primitives.js.map
|