@botiverse/raft-ui 0.11.0 → 0.12.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/style.css CHANGED
@@ -1205,7 +1205,7 @@
1205
1205
  width: var(--anchor-width, max-content);
1206
1206
  min-width: 13.75rem;
1207
1207
  max-width: var(--available-width);
1208
- max-height: min(var(--available-height), 24rem);
1208
+ max-height: min(var(--available-height), max(24rem, var(--combobox-select-list-max-height, 0px)));
1209
1209
  background: var(--layer-popover);
1210
1210
  color: var(--foreground);
1211
1211
  box-shadow: 0 0 0 1px var(--line-seam),
@@ -1217,8 +1217,9 @@
1217
1217
  }
1218
1218
 
1219
1219
  .r-combobox-select__list {
1220
+ box-sizing: border-box;
1221
+ max-height: var(--combobox-select-list-max-height, 16rem);
1220
1222
  overscroll-behavior: contain;
1221
- max-height: 16rem;
1222
1223
  padding: 6px;
1223
1224
  scroll-padding-block: 6px;
1224
1225
  overflow-y: auto;
@@ -1349,134 +1350,12 @@
1349
1350
  color: var(--foreground-disabled);
1350
1351
  }
1351
1352
 
1352
- .r-combobox-select__trigger {
1353
- box-sizing: border-box;
1354
- min-width: 0;
1355
- min-height: inherit;
1356
- color: inherit;
1357
- font: inherit;
1358
- text-align: start;
1359
- cursor: default;
1360
- -webkit-tap-highlight-color: transparent;
1361
- background: none;
1362
- border: 0;
1363
- outline: 0;
1364
- flex: 1;
1365
- align-items: center;
1366
- padding: 0;
1367
- display: flex;
1368
- }
1369
-
1370
- .r-combobox-select__trigger:after {
1371
- content: "";
1372
- border-radius: inherit;
1373
- position: absolute;
1374
- inset: 0;
1375
- }
1376
-
1377
- .r-combobox-select__trigger:disabled {
1378
- color: inherit;
1379
- }
1380
-
1381
- .r-combobox-select__value {
1382
- text-overflow: ellipsis;
1383
- white-space: nowrap;
1384
- min-width: 0;
1385
- overflow: hidden;
1386
- }
1387
-
1388
- .r-combobox-select__placeholder {
1389
- text-overflow: ellipsis;
1390
- white-space: nowrap;
1391
- min-width: 0;
1392
- color: var(--foreground-hint);
1393
- overflow: hidden;
1394
- }
1395
-
1396
- .r-combobox-select__trigger .r-combobox-select__chips {
1397
- margin-inline-start: -6px;
1398
- }
1399
-
1400
- .r-combobox-select__trigger .r-combobox-select__chip {
1401
- padding-inline-end: 8px;
1402
- }
1403
-
1404
- .r-combobox-select__clear {
1405
- z-index: 1;
1406
- position: relative;
1407
- }
1408
-
1409
- .r-combobox-select__arrow {
1410
- pointer-events: none;
1411
- }
1412
-
1413
- .r-combobox-select__control--trigger[data-popup-open] .r-combobox-select__arrow > svg {
1414
- transform: rotate(180deg);
1415
- }
1416
-
1417
1353
  .r-combobox-select__popup--anchored .r-combobox-select__list {
1418
- box-sizing: border-box;
1419
- max-height: min(calc(16rem + 12px), var(--available-height, 100vh));
1420
- }
1421
-
1422
- .r-combobox-select__sheet-popup {
1423
- height: 82dvh;
1424
- }
1425
-
1426
- .r-combobox-select__sheet {
1427
- flex-direction: column;
1428
- flex: 1;
1429
- min-height: 0;
1430
- display: flex;
1431
- }
1432
-
1433
- .r-combobox-select__sheet-header {
1434
- flex-direction: row;
1435
- justify-content: space-between;
1436
- align-items: center;
1437
- gap: 8px;
1438
- padding-inline-end: 8px;
1439
- }
1440
-
1441
- .r-combobox-select__sheet-title {
1442
- flex: 1;
1443
- min-width: 0;
1444
- }
1445
-
1446
- .r-combobox-select__sheet-search {
1447
- flex: none;
1448
- padding: 4px 16px 8px;
1449
- }
1450
-
1451
- .r-combobox-select__search-icon {
1452
- width: 16px;
1453
- height: 16px;
1454
- color: var(--foreground-hint);
1455
- flex: none;
1456
- }
1457
-
1458
- .r-combobox-select__sheet-body {
1459
- overscroll-behavior: contain;
1460
- min-height: 0;
1461
- padding: 0 8px calc(16px + env(safe-area-inset-bottom, 0px));
1462
- overflow-y: auto;
1463
- }
1464
-
1465
- .r-combobox-select__sheet .r-combobox-select__list {
1466
- max-height: none;
1467
- padding: 0;
1468
- overflow: visible;
1469
- }
1470
-
1471
- .r-combobox-select__sheet .r-combobox-select__option {
1472
- min-height: 52px;
1473
- font-size: var(--text-body);
1474
- line-height: var(--text-body--line-height);
1475
- padding: 0 12px;
1354
+ max-height: min(var(--combobox-select-list-max-height, 16rem), var(--available-height, 100vh));
1476
1355
  }
1477
1356
 
1478
- .r-combobox-select__sheet .r-combobox-select__group-label {
1479
- padding: 12px 12px 4px;
1357
+ .r-combobox-select__control--phone .r-combobox-select__input {
1358
+ font-size: max(1em, 16px);
1480
1359
  }
1481
1360
 
1482
1361
  @keyframes r-combobox-select-spin {
package/dist/wip.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { M as StyledProps, O as ButtonProps, T as DialogTrigger, i as DialogClose, j as DataAttributes, s as DialogContentProps, t as Dialog, w as DialogTitleProps } from "./index-CAdZkAtE.mjs";
1
+ import { C as MessageQuotedPreviewAuthorDelegatedBy, Hi as DialogTitleProps, Ki as ButtonProps, Si as DialogClose, Ti as DialogContentProps, Ui as DialogTrigger, Xi as StyledProps, Yi as DataAttributes, a as MessageListJumpPillDismissProps, c as MessageListJumpPillProps, cn as MessageItemDelegatedAvatar, dn as MessageItemDelegatedByButton, fn as MessageItemDelegatedByButtonProps, hn as MessageItemDelegatedByProps, i as MessageListJumpPillDismiss, ln as MessageItemDelegatedAvatarProps, mn as MessageItemDelegatedByNameProps, n as MessageListJumpControlsProps, o as MessageListJumpPillGroup, pn as MessageItemDelegatedByName, r as MessageListJumpPill, s as MessageListJumpPillGroupProps, t as MessageListJumpControls, un as MessageItemDelegatedBy, w as MessageQuotedPreviewAuthorDelegatedByProps, yi as Dialog } from "./index-epyBg4aG.mjs";
2
2
  import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
3
3
  import { Button } from "@base-ui/react/button";
4
4
  import { useRender } from "@base-ui/react/use-render";
@@ -24,12 +24,6 @@ interface ComboboxSelectMessages {
24
24
  chipDescription: string;
25
25
  inputDescription: string;
26
26
  remove: (label: string) => string;
27
- /** The placeholder of the search input at the top of the phone's bottom sheet. */
28
- search: string;
29
- /** The button that closes the phone's bottom sheet of a multiple select. */
30
- done: string;
31
- /** The close button of the phone's bottom sheet. */
32
- close: string;
33
27
  }
34
28
  type RootProps = Combobox.Root.Props<unknown, boolean>;
35
29
  type ComboboxSelectProps<Option = ComboboxSelectOption, Multiple extends boolean | undefined = false> = Pick<RootProps, "name" | "form" | "required" | "disabled" | "readOnly" | "open" | "defaultOpen" | "onOpenChange" | "onOpenChangeComplete" | "autoHighlight" | "autoComplete" | "inputValue" | "defaultInputValue" | "onInputValueChange"> & Pick<ComponentPropsWithRef<"input">, "id" | "ref" | "aria-label" | "aria-labelledby" | "aria-describedby" | "aria-invalid"> & {
@@ -75,30 +69,23 @@ type ComboboxSelectProps<Option = ComboboxSelectOption, Multiple extends boolean
75
69
  loadingContent?: ReactNode;
76
70
  messages?: Partial<ComboboxSelectMessages>;
77
71
  /**
78
- * On a phone (a touch screen under 48rem), more selectable options than this open a
79
- * bottom sheet instead of the anchored list.
80
- * @default 10
72
+ * The tallest the list gets before it scrolls, its 6px padding above and below
73
+ * included: a CSS length, or a number of pixels. On a phone the list also gets
74
+ * shorter to fit the room on its side, and opens above when that side has more
75
+ * room and below is short of this height.
76
+ * @default "16rem"
81
77
  */
82
- sheetThreshold?: number;
83
- /**
84
- * The title of the phone's bottom sheet. Defaults to the field's name: `aria-label`,
85
- * the text of `aria-labelledby`, or the `<label>` whose `for` is the field's `id`.
86
- */
87
- sheetTitle?: ReactNode;
88
- /** The text input: the field on a desktop, the search input of the bottom sheet on a phone. */
78
+ listMaxHeight?: number | string;
89
79
  inputProps?: Omit<Combobox.Input.Props, "value" | "defaultValue" | "size" | "children">;
90
- /** The portal of the list, and of the phone's anchored list and bottom sheet. */
91
80
  portalProps?: Combobox.Portal.Props;
92
- /** The desktop list's positioner. A phone positions its list itself. */
93
81
  positionerProps?: Omit<Combobox.Positioner.Props, "children">;
94
- /** The desktop list's popup. */
95
82
  popupProps?: Omit<Combobox.Popup.Props, "children">;
96
83
  className?: string;
97
84
  style?: CSSProperties;
98
85
  };
99
86
  //#endregion
100
87
  //#region src/components/combobox-select/combobox-select.d.ts
101
- export declare function ComboboxSelect<Option = ComboboxSelectOption, Multiple extends boolean | undefined = false>({ options, multiple, value, defaultValue, onValueChange, labelField, valueField, disabledField, fallbackOption, filterable, filter, remote, onSearch, loading, create, creatable, onCreate, clearable, showArrow, clearFilterAfterSelect, onClear, maxTagCount, size, status, placeholder, renderLabel, renderOption, renderTag, renderCreateLabel, emptyContent, loadingContent, messages, sheetThreshold, sheetTitle, inputProps, portalProps, positionerProps, popupProps, className, style, id: idProp, ref, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, inputValue, defaultInputValue, onInputValueChange, disabled, readOnly, autoHighlight, ...rootProps }: ComboboxSelectProps<Option, Multiple>): import("react").JSX.Element;
88
+ export declare function ComboboxSelect<Option = ComboboxSelectOption, Multiple extends boolean | undefined = false>({ options, multiple, value, defaultValue, onValueChange, labelField, valueField, disabledField, fallbackOption, filterable, filter, remote, onSearch, loading, create, creatable, onCreate, clearable, showArrow, clearFilterAfterSelect, onClear, maxTagCount, size, status, placeholder, renderLabel, renderOption, renderTag, renderCreateLabel, emptyContent, loadingContent, messages, listMaxHeight, inputProps, portalProps, positionerProps, popupProps, className, style, id: idProp, ref, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, inputValue, defaultInputValue, onInputValueChange, disabled, readOnly, autoHighlight, onOpenChange, ...rootProps }: ComboboxSelectProps<Option, Multiple>): import("react").JSX.Element;
102
89
  //#endregion
103
90
  //#region src/components/announcement-dialog/announcement-dialog.d.ts
104
91
  export declare function AnnouncementDialogContent({ className, initialFocus, ref, ...props }: DialogContentProps): import("react").JSX.Element;
@@ -278,4 +265,4 @@ type UseCommentMarginFitsOptions = {
278
265
  */
279
266
  export declare function useCommentMarginFits(element: Element | null, { minWidth }?: UseCommentMarginFitsOptions): boolean;
280
267
  //#endregion
281
- export { Dialog as AnnouncementDialog, DialogClose as AnnouncementDialogClose, DialogTrigger as AnnouncementDialogTrigger, type ComboboxSelectGroup, type ComboboxSelectMessages, type ComboboxSelectOption, type ComboboxSelectProps, type ComboboxSelectSelection, type ComboboxSelectValue, type CommentCardMetaProps, type CommentCardProps, type CommentCardQuoteProps, type CommentCardTriggerProps, type CommentEntryAuthorProps, type CommentEntryBodyProps, type CommentEntryHeaderProps, type CommentEntryProps, type CommentEntryTimeProps, type CommentMarginItemProps, type CommentMarginLayout, type CommentMarginLayoutItem, type CommentMarginLayoutOptions, type CommentMarginProps, type CommentMarkerProps, type UseCommentMarginFitsOptions };
268
+ export { Dialog as AnnouncementDialog, DialogClose as AnnouncementDialogClose, DialogTrigger as AnnouncementDialogTrigger, type ComboboxSelectGroup, type ComboboxSelectMessages, type ComboboxSelectOption, type ComboboxSelectProps, type ComboboxSelectSelection, type ComboboxSelectValue, type CommentCardMetaProps, type CommentCardProps, type CommentCardQuoteProps, type CommentCardTriggerProps, type CommentEntryAuthorProps, type CommentEntryBodyProps, type CommentEntryHeaderProps, type CommentEntryProps, type CommentEntryTimeProps, type CommentMarginItemProps, type CommentMarginLayout, type CommentMarginLayoutItem, type CommentMarginLayoutOptions, type CommentMarginProps, type CommentMarkerProps, MessageItemDelegatedAvatar, type MessageItemDelegatedAvatarProps, MessageItemDelegatedBy, MessageItemDelegatedByButton, type MessageItemDelegatedByButtonProps, MessageItemDelegatedByName, type MessageItemDelegatedByNameProps, type MessageItemDelegatedByProps, MessageListJumpControls, type MessageListJumpControlsProps, MessageListJumpPill, MessageListJumpPillDismiss, type MessageListJumpPillDismissProps, MessageListJumpPillGroup, type MessageListJumpPillGroupProps, type MessageListJumpPillProps, MessageQuotedPreviewAuthorDelegatedBy, type MessageQuotedPreviewAuthorDelegatedByProps, type UseCommentMarginFitsOptions };