@proteos/ui 0.52.0 → 0.54.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/index.d.cts CHANGED
@@ -87,6 +87,7 @@ declare const AttributeType: {
87
87
  readonly Currency: "currency";
88
88
  readonly KnowledgeText: "knowledge-text";
89
89
  readonly File: "file";
90
+ readonly ContactAddress: "contact-address";
90
91
  };
91
92
  type AttributeType = (typeof AttributeType)[keyof typeof AttributeType];
92
93
  /** Iteration order for type pickers, dropdowns, etc. */
package/dist/index.d.ts CHANGED
@@ -87,6 +87,7 @@ declare const AttributeType: {
87
87
  readonly Currency: "currency";
88
88
  readonly KnowledgeText: "knowledge-text";
89
89
  readonly File: "file";
90
+ readonly ContactAddress: "contact-address";
90
91
  };
91
92
  type AttributeType = (typeof AttributeType)[keyof typeof AttributeType];
92
93
  /** Iteration order for type pickers, dropdowns, etc. */
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { cn, Button, Skeleton } from './chunk-IKAX76MB.js';
2
2
  export { Button, Skeleton, buttonStyles, cn, skeletonStyles } from './chunk-IKAX76MB.js';
3
- import { icons, Paperclip, BookText, Banknote, UsersRound, User, Link2, Braces, Brackets, ToggleLeft, CircleDot, Calendar, Hash, Type, File, FileImage, FileText, FileSpreadsheet, FileArchive, Loader2, X, Shapes, Search, Phone, AudioLines, Video, Mic, AtSign, MessagesSquare, Camera, Send, Linkedin, MessageCircle, Mail, Pipette, Pencil, ChevronDown, GripVertical, SendHorizontal, CircleX, Download, ChevronRight as ChevronRight$1, CircleCheck, CircleAlert, Info } from 'lucide-react';
3
+ import { icons, Contact, Paperclip, BookText, Banknote, UsersRound, User, Link2, Braces, Brackets, ToggleLeft, CircleDot, Calendar, Hash, Type, File, FileImage, FileText, FileSpreadsheet, FileArchive, Loader2, X, Shapes, Search, Phone, AudioLines, Video, Mic, AtSign, MessagesSquare, Camera, Send, Linkedin, MessageCircle, Mail, Pipette, Pencil, ChevronDown, GripVertical, SendHorizontal, CircleX, Download, ChevronRight as ChevronRight$1, CircleCheck, CircleAlert, Info } from 'lucide-react';
4
4
  import { tv } from 'tailwind-variants';
5
5
  import { Tabs as Tabs$1, TabPanel, Tab, TabList, MenuTrigger as MenuTrigger$1, SubmenuTrigger as SubmenuTrigger$1, DialogTrigger, Popover as Popover$1, Dialog, DropZone, Text, FileTrigger, Heading, Label, Input as Input$1, ListBox, ListBoxItem, Breadcrumbs as Breadcrumbs$1, Breadcrumb, Link, Button as Button$1, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, FieldError, TextField, ComboBox, ComboBoxStateContext, Select as Select$1, SelectValue, ModalOverlay, Modal as Modal$1, DatePicker as DatePicker$1, Group, DateInput, DateSegment, Menu as Menu$1, MenuItem as MenuItem$1, Disclosure, DisclosurePanel, ProgressBar as ProgressBar$1, RadioGroup as RadioGroup$1, Radio as Radio$1, Separator as Separator$1, Switch as Switch$1, TextArea, TimeField as TimeField$1, UNSTABLE_ToastQueue, UNSTABLE_ToastRegion, UNSTABLE_Toast, UNSTABLE_ToastContent, TooltipTrigger as TooltipTrigger$1, Tooltip as Tooltip$1, Calendar as Calendar$1, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, CalendarCell, DatePickerStateContext } from 'react-aria-components';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -359,7 +359,8 @@ var AttributeType = {
359
359
  Principal: "principal",
360
360
  Currency: "currency",
361
361
  KnowledgeText: "knowledge-text",
362
- File: "file"
362
+ File: "file",
363
+ ContactAddress: "contact-address"
363
364
  };
364
365
  var ATTRIBUTE_TYPES = Object.values(AttributeType);
365
366
  var ATTRIBUTE_TYPE_ICONS = {
@@ -376,7 +377,8 @@ var ATTRIBUTE_TYPE_ICONS = {
376
377
  [AttributeType.Principal]: UsersRound,
377
378
  [AttributeType.Currency]: Banknote,
378
379
  [AttributeType.KnowledgeText]: BookText,
379
- [AttributeType.File]: Paperclip
380
+ [AttributeType.File]: Paperclip,
381
+ [AttributeType.ContactAddress]: Contact
380
382
  };
381
383
  function useAttributeTypeIcon(type) {
382
384
  return ATTRIBUTE_TYPE_ICONS[type];
@@ -5738,7 +5740,11 @@ function Radio({ children, className, ...props }) {
5738
5740
  {
5739
5741
  ...props,
5740
5742
  className: (renderProps) => cn(
5741
- "group inline-flex items-center gap-2.5 cursor-pointer",
5743
+ // `relative` for the same reason as Checkbox / Switch: RAC's
5744
+ // visually-hidden <input> is absolutely positioned and must resolve
5745
+ // against this radio, not a far-away shell, or focusing it scrolls
5746
+ // the clipped page.
5747
+ "group relative inline-flex items-center gap-2.5 cursor-pointer",
5742
5748
  "font-sans text-[14px] text-ink-2 select-none",
5743
5749
  "data-[disabled]:opacity-45 data-[disabled]:cursor-not-allowed",
5744
5750
  typeof className === "function" ? className(renderProps) : className
@@ -5823,44 +5829,126 @@ var OPERATORS = [
5823
5829
  id: "eq",
5824
5830
  label: "is",
5825
5831
  arity: 1,
5826
- types: ["string", "number", "integer", "currency", "datetime", "enum", "boolean", "relation", "user", "principal"]
5832
+ types: [
5833
+ "string",
5834
+ "number",
5835
+ "integer",
5836
+ "currency",
5837
+ "datetime",
5838
+ "enum",
5839
+ "boolean",
5840
+ "relation",
5841
+ "user",
5842
+ "principal",
5843
+ "contact-address"
5844
+ ]
5827
5845
  },
5828
5846
  {
5829
5847
  id: "ne",
5830
5848
  label: "is not",
5831
5849
  arity: 1,
5832
- types: ["string", "number", "integer", "currency", "datetime", "enum", "boolean", "relation", "user", "principal"]
5850
+ types: [
5851
+ "string",
5852
+ "number",
5853
+ "integer",
5854
+ "currency",
5855
+ "datetime",
5856
+ "enum",
5857
+ "boolean",
5858
+ "relation",
5859
+ "user",
5860
+ "principal",
5861
+ "contact-address"
5862
+ ]
5833
5863
  },
5834
5864
  {
5835
5865
  id: "in",
5836
5866
  label: "is any of",
5837
5867
  arity: "n",
5838
- types: ["string", "number", "integer", "currency", "enum", "relation", "user", "principal"]
5868
+ types: [
5869
+ "string",
5870
+ "number",
5871
+ "integer",
5872
+ "currency",
5873
+ "enum",
5874
+ "relation",
5875
+ "user",
5876
+ "principal",
5877
+ "contact-address"
5878
+ ]
5839
5879
  },
5840
5880
  {
5841
5881
  id: "not_in",
5842
5882
  label: "is none of",
5843
5883
  arity: "n",
5844
- types: ["string", "number", "integer", "currency", "enum", "relation", "user", "principal"]
5884
+ types: [
5885
+ "string",
5886
+ "number",
5887
+ "integer",
5888
+ "currency",
5889
+ "enum",
5890
+ "relation",
5891
+ "user",
5892
+ "principal",
5893
+ "contact-address"
5894
+ ]
5895
+ },
5896
+ { id: "contains", label: "contains", arity: 1, types: ["string", "array", "contact-address"] },
5897
+ { id: "starts_with", label: "starts with", arity: 1, types: ["string", "contact-address"] },
5898
+ { id: "ends_with", label: "ends with", arity: 1, types: ["string", "contact-address"] },
5899
+ {
5900
+ id: "gt",
5901
+ label: "is greater than",
5902
+ arity: 1,
5903
+ types: ["number", "integer", "currency", "datetime"]
5845
5904
  },
5846
- { id: "contains", label: "contains", arity: 1, types: ["string", "array"] },
5847
- { id: "starts_with", label: "starts with", arity: 1, types: ["string"] },
5848
- { id: "ends_with", label: "ends with", arity: 1, types: ["string"] },
5849
- { id: "gt", label: "is greater than", arity: 1, types: ["number", "integer", "currency", "datetime"] },
5850
5905
  { id: "gte", label: "is on or after", arity: 1, types: ["datetime"] },
5851
- { id: "lt", label: "is less than", arity: 1, types: ["number", "integer", "currency", "datetime"] },
5906
+ {
5907
+ id: "lt",
5908
+ label: "is less than",
5909
+ arity: 1,
5910
+ types: ["number", "integer", "currency", "datetime"]
5911
+ },
5852
5912
  { id: "lte", label: "is on or before", arity: 1, types: ["datetime"] },
5853
5913
  {
5854
5914
  id: "empty",
5855
5915
  label: "is empty",
5856
5916
  arity: 0,
5857
- types: ["string", "number", "integer", "currency", "datetime", "enum", "boolean", "array", "relation", "user", "principal", "file"]
5917
+ types: [
5918
+ "string",
5919
+ "number",
5920
+ "integer",
5921
+ "currency",
5922
+ "datetime",
5923
+ "enum",
5924
+ "boolean",
5925
+ "array",
5926
+ "relation",
5927
+ "user",
5928
+ "principal",
5929
+ "file",
5930
+ "contact-address"
5931
+ ]
5858
5932
  },
5859
5933
  {
5860
5934
  id: "not_empty",
5861
5935
  label: "is not empty",
5862
5936
  arity: 0,
5863
- types: ["string", "number", "integer", "currency", "datetime", "enum", "boolean", "array", "relation", "user", "principal", "file"]
5937
+ types: [
5938
+ "string",
5939
+ "number",
5940
+ "integer",
5941
+ "currency",
5942
+ "datetime",
5943
+ "enum",
5944
+ "boolean",
5945
+ "array",
5946
+ "relation",
5947
+ "user",
5948
+ "principal",
5949
+ "file",
5950
+ "contact-address"
5951
+ ]
5864
5952
  }
5865
5953
  ];
5866
5954
  var OP_LABEL_OVERRIDES = {
@@ -7793,7 +7881,11 @@ function Switch({ children, labelPlacement = "end", className, ...props }) {
7793
7881
  {
7794
7882
  ...props,
7795
7883
  className: (renderProps) => cn(
7796
- "group inline-flex items-center gap-3 cursor-pointer select-none",
7884
+ // `relative`: RAC's visually-hidden <input> is absolutely positioned;
7885
+ // without a positioned label it escapes an overflow-auto ancestor and
7886
+ // its containing block becomes the page shell, so focusing it (any
7887
+ // press) scrolls the clipped shell and the whole tab goes blank.
7888
+ "group relative inline-flex items-center gap-3 cursor-pointer select-none",
7797
7889
  "font-sans text-[14px] text-ink-2",
7798
7890
  labelPlacement === "start" && "flex-row-reverse",
7799
7891
  "data-[disabled]:opacity-45 data-[disabled]:cursor-not-allowed",