@botiverse/raft-ui 0.10.7 → 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
@@ -1004,6 +1004,55 @@
1004
1004
  transform: translate(-1.5px, 1.2px) rotate(-8deg);
1005
1005
  }
1006
1006
  }
1007
+ @layer components {
1008
+ .r-virtual-list {
1009
+ max-height: inherit;
1010
+ overflow-anchor: none;
1011
+ outline: none;
1012
+ min-width: 1px;
1013
+ height: 100%;
1014
+ overflow: hidden auto;
1015
+ }
1016
+
1017
+ .r-virtual-list.r-virtual-list--ios-compensation-enabled {
1018
+ overscroll-behavior: none;
1019
+ }
1020
+
1021
+ .r-virtual-list.r-virtual-list--x-scrollable {
1022
+ overflow-x: auto;
1023
+ }
1024
+
1025
+ .r-virtual-list:not(.r-virtual-list--show-scrollbar) {
1026
+ scrollbar-width: none;
1027
+ }
1028
+
1029
+ .r-virtual-list:not(.r-virtual-list--show-scrollbar)::-webkit-scrollbar {
1030
+ width: 0;
1031
+ height: 0;
1032
+ display: none;
1033
+ }
1034
+
1035
+ .r-virtual-list.r-virtual-list--empty-centered {
1036
+ flex-direction: column;
1037
+ display: flex;
1038
+ }
1039
+
1040
+ .r-virtual-list__empty.r-virtual-list__empty--center {
1041
+ flex: 1;
1042
+ justify-content: center;
1043
+ align-items: center;
1044
+ min-height: 0;
1045
+ display: flex;
1046
+ }
1047
+
1048
+ @media print {
1049
+ .r-virtual-list.r-virtual-list--printable {
1050
+ height: auto !important;
1051
+ max-height: none !important;
1052
+ overflow: visible !important;
1053
+ }
1054
+ }
1055
+ }
1007
1056
  .r-combobox-select {
1008
1057
  min-width: 0;
1009
1058
  position: relative;
@@ -1156,7 +1205,7 @@
1156
1205
  width: var(--anchor-width, max-content);
1157
1206
  min-width: 13.75rem;
1158
1207
  max-width: var(--available-width);
1159
- max-height: min(var(--available-height), 24rem);
1208
+ max-height: min(var(--available-height), max(24rem, var(--combobox-select-list-max-height, 0px)));
1160
1209
  background: var(--layer-popover);
1161
1210
  color: var(--foreground);
1162
1211
  box-shadow: 0 0 0 1px var(--line-seam),
@@ -1168,8 +1217,9 @@
1168
1217
  }
1169
1218
 
1170
1219
  .r-combobox-select__list {
1220
+ box-sizing: border-box;
1221
+ max-height: var(--combobox-select-list-max-height, 16rem);
1171
1222
  overscroll-behavior: contain;
1172
- max-height: 16rem;
1173
1223
  padding: 6px;
1174
1224
  scroll-padding-block: 6px;
1175
1225
  overflow-y: auto;
@@ -1300,134 +1350,12 @@
1300
1350
  color: var(--foreground-disabled);
1301
1351
  }
1302
1352
 
1303
- .r-combobox-select__trigger {
1304
- box-sizing: border-box;
1305
- min-width: 0;
1306
- min-height: inherit;
1307
- color: inherit;
1308
- font: inherit;
1309
- text-align: start;
1310
- cursor: default;
1311
- -webkit-tap-highlight-color: transparent;
1312
- background: none;
1313
- border: 0;
1314
- outline: 0;
1315
- flex: 1;
1316
- align-items: center;
1317
- padding: 0;
1318
- display: flex;
1319
- }
1320
-
1321
- .r-combobox-select__trigger:after {
1322
- content: "";
1323
- border-radius: inherit;
1324
- position: absolute;
1325
- inset: 0;
1326
- }
1327
-
1328
- .r-combobox-select__trigger:disabled {
1329
- color: inherit;
1330
- }
1331
-
1332
- .r-combobox-select__value {
1333
- text-overflow: ellipsis;
1334
- white-space: nowrap;
1335
- min-width: 0;
1336
- overflow: hidden;
1337
- }
1338
-
1339
- .r-combobox-select__placeholder {
1340
- text-overflow: ellipsis;
1341
- white-space: nowrap;
1342
- min-width: 0;
1343
- color: var(--foreground-hint);
1344
- overflow: hidden;
1345
- }
1346
-
1347
- .r-combobox-select__trigger .r-combobox-select__chips {
1348
- margin-inline-start: -6px;
1349
- }
1350
-
1351
- .r-combobox-select__trigger .r-combobox-select__chip {
1352
- padding-inline-end: 8px;
1353
- }
1354
-
1355
- .r-combobox-select__clear {
1356
- z-index: 1;
1357
- position: relative;
1358
- }
1359
-
1360
- .r-combobox-select__arrow {
1361
- pointer-events: none;
1362
- }
1363
-
1364
- .r-combobox-select__control--trigger[data-popup-open] .r-combobox-select__arrow > svg {
1365
- transform: rotate(180deg);
1366
- }
1367
-
1368
1353
  .r-combobox-select__popup--anchored .r-combobox-select__list {
1369
- box-sizing: border-box;
1370
- max-height: min(calc(16rem + 12px), var(--available-height, 100vh));
1371
- }
1372
-
1373
- .r-combobox-select__sheet-popup {
1374
- height: 82dvh;
1375
- }
1376
-
1377
- .r-combobox-select__sheet {
1378
- flex-direction: column;
1379
- flex: 1;
1380
- min-height: 0;
1381
- display: flex;
1382
- }
1383
-
1384
- .r-combobox-select__sheet-header {
1385
- flex-direction: row;
1386
- justify-content: space-between;
1387
- align-items: center;
1388
- gap: 8px;
1389
- padding-inline-end: 8px;
1390
- }
1391
-
1392
- .r-combobox-select__sheet-title {
1393
- flex: 1;
1394
- min-width: 0;
1395
- }
1396
-
1397
- .r-combobox-select__sheet-search {
1398
- flex: none;
1399
- padding: 4px 16px 8px;
1400
- }
1401
-
1402
- .r-combobox-select__search-icon {
1403
- width: 16px;
1404
- height: 16px;
1405
- color: var(--foreground-hint);
1406
- flex: none;
1407
- }
1408
-
1409
- .r-combobox-select__sheet-body {
1410
- overscroll-behavior: contain;
1411
- min-height: 0;
1412
- padding: 0 8px calc(16px + env(safe-area-inset-bottom, 0px));
1413
- overflow-y: auto;
1414
- }
1415
-
1416
- .r-combobox-select__sheet .r-combobox-select__list {
1417
- max-height: none;
1418
- padding: 0;
1419
- overflow: visible;
1420
- }
1421
-
1422
- .r-combobox-select__sheet .r-combobox-select__option {
1423
- min-height: 52px;
1424
- font-size: var(--text-body);
1425
- line-height: var(--text-body--line-height);
1426
- padding: 0 12px;
1354
+ max-height: min(var(--combobox-select-list-max-height, 16rem), var(--available-height, 100vh));
1427
1355
  }
1428
1356
 
1429
- .r-combobox-select__sheet .r-combobox-select__group-label {
1430
- padding: 12px 12px 4px;
1357
+ .r-combobox-select__control--phone .r-combobox-select__input {
1358
+ font-size: max(1em, 16px);
1431
1359
  }
1432
1360
 
1433
1361
  @keyframes r-combobox-select-spin {
package/dist/styles.css CHANGED
@@ -4,6 +4,7 @@
4
4
  @import "./components/timeline/timeline.css";
5
5
  @import "./components/steps/steps.css";
6
6
  @import "./components/steps/otter-indicator.css";
7
+ @import "./components/virtual-list/styles/virtual-list.css";
7
8
 
8
9
  /* `dark:` follows the nearest explicit mode class, and before hydration the
9
10
  system preference. A `.light` island inside a dark page re-enters light
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-CDHLWJtB.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 };