@borisj74/bv-ds 0.1.9 → 0.1.10

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.cjs CHANGED
@@ -29592,6 +29592,156 @@ function CommandShortcut({ keys: keys2, className }) {
29592
29592
  i
29593
29593
  )) });
29594
29594
  }
29595
+ var inputSizeClasses = {
29596
+ sm: "px-lg py-md text-sm",
29597
+ md: "px-lg py-md text-md",
29598
+ lg: "px-[14px] py-2.5 text-md"
29599
+ };
29600
+ function boxClasses(destructive) {
29601
+ return clsx_default(
29602
+ "flex w-full items-center gap-md rounded-md border bg-bg-primary shadow-xs",
29603
+ "transition-shadow focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-offset-bg-primary",
29604
+ destructive ? "border-border-error focus-within:ring-border-error" : "border-border-primary focus-within:border-border-brand focus-within:ring-border-brand"
29605
+ );
29606
+ }
29607
+ function FieldWrapper({
29608
+ label,
29609
+ required,
29610
+ hint,
29611
+ destructive,
29612
+ children,
29613
+ className
29614
+ }) {
29615
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx_default("flex w-full flex-col gap-sm font-body", className), children: [
29616
+ label ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex gap-xxs text-sm font-medium text-text-secondary", children: [
29617
+ label,
29618
+ required ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-brand-tertiary", children: "*" }) : null
29619
+ ] }) : null,
29620
+ children,
29621
+ hint ? /* @__PURE__ */ jsxRuntime.jsx(
29622
+ "span",
29623
+ {
29624
+ className: clsx_default(
29625
+ "text-sm font-normal",
29626
+ destructive ? "text-text-error-primary" : "text-text-tertiary"
29627
+ ),
29628
+ children: hint
29629
+ }
29630
+ ) : null
29631
+ ] });
29632
+ }
29633
+ function CheckboxBox({ selected, big }) {
29634
+ return /* @__PURE__ */ jsxRuntime.jsx(
29635
+ "span",
29636
+ {
29637
+ className: clsx_default(
29638
+ "flex shrink-0 items-center justify-center rounded-xs border",
29639
+ big ? "size-5" : "size-4",
29640
+ selected ? "border-transparent bg-bg-brand-solid" : "border-border-primary bg-bg-primary"
29641
+ ),
29642
+ children: selected && /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", fill: "none", className: "size-3 text-fg-white", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M13.33 4 6 11.33 2.67 8", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round", strokeLinejoin: "round" }) })
29643
+ }
29644
+ );
29645
+ }
29646
+ function SelectMenuItem({
29647
+ label,
29648
+ supportingText,
29649
+ selected = false,
29650
+ size = "sm",
29651
+ leading,
29652
+ multi = false,
29653
+ disabled,
29654
+ className,
29655
+ ...rest
29656
+ }) {
29657
+ const big = size !== "sm";
29658
+ return /* @__PURE__ */ jsxRuntime.jsxs(
29659
+ "button",
29660
+ {
29661
+ type: "button",
29662
+ role: "option",
29663
+ "aria-selected": selected,
29664
+ disabled,
29665
+ className: clsx_default(
29666
+ "flex w-full items-center gap-md rounded-sm text-left transition-colors",
29667
+ size === "lg" ? "py-2.5 pl-md pr-2.5" : "p-md",
29668
+ disabled ? "opacity-50" : "hover:bg-bg-primary-hover",
29669
+ className
29670
+ ),
29671
+ ...rest,
29672
+ children: [
29673
+ multi && /* @__PURE__ */ jsxRuntime.jsx(CheckboxBox, { selected, big }),
29674
+ !multi && leading && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: leading }),
29675
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: clsx_default("flex min-w-0 flex-1 items-center gap-sm", big ? "text-md" : "text-sm"), children: [
29676
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-medium text-text-primary", children: label }),
29677
+ supportingText && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-normal text-text-tertiary", children: supportingText })
29678
+ ] }),
29679
+ !multi && selected && /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5 shrink-0 text-fg-brand-primary", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16.67 5 7.5 14.17 3.33 10", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round", strokeLinejoin: "round" }) })
29680
+ ]
29681
+ }
29682
+ );
29683
+ }
29684
+ function ComboBox({
29685
+ options,
29686
+ value,
29687
+ onChange,
29688
+ onInputChange,
29689
+ placeholder = "Search...",
29690
+ disabled = false,
29691
+ error = false,
29692
+ label,
29693
+ hint,
29694
+ required,
29695
+ className
29696
+ }) {
29697
+ const selectedLabel = React28.useMemo(
29698
+ () => options.find((o) => o.value === value)?.label ?? "",
29699
+ [options, value]
29700
+ );
29701
+ const [query, setQuery] = React28.useState(selectedLabel);
29702
+ const [open, setOpen] = React28.useState(false);
29703
+ const display = open ? query : selectedLabel;
29704
+ const filtered = options.filter(
29705
+ (o) => o.label.toLowerCase().includes(query.trim().toLowerCase())
29706
+ );
29707
+ const pick = (o) => {
29708
+ onChange?.(o.value);
29709
+ setQuery(o.label);
29710
+ setOpen(false);
29711
+ };
29712
+ return /* @__PURE__ */ jsxRuntime.jsx(FieldWrapper, { label, required, hint, destructive: error, className, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
29713
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx_default(boxClasses(error), "px-lg py-md", disabled && "cursor-not-allowed bg-bg-secondary opacity-60"), children: [
29714
+ /* @__PURE__ */ jsxRuntime.jsx(
29715
+ "input",
29716
+ {
29717
+ value: display,
29718
+ disabled,
29719
+ placeholder,
29720
+ onFocus: () => setOpen(true),
29721
+ onBlur: () => setTimeout(() => setOpen(false), 120),
29722
+ onChange: (e) => {
29723
+ setQuery(e.target.value);
29724
+ setOpen(true);
29725
+ onInputChange?.(e.target.value);
29726
+ },
29727
+ className: "min-w-0 flex-1 bg-transparent text-md text-text-primary outline-none placeholder:text-text-placeholder"
29728
+ }
29729
+ ),
29730
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx_default("text-fg-quaternary transition-transform", open && "rotate-180"), children: /* @__PURE__ */ jsxRuntime.jsx(IconBox, { size: 16, children: /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.ChevronDown, {}) }) })
29731
+ ] }),
29732
+ open && !disabled && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0 right-0 top-full z-50 mt-xs flex max-h-[320px] flex-col gap-px overflow-auto rounded-md border border-border-secondary-alt bg-bg-primary p-xs shadow-lg", children: filtered.length ? filtered.map((o) => /* @__PURE__ */ jsxRuntime.jsx(
29733
+ SelectMenuItem,
29734
+ {
29735
+ label: o.label,
29736
+ supportingText: o.supportingText,
29737
+ selected: o.value === value,
29738
+ onMouseDown: (e) => e.preventDefault(),
29739
+ onClick: () => pick(o)
29740
+ },
29741
+ o.value
29742
+ )) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-md py-lg text-center text-sm text-text-tertiary", children: "No results" }) })
29743
+ ] }) });
29744
+ }
29595
29745
  var isTextType = (t) => t === "heading" || t === "text";
29596
29746
  function ContentDivider({
29597
29747
  type = "heading",
@@ -30770,7 +30920,7 @@ function FilterLines2() {
30770
30920
  }
30771
30921
  ) });
30772
30922
  }
30773
- function ChevronDown() {
30923
+ function ChevronDown2() {
30774
30924
  return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", fill: "none", className: "size-4", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m4 6 4 4 4-4", stroke: "currentColor", strokeWidth: "1.333", strokeLinecap: "round", strokeLinejoin: "round" }) });
30775
30925
  }
30776
30926
  function FiltersDropdownMenu({
@@ -30804,7 +30954,7 @@ function FiltersDropdownMenu({
30804
30954
  /* @__PURE__ */ jsxRuntime.jsx(FilterLines2, {}),
30805
30955
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: label }),
30806
30956
  active ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full bg-bg-brand-solid px-1.5 text-xs font-medium text-text-white", children: count }) : null,
30807
- chevron ? /* @__PURE__ */ jsxRuntime.jsx(ChevronDown, {}) : null
30957
+ chevron ? /* @__PURE__ */ jsxRuntime.jsx(ChevronDown2, {}) : null
30808
30958
  ]
30809
30959
  }
30810
30960
  ),
@@ -31020,44 +31170,6 @@ function HelpIcon2({
31020
31170
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute bottom-[calc(100%+8px)] left-1/2 -translate-x-1/2 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100", children: /* @__PURE__ */ jsxRuntime.jsx(Tooltip2, { text, supportingText, arrow }) })
31021
31171
  ] });
31022
31172
  }
31023
- var inputSizeClasses = {
31024
- sm: "px-lg py-md text-sm",
31025
- md: "px-lg py-md text-md",
31026
- lg: "px-[14px] py-2.5 text-md"
31027
- };
31028
- function boxClasses(destructive) {
31029
- return clsx_default(
31030
- "flex w-full items-center gap-md rounded-md border bg-bg-primary shadow-xs",
31031
- "transition-shadow focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-offset-bg-primary",
31032
- destructive ? "border-border-error focus-within:ring-border-error" : "border-border-primary focus-within:border-border-brand focus-within:ring-border-brand"
31033
- );
31034
- }
31035
- function FieldWrapper({
31036
- label,
31037
- required,
31038
- hint,
31039
- destructive,
31040
- children,
31041
- className
31042
- }) {
31043
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx_default("flex w-full flex-col gap-sm font-body", className), children: [
31044
- label ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex gap-xxs text-sm font-medium text-text-secondary", children: [
31045
- label,
31046
- required ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-text-brand-tertiary", children: "*" }) : null
31047
- ] }) : null,
31048
- children,
31049
- hint ? /* @__PURE__ */ jsxRuntime.jsx(
31050
- "span",
31051
- {
31052
- className: clsx_default(
31053
- "text-sm font-normal",
31054
- destructive ? "text-text-error-primary" : "text-text-tertiary"
31055
- ),
31056
- children: hint
31057
- }
31058
- ) : null
31059
- ] });
31060
- }
31061
31173
  function CalendarIcon() {
31062
31174
  return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5 text-fg-quaternary", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17.5 8.333H2.5M13.333 1.667V5M6.667 1.667V5M6.5 18.333h7c1.4 0 2.1 0 2.635-.272a2.5 2.5 0 0 0 1.093-1.093C17.5 16.433 17.5 15.733 17.5 14.333v-7c0-1.4 0-2.1-.272-2.635a2.5 2.5 0 0 0-1.093-1.093C15.6 3.333 14.9 3.333 13.5 3.333h-7c-1.4 0-2.1 0-2.635.272A2.5 2.5 0 0 0 2.772 4.698C2.5 5.233 2.5 5.933 2.5 7.333v7c0 1.4 0 2.1.272 2.635a2.5 2.5 0 0 0 1.093 1.093c.535.272 1.235.272 2.635.272Z", stroke: "currentColor", strokeWidth: "1.667", strokeLinecap: "round", strokeLinejoin: "round" }) });
31063
31175
  }
@@ -31986,57 +32098,6 @@ function ModalActions({
31986
32098
  )
31987
32099
  ] });
31988
32100
  }
31989
- function CheckboxBox({ selected, big }) {
31990
- return /* @__PURE__ */ jsxRuntime.jsx(
31991
- "span",
31992
- {
31993
- className: clsx_default(
31994
- "flex shrink-0 items-center justify-center rounded-xs border",
31995
- big ? "size-5" : "size-4",
31996
- selected ? "border-transparent bg-bg-brand-solid" : "border-border-primary bg-bg-primary"
31997
- ),
31998
- children: selected && /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", fill: "none", className: "size-3 text-fg-white", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M13.33 4 6 11.33 2.67 8", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round", strokeLinejoin: "round" }) })
31999
- }
32000
- );
32001
- }
32002
- function SelectMenuItem({
32003
- label,
32004
- supportingText,
32005
- selected = false,
32006
- size = "sm",
32007
- leading,
32008
- multi = false,
32009
- disabled,
32010
- className,
32011
- ...rest
32012
- }) {
32013
- const big = size !== "sm";
32014
- return /* @__PURE__ */ jsxRuntime.jsxs(
32015
- "button",
32016
- {
32017
- type: "button",
32018
- role: "option",
32019
- "aria-selected": selected,
32020
- disabled,
32021
- className: clsx_default(
32022
- "flex w-full items-center gap-md rounded-sm text-left transition-colors",
32023
- size === "lg" ? "py-2.5 pl-md pr-2.5" : "p-md",
32024
- disabled ? "opacity-50" : "hover:bg-bg-primary-hover",
32025
- className
32026
- ),
32027
- ...rest,
32028
- children: [
32029
- multi && /* @__PURE__ */ jsxRuntime.jsx(CheckboxBox, { selected, big }),
32030
- !multi && leading && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: leading }),
32031
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: clsx_default("flex min-w-0 flex-1 items-center gap-sm", big ? "text-md" : "text-sm"), children: [
32032
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-medium text-text-primary", children: label }),
32033
- supportingText && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-normal text-text-tertiary", children: supportingText })
32034
- ] }),
32035
- !multi && selected && /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5 shrink-0 text-fg-brand-primary", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16.67 5 7.5 14.17 3.33 10", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round", strokeLinejoin: "round" }) })
32036
- ]
32037
- }
32038
- );
32039
- }
32040
32101
  function Tag({
32041
32102
  size = "md",
32042
32103
  children,
@@ -32976,6 +33037,7 @@ function TagChip({ label, onRemove }) {
32976
33037
  function TagsInputField({
32977
33038
  tags = [],
32978
33039
  onRemoveTag,
33040
+ onAddTag,
32979
33041
  variant = "inner",
32980
33042
  size = "md",
32981
33043
  label,
@@ -32986,6 +33048,21 @@ function TagsInputField({
32986
33048
  placeholder = "Add tag",
32987
33049
  ...rest
32988
33050
  }) {
33051
+ const [draft, setDraft] = React28.useState("");
33052
+ const commit = (raw) => {
33053
+ const next = raw.trim();
33054
+ if (!next || tags.includes(next)) return;
33055
+ onAddTag?.(next);
33056
+ };
33057
+ const handleKeyDown = (e) => {
33058
+ if (e.key === "Enter" || e.key === ",") {
33059
+ e.preventDefault();
33060
+ commit(draft);
33061
+ setDraft("");
33062
+ } else if (e.key === "Backspace" && draft === "" && tags.length) {
33063
+ onRemoveTag?.(tags.length - 1);
33064
+ }
33065
+ };
32989
33066
  const chips = tags.map((t, i) => /* @__PURE__ */ jsxRuntime.jsx(TagChip, { label: t, onRemove: onRemoveTag ? () => onRemoveTag(i) : void 0 }, i));
32990
33067
  const box = (inner) => /* @__PURE__ */ jsxRuntime.jsxs(
32991
33068
  "div",
@@ -33002,7 +33079,12 @@ function TagsInputField({
33002
33079
  {
33003
33080
  placeholder,
33004
33081
  className: "min-w-[80px] flex-1 bg-transparent text-md text-text-primary outline-none placeholder:text-text-placeholder",
33005
- ...rest
33082
+ ...rest,
33083
+ ...onAddTag ? {
33084
+ value: draft,
33085
+ onChange: (e) => setDraft(e.target.value),
33086
+ onKeyDown: handleKeyDown
33087
+ } : {}
33006
33088
  }
33007
33089
  )
33008
33090
  ]
@@ -34447,6 +34529,7 @@ exports.Checkbox = Checkbox;
34447
34529
  exports.CodeSnippet = CodeSnippet;
34448
34530
  exports.CodeSnippetTabs = CodeSnippetTabs;
34449
34531
  exports.ColorBadge = ColorBadge;
34532
+ exports.ComboBox = ComboBox;
34450
34533
  exports.CommandBar = CommandBar;
34451
34534
  exports.CommandBarFooter = CommandBarFooter;
34452
34535
  exports.CommandBarMenuSection = CommandBarMenuSection;
package/dist/index.d.cts CHANGED
@@ -814,6 +814,36 @@ interface CommandShortcutProps {
814
814
  */
815
815
  declare function CommandShortcut({ keys, className }: CommandShortcutProps): react.JSX.Element;
816
816
 
817
+ interface ComboBoxOption {
818
+ value: string;
819
+ label: string;
820
+ supportingText?: ReactNode;
821
+ }
822
+ interface ComboBoxProps {
823
+ options: ComboBoxOption[];
824
+ /** Selected option value (controlled). */
825
+ value?: string;
826
+ onChange?: (value: string) => void;
827
+ /** Fires on every keystroke in the input — wire for async/remote filtering. */
828
+ onInputChange?: (input: string) => void;
829
+ placeholder?: string;
830
+ disabled?: boolean;
831
+ /** Error styling on the input shell + hint. */
832
+ error?: boolean;
833
+ label?: ReactNode;
834
+ hint?: ReactNode;
835
+ required?: boolean;
836
+ className?: string;
837
+ }
838
+ /**
839
+ * Text input with an autocomplete dropdown. Typing filters `options` by label
840
+ * (case-insensitive, substring); picking a row commits its `value` via
841
+ * `onChange` and fills the input with that label. A non-matching query shows a
842
+ * "No results" row. Controlled selection via `value`/`onChange`; raw keystrokes
843
+ * surface through `onInputChange` for remote filtering.
844
+ */
845
+ declare function ComboBox({ options, value, onChange, onInputChange, placeholder, disabled, error, label, hint, required, className, }: ComboBoxProps): react.JSX.Element;
846
+
817
847
  type ContentDividerType = "heading" | "text" | "button" | "button-icon" | "button-group" | "button-group-icon";
818
848
  type ContentDividerStyle = "single-line" | "dual-line" | "background-fill";
819
849
  interface ContentDividerProps {
@@ -2205,6 +2235,14 @@ interface TagsInputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>
2205
2235
  tags?: string[];
2206
2236
  /** Remove handler (receives the tag index). Renders a close button per chip. */
2207
2237
  onRemoveTag?: (index: number) => void;
2238
+ /**
2239
+ * Add handler. When supplied, the inner input becomes interactive: Enter or
2240
+ * comma commits the trimmed input text as a new tag; Backspace on an empty
2241
+ * input removes the last chip (via `onRemoveTag`). Empty/duplicate adds are
2242
+ * ignored. Without it the field stays display-only (chips controlled by
2243
+ * `tags`/`onRemoveTag`).
2244
+ */
2245
+ onAddTag?: (tag: string) => void;
2208
2246
  /** `inner` keeps chips inside the field; `outer` shows them below it. */
2209
2247
  variant?: TagsInputVariant;
2210
2248
  size?: InputFieldSize;
@@ -2218,7 +2256,7 @@ interface TagsInputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>
2218
2256
  * text input); `outer` renders the field on top with the chips below it.
2219
2257
  * Tag state is controlled by the consumer (`tags` + `onRemoveTag`).
2220
2258
  */
2221
- declare function TagsInputField({ tags, onRemoveTag, variant, size, label, hint, required, destructive, className, placeholder, ...rest }: TagsInputFieldProps): react.JSX.Element;
2259
+ declare function TagsInputField({ tags, onRemoveTag, onAddTag, variant, size, label, hint, required, destructive, className, placeholder, ...rest }: TagsInputFieldProps): react.JSX.Element;
2222
2260
 
2223
2261
  interface TrailingInputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
2224
2262
  /**
@@ -2937,4 +2975,4 @@ declare namespace index {
2937
2975
  export { index_BoxIllustration as BoxIllustration, index_CloudIllustration as CloudIllustration, index_CreditCardIllustration as CreditCardIllustration, index_DocumentsIllustration as DocumentsIllustration };
2938
2976
  }
2939
2977
 
2940
- export { ActivityFeed, type ActivityFeedDivider, type ActivityFeedProps, ActivityGauge, type ActivityGaugeLegend, type ActivityGaugeProps, type ActivityGaugeSeries, type ActivityGaugeSize, AdvancedFilterBar, type AdvancedFilterBarProps, Alert, type AlertAction, type AlertColor, type AlertProps, type AlertSize, Avatar, AvatarAddButton, type AvatarAddButtonProps, type AvatarAddButtonSize, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarGroupSize, AvatarLabelGroup, type AvatarLabelGroupProps, type AvatarLabelGroupSize, AvatarProfilePhoto, type AvatarProfilePhotoProps, type AvatarProfilePhotoSize, type AvatarProps, type AvatarSize, BadgeCloseX, type BadgeCloseXProps, type BadgeCloseXShape, type BadgeColor, type BadgeCommonProps, BadgeGroup, type BadgeGroupBadgePosition, type BadgeGroupProps, type BadgeGroupSize, type BadgeGroupType, type BadgeSize, BreadcrumbButtonBase, type BreadcrumbButtonBaseProps, type BreadcrumbButtonType, Breadcrumbs, type BreadcrumbsDivider, type BreadcrumbsProps, Button, ButtonCloseX, type ButtonCloseXProps, type ButtonCloseXSize, ButtonDestructive, type ButtonDestructiveHierarchy, type ButtonDestructiveProps, type ButtonDestructiveSize, ButtonGroup, type ButtonGroupProps, ButtonGroupSegment, type ButtonGroupSegmentProps, type ButtonGroupSegmentSize, type ButtonProps, ButtonUtility, type ButtonUtilityProps, type ButtonUtilitySize, type ButtonUtilityVariant, Calendar, type CalendarBreakpoint, CalendarCell, type CalendarCellBreakpoint, CalendarCellDayWeekView, type CalendarCellDayWeekViewProps, type CalendarCellEvent, type CalendarCellProps, CalendarColumnHeader, type CalendarColumnHeaderOrientation, type CalendarColumnHeaderProps, type CalendarColumnHeaderType, CalendarDateIcon, type CalendarDateIconProps, CalendarEvent, type CalendarEventBreakpoint, type CalendarEventColor, type CalendarEventData, CalendarEventDayWeekView, type CalendarEventDayWeekViewProps, type CalendarEventProps, type CalendarEventState, CalendarHeader, type CalendarHeaderProps, type CalendarProps, CalendarRowLabel, type CalendarRowLabelProps, CalendarTimemarker, type CalendarTimemarkerAlign, type CalendarTimemarkerBreakpoint, type CalendarTimemarkerProps, type CalendarTimeslotState, type CalendarTimeslotType, type CalendarView, CalendarViewDropdown, type CalendarViewDropdownProps, type CalendarViewOption, CardHeader, type CardHeaderProps, CarouselArrow, type CarouselArrowDirection, type CarouselArrowProps, type CarouselArrowSize, CarouselImage, type CarouselImageProps, Change, type ChangeProps, type ChangeTrend, type ChangeType, ChartLegend, type ChartLegendItem, type ChartLegendPosition, type ChartLegendProps, ChartMarker, type ChartMarkerLine, type ChartMarkerProps, ChartMini, type ChartMiniDatum, type ChartMiniProps, type ChartMiniTrend, type ChartSeries, type ChartStyle, ChartTooltip, type ChartTooltipPayloadItem, type ChartTooltipProps, type CheckControlSize, Checkbox, type CheckboxProps, CodeSnippet, type CodeSnippetProps, CodeSnippetTabs, type CodeSnippetTabsProps, ColorBadge, type ColorBadgeProps, CommandBar, CommandBarFooter, type CommandBarFooterHint, type CommandBarFooterProps, CommandBarMenuSection, type CommandBarMenuSectionProps, CommandBarNavigationIcon, type CommandBarNavigationIconProps, type CommandBarProps, CommandDropdownMenuItem, type CommandDropdownMenuItemProps, CommandInput, type CommandInputProps, CommandShortcut, type CommandShortcutProps, ContentDivider, type ContentDividerProps, type ContentDividerStyle, type ContentDividerType, ContentFeatureText, type ContentFeatureTextProps, type ContentFeatureTextSize, ContentHeading, type ContentHeadingProps, type ContentHeadingSize, ContentParagraph, type ContentParagraphProps, type ContentParagraphSize, ContentQuote, type ContentQuoteAlign, type ContentQuoteProps, type ContentQuoteSize, ContentRule, type ContentRuleProps, type ContentRuleSize, ContextMenu, type ContextMenuProps, type ContextMenuState, DatePickerCell, type DatePickerCellProps, type DatePickerCellType, DatePickerListItem, type DatePickerListItemProps, DatePickerMenu, type DatePickerMenuProps, DropdownAccountListItem, type DropdownAccountListItemProps, DropdownMenuFooter, type DropdownMenuFooterProps, type DropdownMenuFooterType, DropdownMenuHeader, type DropdownMenuHeaderProps, type DropdownMenuHeaderType, DropdownMenuItemInsetIcon, type DropdownMenuItemInsetIconProps, type DropdownMenuItemInsetIconType, DropdownMenuListItem, type DropdownMenuListItemProps, EmptyState, type EmptyStateProps, type EmptyStateSize, FeaturedIcon, type FeaturedIconColor, type FeaturedIconProps, type FeaturedIconSize, type FeaturedIconTheme, FeedItemBase, type FeedItemBaseProps, type FeedItemSize, FileUpload, FileUploadBase, type FileUploadBaseProps, FileUploadItemBase, type FileUploadItemBaseProps, type FileUploadItemIconType, type FileUploadItemStatus, type FileUploadItemType, type FileUploadProps, FilterBar, type FilterBarProps, FilterTabs, type FilterTabsProps, FiltersDropdownMenu, type FiltersDropdownMenuProps, FiltersSlideoutMenu, type FiltersSlideoutMenuProps, type HeaderNavItem, HeaderNavigation, type HeaderNavigationProps, type HeaderNavigationType, HelpIcon, type HelpIconProps, InputField, type InputFieldProps, type InputFieldSize, type InputFieldType, LeadingInputField, type LeadingInputFieldProps, LineAndBarChart, type LineAndBarChartProps, LinkMessage, type LinkMessageProps, type LinkMessageType, LoadingIndicator, type LoadingIndicatorProps, type LoadingIndicatorSize, type LoadingIndicatorStyle, MediaMessage, type MediaMessageProps, type MediaMessageType, MegaInputFieldBase, type MegaInputFieldBaseProps, type MegaInputFieldBaseSize, Message, MessageAction, MessageActionButton, type MessageActionButtonProps, MessageActionPanel, type MessageActionPanelProps, type MessageActionProps, type MessageActionType, type MessageBubbleTone, type MessageProps, MessageReaction, type MessageReactionProps, type MessageStatus, MessageStatusIcon, type MessageStatusIconProps, type MessageType, MetricItem, type MetricItemProps, Modal, ModalActions, type ModalActionsProps, type ModalActionsType, ModalHeader, type ModalHeaderProps, type ModalHeaderType, type ModalProps, type ModalSize, ModernBadge, type ModernBadgeProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavAccountCard, type NavAccountCardBreakpoint, NavAccountCardMenuItem, type NavAccountCardMenuItemProps, type NavAccountCardMenuItemType, type NavAccountCardProps, type NavAccountCardVariant, NavButton, type NavButtonProps, NavFeaturedCard, type NavFeaturedCardProps, NavItemBase, type NavItemBaseProps, NavItemDropdownBase, type NavItemDropdownBaseProps, NavMenuButton, type NavMenuButtonProps, Notification, type NotificationProps, type NotificationVariant, NumberInput, type NumberInputLayout, type NumberInputProps, PageHeader, type PageHeaderProps, type PageHeaderStyle, Pagination, PaginationButtonGroupBase, type PaginationButtonGroupBaseProps, type PaginationButtonGroupType, PaginationCards, type PaginationCardsProps, type PaginationCardsVariant, PaginationDotGroup, type PaginationDotGroupProps, PaginationDotIndicator, type PaginationDotIndicatorProps, type PaginationDotSize, type PaginationDotVariant, PaginationNumberBase, type PaginationNumberBaseProps, type PaginationNumberShape, type PaginationProps, type PaginationType, PieChart, type PieChartProps, type PieChartSize, type PieSlice, PillBadge, type PillBadgeProps, ProgressBar, type ProgressBarLabel, type ProgressBarProps, ProgressCircle, type ProgressCircleProps, type ProgressCircleShape, type ProgressCircleSize, RadarChart, type RadarChartProps, type RadarLegendPosition, Radio, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupItemSize, type RadioGroupItemType, type RadioGroupProps, type RadioProps, SectionFooter, type SectionFooterProps, type SectionFooterType, SectionHeader, type SectionHeaderProps, SectionLabel, type SectionLabelProps, type SectionLabelSize, Select, SelectMenuItem, type SelectMenuItemProps, type SelectMenuItemSize, type SelectProps, type SelectSize, type SelectType, SidebarNavigation, type SidebarNavigationProps, type SidebarNavigationType, SlideOutMenuHeader, type SlideOutMenuHeaderProps, SlideoutMenu, type SlideoutMenuProps, type SlideoutMenuSide, type SlideoutMenuSize, Slider, type SliderLabel, type SliderProps, type SocialBrand, SocialButton, type SocialButtonProps, type SocialButtonSize, type SocialButtonTheme, StatusIcon, type StatusIconProps, type StatusIconType, StepBase, type StepBaseProps, StepIconBase, type StepIconBaseProps, type StepIconSize, type StepIconType, type StepOrientation, type StepStatus, TabButtonBase, type TabButtonBaseProps, type TabButtonSize, type TabButtonType, type TabItem, TableCell, type TableCellProps, type TableCellSize, TableHeaderCell, type TableHeaderCellProps, type TableHeaderCellSize, TableHeaderLabel, type TableHeaderLabelArrow, type TableHeaderLabelProps, Tabs, type TabsOrientation, type TabsProps, Tag, type TagProps, type TagSize, TagsInputField, type TagsInputFieldProps, type TagsInputVariant, TextEditor, type TextEditorProps, TextEditorToolbar, TextEditorToolbarDivider, type TextEditorToolbarProps, TextEditorTooltip, type TextEditorTooltipProps, TextareaInputField, type TextareaInputFieldProps, Toggle, type ToggleProps, type ToggleSize, type ToggleType, Tooltip, type TooltipArrow, type TooltipProps, TrailingInputField, type TrailingInputFieldProps, type TreeNode, TreeView, TreeViewConnector, type TreeViewConnectorProps, type TreeViewConnectorSize, type TreeViewConnectorType, TreeViewItem, type TreeViewItemProps, type TreeViewItemSize, type TreeViewProps, type UseContextMenuReturn, type UseTextEditorOptions, type VerificationCodeDigits, VerificationCodeInput, type VerificationCodeInputProps, type VerificationCodeSize, index as illustrations, useContextMenu, useTextEditor };
2978
+ export { ActivityFeed, type ActivityFeedDivider, type ActivityFeedProps, ActivityGauge, type ActivityGaugeLegend, type ActivityGaugeProps, type ActivityGaugeSeries, type ActivityGaugeSize, AdvancedFilterBar, type AdvancedFilterBarProps, Alert, type AlertAction, type AlertColor, type AlertProps, type AlertSize, Avatar, AvatarAddButton, type AvatarAddButtonProps, type AvatarAddButtonSize, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarGroupSize, AvatarLabelGroup, type AvatarLabelGroupProps, type AvatarLabelGroupSize, AvatarProfilePhoto, type AvatarProfilePhotoProps, type AvatarProfilePhotoSize, type AvatarProps, type AvatarSize, BadgeCloseX, type BadgeCloseXProps, type BadgeCloseXShape, type BadgeColor, type BadgeCommonProps, BadgeGroup, type BadgeGroupBadgePosition, type BadgeGroupProps, type BadgeGroupSize, type BadgeGroupType, type BadgeSize, BreadcrumbButtonBase, type BreadcrumbButtonBaseProps, type BreadcrumbButtonType, Breadcrumbs, type BreadcrumbsDivider, type BreadcrumbsProps, Button, ButtonCloseX, type ButtonCloseXProps, type ButtonCloseXSize, ButtonDestructive, type ButtonDestructiveHierarchy, type ButtonDestructiveProps, type ButtonDestructiveSize, ButtonGroup, type ButtonGroupProps, ButtonGroupSegment, type ButtonGroupSegmentProps, type ButtonGroupSegmentSize, type ButtonProps, ButtonUtility, type ButtonUtilityProps, type ButtonUtilitySize, type ButtonUtilityVariant, Calendar, type CalendarBreakpoint, CalendarCell, type CalendarCellBreakpoint, CalendarCellDayWeekView, type CalendarCellDayWeekViewProps, type CalendarCellEvent, type CalendarCellProps, CalendarColumnHeader, type CalendarColumnHeaderOrientation, type CalendarColumnHeaderProps, type CalendarColumnHeaderType, CalendarDateIcon, type CalendarDateIconProps, CalendarEvent, type CalendarEventBreakpoint, type CalendarEventColor, type CalendarEventData, CalendarEventDayWeekView, type CalendarEventDayWeekViewProps, type CalendarEventProps, type CalendarEventState, CalendarHeader, type CalendarHeaderProps, type CalendarProps, CalendarRowLabel, type CalendarRowLabelProps, CalendarTimemarker, type CalendarTimemarkerAlign, type CalendarTimemarkerBreakpoint, type CalendarTimemarkerProps, type CalendarTimeslotState, type CalendarTimeslotType, type CalendarView, CalendarViewDropdown, type CalendarViewDropdownProps, type CalendarViewOption, CardHeader, type CardHeaderProps, CarouselArrow, type CarouselArrowDirection, type CarouselArrowProps, type CarouselArrowSize, CarouselImage, type CarouselImageProps, Change, type ChangeProps, type ChangeTrend, type ChangeType, ChartLegend, type ChartLegendItem, type ChartLegendPosition, type ChartLegendProps, ChartMarker, type ChartMarkerLine, type ChartMarkerProps, ChartMini, type ChartMiniDatum, type ChartMiniProps, type ChartMiniTrend, type ChartSeries, type ChartStyle, ChartTooltip, type ChartTooltipPayloadItem, type ChartTooltipProps, type CheckControlSize, Checkbox, type CheckboxProps, CodeSnippet, type CodeSnippetProps, CodeSnippetTabs, type CodeSnippetTabsProps, ColorBadge, type ColorBadgeProps, ComboBox, type ComboBoxOption, type ComboBoxProps, CommandBar, CommandBarFooter, type CommandBarFooterHint, type CommandBarFooterProps, CommandBarMenuSection, type CommandBarMenuSectionProps, CommandBarNavigationIcon, type CommandBarNavigationIconProps, type CommandBarProps, CommandDropdownMenuItem, type CommandDropdownMenuItemProps, CommandInput, type CommandInputProps, CommandShortcut, type CommandShortcutProps, ContentDivider, type ContentDividerProps, type ContentDividerStyle, type ContentDividerType, ContentFeatureText, type ContentFeatureTextProps, type ContentFeatureTextSize, ContentHeading, type ContentHeadingProps, type ContentHeadingSize, ContentParagraph, type ContentParagraphProps, type ContentParagraphSize, ContentQuote, type ContentQuoteAlign, type ContentQuoteProps, type ContentQuoteSize, ContentRule, type ContentRuleProps, type ContentRuleSize, ContextMenu, type ContextMenuProps, type ContextMenuState, DatePickerCell, type DatePickerCellProps, type DatePickerCellType, DatePickerListItem, type DatePickerListItemProps, DatePickerMenu, type DatePickerMenuProps, DropdownAccountListItem, type DropdownAccountListItemProps, DropdownMenuFooter, type DropdownMenuFooterProps, type DropdownMenuFooterType, DropdownMenuHeader, type DropdownMenuHeaderProps, type DropdownMenuHeaderType, DropdownMenuItemInsetIcon, type DropdownMenuItemInsetIconProps, type DropdownMenuItemInsetIconType, DropdownMenuListItem, type DropdownMenuListItemProps, EmptyState, type EmptyStateProps, type EmptyStateSize, FeaturedIcon, type FeaturedIconColor, type FeaturedIconProps, type FeaturedIconSize, type FeaturedIconTheme, FeedItemBase, type FeedItemBaseProps, type FeedItemSize, FileUpload, FileUploadBase, type FileUploadBaseProps, FileUploadItemBase, type FileUploadItemBaseProps, type FileUploadItemIconType, type FileUploadItemStatus, type FileUploadItemType, type FileUploadProps, FilterBar, type FilterBarProps, FilterTabs, type FilterTabsProps, FiltersDropdownMenu, type FiltersDropdownMenuProps, FiltersSlideoutMenu, type FiltersSlideoutMenuProps, type HeaderNavItem, HeaderNavigation, type HeaderNavigationProps, type HeaderNavigationType, HelpIcon, type HelpIconProps, InputField, type InputFieldProps, type InputFieldSize, type InputFieldType, LeadingInputField, type LeadingInputFieldProps, LineAndBarChart, type LineAndBarChartProps, LinkMessage, type LinkMessageProps, type LinkMessageType, LoadingIndicator, type LoadingIndicatorProps, type LoadingIndicatorSize, type LoadingIndicatorStyle, MediaMessage, type MediaMessageProps, type MediaMessageType, MegaInputFieldBase, type MegaInputFieldBaseProps, type MegaInputFieldBaseSize, Message, MessageAction, MessageActionButton, type MessageActionButtonProps, MessageActionPanel, type MessageActionPanelProps, type MessageActionProps, type MessageActionType, type MessageBubbleTone, type MessageProps, MessageReaction, type MessageReactionProps, type MessageStatus, MessageStatusIcon, type MessageStatusIconProps, type MessageType, MetricItem, type MetricItemProps, Modal, ModalActions, type ModalActionsProps, type ModalActionsType, ModalHeader, type ModalHeaderProps, type ModalHeaderType, type ModalProps, type ModalSize, ModernBadge, type ModernBadgeProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavAccountCard, type NavAccountCardBreakpoint, NavAccountCardMenuItem, type NavAccountCardMenuItemProps, type NavAccountCardMenuItemType, type NavAccountCardProps, type NavAccountCardVariant, NavButton, type NavButtonProps, NavFeaturedCard, type NavFeaturedCardProps, NavItemBase, type NavItemBaseProps, NavItemDropdownBase, type NavItemDropdownBaseProps, NavMenuButton, type NavMenuButtonProps, Notification, type NotificationProps, type NotificationVariant, NumberInput, type NumberInputLayout, type NumberInputProps, PageHeader, type PageHeaderProps, type PageHeaderStyle, Pagination, PaginationButtonGroupBase, type PaginationButtonGroupBaseProps, type PaginationButtonGroupType, PaginationCards, type PaginationCardsProps, type PaginationCardsVariant, PaginationDotGroup, type PaginationDotGroupProps, PaginationDotIndicator, type PaginationDotIndicatorProps, type PaginationDotSize, type PaginationDotVariant, PaginationNumberBase, type PaginationNumberBaseProps, type PaginationNumberShape, type PaginationProps, type PaginationType, PieChart, type PieChartProps, type PieChartSize, type PieSlice, PillBadge, type PillBadgeProps, ProgressBar, type ProgressBarLabel, type ProgressBarProps, ProgressCircle, type ProgressCircleProps, type ProgressCircleShape, type ProgressCircleSize, RadarChart, type RadarChartProps, type RadarLegendPosition, Radio, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupItemSize, type RadioGroupItemType, type RadioGroupProps, type RadioProps, SectionFooter, type SectionFooterProps, type SectionFooterType, SectionHeader, type SectionHeaderProps, SectionLabel, type SectionLabelProps, type SectionLabelSize, Select, SelectMenuItem, type SelectMenuItemProps, type SelectMenuItemSize, type SelectProps, type SelectSize, type SelectType, SidebarNavigation, type SidebarNavigationProps, type SidebarNavigationType, SlideOutMenuHeader, type SlideOutMenuHeaderProps, SlideoutMenu, type SlideoutMenuProps, type SlideoutMenuSide, type SlideoutMenuSize, Slider, type SliderLabel, type SliderProps, type SocialBrand, SocialButton, type SocialButtonProps, type SocialButtonSize, type SocialButtonTheme, StatusIcon, type StatusIconProps, type StatusIconType, StepBase, type StepBaseProps, StepIconBase, type StepIconBaseProps, type StepIconSize, type StepIconType, type StepOrientation, type StepStatus, TabButtonBase, type TabButtonBaseProps, type TabButtonSize, type TabButtonType, type TabItem, TableCell, type TableCellProps, type TableCellSize, TableHeaderCell, type TableHeaderCellProps, type TableHeaderCellSize, TableHeaderLabel, type TableHeaderLabelArrow, type TableHeaderLabelProps, Tabs, type TabsOrientation, type TabsProps, Tag, type TagProps, type TagSize, TagsInputField, type TagsInputFieldProps, type TagsInputVariant, TextEditor, type TextEditorProps, TextEditorToolbar, TextEditorToolbarDivider, type TextEditorToolbarProps, TextEditorTooltip, type TextEditorTooltipProps, TextareaInputField, type TextareaInputFieldProps, Toggle, type ToggleProps, type ToggleSize, type ToggleType, Tooltip, type TooltipArrow, type TooltipProps, TrailingInputField, type TrailingInputFieldProps, type TreeNode, TreeView, TreeViewConnector, type TreeViewConnectorProps, type TreeViewConnectorSize, type TreeViewConnectorType, TreeViewItem, type TreeViewItemProps, type TreeViewItemSize, type TreeViewProps, type UseContextMenuReturn, type UseTextEditorOptions, type VerificationCodeDigits, VerificationCodeInput, type VerificationCodeInputProps, type VerificationCodeSize, index as illustrations, useContextMenu, useTextEditor };
package/dist/index.d.ts CHANGED
@@ -814,6 +814,36 @@ interface CommandShortcutProps {
814
814
  */
815
815
  declare function CommandShortcut({ keys, className }: CommandShortcutProps): react.JSX.Element;
816
816
 
817
+ interface ComboBoxOption {
818
+ value: string;
819
+ label: string;
820
+ supportingText?: ReactNode;
821
+ }
822
+ interface ComboBoxProps {
823
+ options: ComboBoxOption[];
824
+ /** Selected option value (controlled). */
825
+ value?: string;
826
+ onChange?: (value: string) => void;
827
+ /** Fires on every keystroke in the input — wire for async/remote filtering. */
828
+ onInputChange?: (input: string) => void;
829
+ placeholder?: string;
830
+ disabled?: boolean;
831
+ /** Error styling on the input shell + hint. */
832
+ error?: boolean;
833
+ label?: ReactNode;
834
+ hint?: ReactNode;
835
+ required?: boolean;
836
+ className?: string;
837
+ }
838
+ /**
839
+ * Text input with an autocomplete dropdown. Typing filters `options` by label
840
+ * (case-insensitive, substring); picking a row commits its `value` via
841
+ * `onChange` and fills the input with that label. A non-matching query shows a
842
+ * "No results" row. Controlled selection via `value`/`onChange`; raw keystrokes
843
+ * surface through `onInputChange` for remote filtering.
844
+ */
845
+ declare function ComboBox({ options, value, onChange, onInputChange, placeholder, disabled, error, label, hint, required, className, }: ComboBoxProps): react.JSX.Element;
846
+
817
847
  type ContentDividerType = "heading" | "text" | "button" | "button-icon" | "button-group" | "button-group-icon";
818
848
  type ContentDividerStyle = "single-line" | "dual-line" | "background-fill";
819
849
  interface ContentDividerProps {
@@ -2205,6 +2235,14 @@ interface TagsInputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>
2205
2235
  tags?: string[];
2206
2236
  /** Remove handler (receives the tag index). Renders a close button per chip. */
2207
2237
  onRemoveTag?: (index: number) => void;
2238
+ /**
2239
+ * Add handler. When supplied, the inner input becomes interactive: Enter or
2240
+ * comma commits the trimmed input text as a new tag; Backspace on an empty
2241
+ * input removes the last chip (via `onRemoveTag`). Empty/duplicate adds are
2242
+ * ignored. Without it the field stays display-only (chips controlled by
2243
+ * `tags`/`onRemoveTag`).
2244
+ */
2245
+ onAddTag?: (tag: string) => void;
2208
2246
  /** `inner` keeps chips inside the field; `outer` shows them below it. */
2209
2247
  variant?: TagsInputVariant;
2210
2248
  size?: InputFieldSize;
@@ -2218,7 +2256,7 @@ interface TagsInputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>
2218
2256
  * text input); `outer` renders the field on top with the chips below it.
2219
2257
  * Tag state is controlled by the consumer (`tags` + `onRemoveTag`).
2220
2258
  */
2221
- declare function TagsInputField({ tags, onRemoveTag, variant, size, label, hint, required, destructive, className, placeholder, ...rest }: TagsInputFieldProps): react.JSX.Element;
2259
+ declare function TagsInputField({ tags, onRemoveTag, onAddTag, variant, size, label, hint, required, destructive, className, placeholder, ...rest }: TagsInputFieldProps): react.JSX.Element;
2222
2260
 
2223
2261
  interface TrailingInputFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
2224
2262
  /**
@@ -2937,4 +2975,4 @@ declare namespace index {
2937
2975
  export { index_BoxIllustration as BoxIllustration, index_CloudIllustration as CloudIllustration, index_CreditCardIllustration as CreditCardIllustration, index_DocumentsIllustration as DocumentsIllustration };
2938
2976
  }
2939
2977
 
2940
- export { ActivityFeed, type ActivityFeedDivider, type ActivityFeedProps, ActivityGauge, type ActivityGaugeLegend, type ActivityGaugeProps, type ActivityGaugeSeries, type ActivityGaugeSize, AdvancedFilterBar, type AdvancedFilterBarProps, Alert, type AlertAction, type AlertColor, type AlertProps, type AlertSize, Avatar, AvatarAddButton, type AvatarAddButtonProps, type AvatarAddButtonSize, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarGroupSize, AvatarLabelGroup, type AvatarLabelGroupProps, type AvatarLabelGroupSize, AvatarProfilePhoto, type AvatarProfilePhotoProps, type AvatarProfilePhotoSize, type AvatarProps, type AvatarSize, BadgeCloseX, type BadgeCloseXProps, type BadgeCloseXShape, type BadgeColor, type BadgeCommonProps, BadgeGroup, type BadgeGroupBadgePosition, type BadgeGroupProps, type BadgeGroupSize, type BadgeGroupType, type BadgeSize, BreadcrumbButtonBase, type BreadcrumbButtonBaseProps, type BreadcrumbButtonType, Breadcrumbs, type BreadcrumbsDivider, type BreadcrumbsProps, Button, ButtonCloseX, type ButtonCloseXProps, type ButtonCloseXSize, ButtonDestructive, type ButtonDestructiveHierarchy, type ButtonDestructiveProps, type ButtonDestructiveSize, ButtonGroup, type ButtonGroupProps, ButtonGroupSegment, type ButtonGroupSegmentProps, type ButtonGroupSegmentSize, type ButtonProps, ButtonUtility, type ButtonUtilityProps, type ButtonUtilitySize, type ButtonUtilityVariant, Calendar, type CalendarBreakpoint, CalendarCell, type CalendarCellBreakpoint, CalendarCellDayWeekView, type CalendarCellDayWeekViewProps, type CalendarCellEvent, type CalendarCellProps, CalendarColumnHeader, type CalendarColumnHeaderOrientation, type CalendarColumnHeaderProps, type CalendarColumnHeaderType, CalendarDateIcon, type CalendarDateIconProps, CalendarEvent, type CalendarEventBreakpoint, type CalendarEventColor, type CalendarEventData, CalendarEventDayWeekView, type CalendarEventDayWeekViewProps, type CalendarEventProps, type CalendarEventState, CalendarHeader, type CalendarHeaderProps, type CalendarProps, CalendarRowLabel, type CalendarRowLabelProps, CalendarTimemarker, type CalendarTimemarkerAlign, type CalendarTimemarkerBreakpoint, type CalendarTimemarkerProps, type CalendarTimeslotState, type CalendarTimeslotType, type CalendarView, CalendarViewDropdown, type CalendarViewDropdownProps, type CalendarViewOption, CardHeader, type CardHeaderProps, CarouselArrow, type CarouselArrowDirection, type CarouselArrowProps, type CarouselArrowSize, CarouselImage, type CarouselImageProps, Change, type ChangeProps, type ChangeTrend, type ChangeType, ChartLegend, type ChartLegendItem, type ChartLegendPosition, type ChartLegendProps, ChartMarker, type ChartMarkerLine, type ChartMarkerProps, ChartMini, type ChartMiniDatum, type ChartMiniProps, type ChartMiniTrend, type ChartSeries, type ChartStyle, ChartTooltip, type ChartTooltipPayloadItem, type ChartTooltipProps, type CheckControlSize, Checkbox, type CheckboxProps, CodeSnippet, type CodeSnippetProps, CodeSnippetTabs, type CodeSnippetTabsProps, ColorBadge, type ColorBadgeProps, CommandBar, CommandBarFooter, type CommandBarFooterHint, type CommandBarFooterProps, CommandBarMenuSection, type CommandBarMenuSectionProps, CommandBarNavigationIcon, type CommandBarNavigationIconProps, type CommandBarProps, CommandDropdownMenuItem, type CommandDropdownMenuItemProps, CommandInput, type CommandInputProps, CommandShortcut, type CommandShortcutProps, ContentDivider, type ContentDividerProps, type ContentDividerStyle, type ContentDividerType, ContentFeatureText, type ContentFeatureTextProps, type ContentFeatureTextSize, ContentHeading, type ContentHeadingProps, type ContentHeadingSize, ContentParagraph, type ContentParagraphProps, type ContentParagraphSize, ContentQuote, type ContentQuoteAlign, type ContentQuoteProps, type ContentQuoteSize, ContentRule, type ContentRuleProps, type ContentRuleSize, ContextMenu, type ContextMenuProps, type ContextMenuState, DatePickerCell, type DatePickerCellProps, type DatePickerCellType, DatePickerListItem, type DatePickerListItemProps, DatePickerMenu, type DatePickerMenuProps, DropdownAccountListItem, type DropdownAccountListItemProps, DropdownMenuFooter, type DropdownMenuFooterProps, type DropdownMenuFooterType, DropdownMenuHeader, type DropdownMenuHeaderProps, type DropdownMenuHeaderType, DropdownMenuItemInsetIcon, type DropdownMenuItemInsetIconProps, type DropdownMenuItemInsetIconType, DropdownMenuListItem, type DropdownMenuListItemProps, EmptyState, type EmptyStateProps, type EmptyStateSize, FeaturedIcon, type FeaturedIconColor, type FeaturedIconProps, type FeaturedIconSize, type FeaturedIconTheme, FeedItemBase, type FeedItemBaseProps, type FeedItemSize, FileUpload, FileUploadBase, type FileUploadBaseProps, FileUploadItemBase, type FileUploadItemBaseProps, type FileUploadItemIconType, type FileUploadItemStatus, type FileUploadItemType, type FileUploadProps, FilterBar, type FilterBarProps, FilterTabs, type FilterTabsProps, FiltersDropdownMenu, type FiltersDropdownMenuProps, FiltersSlideoutMenu, type FiltersSlideoutMenuProps, type HeaderNavItem, HeaderNavigation, type HeaderNavigationProps, type HeaderNavigationType, HelpIcon, type HelpIconProps, InputField, type InputFieldProps, type InputFieldSize, type InputFieldType, LeadingInputField, type LeadingInputFieldProps, LineAndBarChart, type LineAndBarChartProps, LinkMessage, type LinkMessageProps, type LinkMessageType, LoadingIndicator, type LoadingIndicatorProps, type LoadingIndicatorSize, type LoadingIndicatorStyle, MediaMessage, type MediaMessageProps, type MediaMessageType, MegaInputFieldBase, type MegaInputFieldBaseProps, type MegaInputFieldBaseSize, Message, MessageAction, MessageActionButton, type MessageActionButtonProps, MessageActionPanel, type MessageActionPanelProps, type MessageActionProps, type MessageActionType, type MessageBubbleTone, type MessageProps, MessageReaction, type MessageReactionProps, type MessageStatus, MessageStatusIcon, type MessageStatusIconProps, type MessageType, MetricItem, type MetricItemProps, Modal, ModalActions, type ModalActionsProps, type ModalActionsType, ModalHeader, type ModalHeaderProps, type ModalHeaderType, type ModalProps, type ModalSize, ModernBadge, type ModernBadgeProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavAccountCard, type NavAccountCardBreakpoint, NavAccountCardMenuItem, type NavAccountCardMenuItemProps, type NavAccountCardMenuItemType, type NavAccountCardProps, type NavAccountCardVariant, NavButton, type NavButtonProps, NavFeaturedCard, type NavFeaturedCardProps, NavItemBase, type NavItemBaseProps, NavItemDropdownBase, type NavItemDropdownBaseProps, NavMenuButton, type NavMenuButtonProps, Notification, type NotificationProps, type NotificationVariant, NumberInput, type NumberInputLayout, type NumberInputProps, PageHeader, type PageHeaderProps, type PageHeaderStyle, Pagination, PaginationButtonGroupBase, type PaginationButtonGroupBaseProps, type PaginationButtonGroupType, PaginationCards, type PaginationCardsProps, type PaginationCardsVariant, PaginationDotGroup, type PaginationDotGroupProps, PaginationDotIndicator, type PaginationDotIndicatorProps, type PaginationDotSize, type PaginationDotVariant, PaginationNumberBase, type PaginationNumberBaseProps, type PaginationNumberShape, type PaginationProps, type PaginationType, PieChart, type PieChartProps, type PieChartSize, type PieSlice, PillBadge, type PillBadgeProps, ProgressBar, type ProgressBarLabel, type ProgressBarProps, ProgressCircle, type ProgressCircleProps, type ProgressCircleShape, type ProgressCircleSize, RadarChart, type RadarChartProps, type RadarLegendPosition, Radio, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupItemSize, type RadioGroupItemType, type RadioGroupProps, type RadioProps, SectionFooter, type SectionFooterProps, type SectionFooterType, SectionHeader, type SectionHeaderProps, SectionLabel, type SectionLabelProps, type SectionLabelSize, Select, SelectMenuItem, type SelectMenuItemProps, type SelectMenuItemSize, type SelectProps, type SelectSize, type SelectType, SidebarNavigation, type SidebarNavigationProps, type SidebarNavigationType, SlideOutMenuHeader, type SlideOutMenuHeaderProps, SlideoutMenu, type SlideoutMenuProps, type SlideoutMenuSide, type SlideoutMenuSize, Slider, type SliderLabel, type SliderProps, type SocialBrand, SocialButton, type SocialButtonProps, type SocialButtonSize, type SocialButtonTheme, StatusIcon, type StatusIconProps, type StatusIconType, StepBase, type StepBaseProps, StepIconBase, type StepIconBaseProps, type StepIconSize, type StepIconType, type StepOrientation, type StepStatus, TabButtonBase, type TabButtonBaseProps, type TabButtonSize, type TabButtonType, type TabItem, TableCell, type TableCellProps, type TableCellSize, TableHeaderCell, type TableHeaderCellProps, type TableHeaderCellSize, TableHeaderLabel, type TableHeaderLabelArrow, type TableHeaderLabelProps, Tabs, type TabsOrientation, type TabsProps, Tag, type TagProps, type TagSize, TagsInputField, type TagsInputFieldProps, type TagsInputVariant, TextEditor, type TextEditorProps, TextEditorToolbar, TextEditorToolbarDivider, type TextEditorToolbarProps, TextEditorTooltip, type TextEditorTooltipProps, TextareaInputField, type TextareaInputFieldProps, Toggle, type ToggleProps, type ToggleSize, type ToggleType, Tooltip, type TooltipArrow, type TooltipProps, TrailingInputField, type TrailingInputFieldProps, type TreeNode, TreeView, TreeViewConnector, type TreeViewConnectorProps, type TreeViewConnectorSize, type TreeViewConnectorType, TreeViewItem, type TreeViewItemProps, type TreeViewItemSize, type TreeViewProps, type UseContextMenuReturn, type UseTextEditorOptions, type VerificationCodeDigits, VerificationCodeInput, type VerificationCodeInputProps, type VerificationCodeSize, index as illustrations, useContextMenu, useTextEditor };
2978
+ export { ActivityFeed, type ActivityFeedDivider, type ActivityFeedProps, ActivityGauge, type ActivityGaugeLegend, type ActivityGaugeProps, type ActivityGaugeSeries, type ActivityGaugeSize, AdvancedFilterBar, type AdvancedFilterBarProps, Alert, type AlertAction, type AlertColor, type AlertProps, type AlertSize, Avatar, AvatarAddButton, type AvatarAddButtonProps, type AvatarAddButtonSize, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarGroupSize, AvatarLabelGroup, type AvatarLabelGroupProps, type AvatarLabelGroupSize, AvatarProfilePhoto, type AvatarProfilePhotoProps, type AvatarProfilePhotoSize, type AvatarProps, type AvatarSize, BadgeCloseX, type BadgeCloseXProps, type BadgeCloseXShape, type BadgeColor, type BadgeCommonProps, BadgeGroup, type BadgeGroupBadgePosition, type BadgeGroupProps, type BadgeGroupSize, type BadgeGroupType, type BadgeSize, BreadcrumbButtonBase, type BreadcrumbButtonBaseProps, type BreadcrumbButtonType, Breadcrumbs, type BreadcrumbsDivider, type BreadcrumbsProps, Button, ButtonCloseX, type ButtonCloseXProps, type ButtonCloseXSize, ButtonDestructive, type ButtonDestructiveHierarchy, type ButtonDestructiveProps, type ButtonDestructiveSize, ButtonGroup, type ButtonGroupProps, ButtonGroupSegment, type ButtonGroupSegmentProps, type ButtonGroupSegmentSize, type ButtonProps, ButtonUtility, type ButtonUtilityProps, type ButtonUtilitySize, type ButtonUtilityVariant, Calendar, type CalendarBreakpoint, CalendarCell, type CalendarCellBreakpoint, CalendarCellDayWeekView, type CalendarCellDayWeekViewProps, type CalendarCellEvent, type CalendarCellProps, CalendarColumnHeader, type CalendarColumnHeaderOrientation, type CalendarColumnHeaderProps, type CalendarColumnHeaderType, CalendarDateIcon, type CalendarDateIconProps, CalendarEvent, type CalendarEventBreakpoint, type CalendarEventColor, type CalendarEventData, CalendarEventDayWeekView, type CalendarEventDayWeekViewProps, type CalendarEventProps, type CalendarEventState, CalendarHeader, type CalendarHeaderProps, type CalendarProps, CalendarRowLabel, type CalendarRowLabelProps, CalendarTimemarker, type CalendarTimemarkerAlign, type CalendarTimemarkerBreakpoint, type CalendarTimemarkerProps, type CalendarTimeslotState, type CalendarTimeslotType, type CalendarView, CalendarViewDropdown, type CalendarViewDropdownProps, type CalendarViewOption, CardHeader, type CardHeaderProps, CarouselArrow, type CarouselArrowDirection, type CarouselArrowProps, type CarouselArrowSize, CarouselImage, type CarouselImageProps, Change, type ChangeProps, type ChangeTrend, type ChangeType, ChartLegend, type ChartLegendItem, type ChartLegendPosition, type ChartLegendProps, ChartMarker, type ChartMarkerLine, type ChartMarkerProps, ChartMini, type ChartMiniDatum, type ChartMiniProps, type ChartMiniTrend, type ChartSeries, type ChartStyle, ChartTooltip, type ChartTooltipPayloadItem, type ChartTooltipProps, type CheckControlSize, Checkbox, type CheckboxProps, CodeSnippet, type CodeSnippetProps, CodeSnippetTabs, type CodeSnippetTabsProps, ColorBadge, type ColorBadgeProps, ComboBox, type ComboBoxOption, type ComboBoxProps, CommandBar, CommandBarFooter, type CommandBarFooterHint, type CommandBarFooterProps, CommandBarMenuSection, type CommandBarMenuSectionProps, CommandBarNavigationIcon, type CommandBarNavigationIconProps, type CommandBarProps, CommandDropdownMenuItem, type CommandDropdownMenuItemProps, CommandInput, type CommandInputProps, CommandShortcut, type CommandShortcutProps, ContentDivider, type ContentDividerProps, type ContentDividerStyle, type ContentDividerType, ContentFeatureText, type ContentFeatureTextProps, type ContentFeatureTextSize, ContentHeading, type ContentHeadingProps, type ContentHeadingSize, ContentParagraph, type ContentParagraphProps, type ContentParagraphSize, ContentQuote, type ContentQuoteAlign, type ContentQuoteProps, type ContentQuoteSize, ContentRule, type ContentRuleProps, type ContentRuleSize, ContextMenu, type ContextMenuProps, type ContextMenuState, DatePickerCell, type DatePickerCellProps, type DatePickerCellType, DatePickerListItem, type DatePickerListItemProps, DatePickerMenu, type DatePickerMenuProps, DropdownAccountListItem, type DropdownAccountListItemProps, DropdownMenuFooter, type DropdownMenuFooterProps, type DropdownMenuFooterType, DropdownMenuHeader, type DropdownMenuHeaderProps, type DropdownMenuHeaderType, DropdownMenuItemInsetIcon, type DropdownMenuItemInsetIconProps, type DropdownMenuItemInsetIconType, DropdownMenuListItem, type DropdownMenuListItemProps, EmptyState, type EmptyStateProps, type EmptyStateSize, FeaturedIcon, type FeaturedIconColor, type FeaturedIconProps, type FeaturedIconSize, type FeaturedIconTheme, FeedItemBase, type FeedItemBaseProps, type FeedItemSize, FileUpload, FileUploadBase, type FileUploadBaseProps, FileUploadItemBase, type FileUploadItemBaseProps, type FileUploadItemIconType, type FileUploadItemStatus, type FileUploadItemType, type FileUploadProps, FilterBar, type FilterBarProps, FilterTabs, type FilterTabsProps, FiltersDropdownMenu, type FiltersDropdownMenuProps, FiltersSlideoutMenu, type FiltersSlideoutMenuProps, type HeaderNavItem, HeaderNavigation, type HeaderNavigationProps, type HeaderNavigationType, HelpIcon, type HelpIconProps, InputField, type InputFieldProps, type InputFieldSize, type InputFieldType, LeadingInputField, type LeadingInputFieldProps, LineAndBarChart, type LineAndBarChartProps, LinkMessage, type LinkMessageProps, type LinkMessageType, LoadingIndicator, type LoadingIndicatorProps, type LoadingIndicatorSize, type LoadingIndicatorStyle, MediaMessage, type MediaMessageProps, type MediaMessageType, MegaInputFieldBase, type MegaInputFieldBaseProps, type MegaInputFieldBaseSize, Message, MessageAction, MessageActionButton, type MessageActionButtonProps, MessageActionPanel, type MessageActionPanelProps, type MessageActionProps, type MessageActionType, type MessageBubbleTone, type MessageProps, MessageReaction, type MessageReactionProps, type MessageStatus, MessageStatusIcon, type MessageStatusIconProps, type MessageType, MetricItem, type MetricItemProps, Modal, ModalActions, type ModalActionsProps, type ModalActionsType, ModalHeader, type ModalHeaderProps, type ModalHeaderType, type ModalProps, type ModalSize, ModernBadge, type ModernBadgeProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavAccountCard, type NavAccountCardBreakpoint, NavAccountCardMenuItem, type NavAccountCardMenuItemProps, type NavAccountCardMenuItemType, type NavAccountCardProps, type NavAccountCardVariant, NavButton, type NavButtonProps, NavFeaturedCard, type NavFeaturedCardProps, NavItemBase, type NavItemBaseProps, NavItemDropdownBase, type NavItemDropdownBaseProps, NavMenuButton, type NavMenuButtonProps, Notification, type NotificationProps, type NotificationVariant, NumberInput, type NumberInputLayout, type NumberInputProps, PageHeader, type PageHeaderProps, type PageHeaderStyle, Pagination, PaginationButtonGroupBase, type PaginationButtonGroupBaseProps, type PaginationButtonGroupType, PaginationCards, type PaginationCardsProps, type PaginationCardsVariant, PaginationDotGroup, type PaginationDotGroupProps, PaginationDotIndicator, type PaginationDotIndicatorProps, type PaginationDotSize, type PaginationDotVariant, PaginationNumberBase, type PaginationNumberBaseProps, type PaginationNumberShape, type PaginationProps, type PaginationType, PieChart, type PieChartProps, type PieChartSize, type PieSlice, PillBadge, type PillBadgeProps, ProgressBar, type ProgressBarLabel, type ProgressBarProps, ProgressCircle, type ProgressCircleProps, type ProgressCircleShape, type ProgressCircleSize, RadarChart, type RadarChartProps, type RadarLegendPosition, Radio, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupItemSize, type RadioGroupItemType, type RadioGroupProps, type RadioProps, SectionFooter, type SectionFooterProps, type SectionFooterType, SectionHeader, type SectionHeaderProps, SectionLabel, type SectionLabelProps, type SectionLabelSize, Select, SelectMenuItem, type SelectMenuItemProps, type SelectMenuItemSize, type SelectProps, type SelectSize, type SelectType, SidebarNavigation, type SidebarNavigationProps, type SidebarNavigationType, SlideOutMenuHeader, type SlideOutMenuHeaderProps, SlideoutMenu, type SlideoutMenuProps, type SlideoutMenuSide, type SlideoutMenuSize, Slider, type SliderLabel, type SliderProps, type SocialBrand, SocialButton, type SocialButtonProps, type SocialButtonSize, type SocialButtonTheme, StatusIcon, type StatusIconProps, type StatusIconType, StepBase, type StepBaseProps, StepIconBase, type StepIconBaseProps, type StepIconSize, type StepIconType, type StepOrientation, type StepStatus, TabButtonBase, type TabButtonBaseProps, type TabButtonSize, type TabButtonType, type TabItem, TableCell, type TableCellProps, type TableCellSize, TableHeaderCell, type TableHeaderCellProps, type TableHeaderCellSize, TableHeaderLabel, type TableHeaderLabelArrow, type TableHeaderLabelProps, Tabs, type TabsOrientation, type TabsProps, Tag, type TagProps, type TagSize, TagsInputField, type TagsInputFieldProps, type TagsInputVariant, TextEditor, type TextEditorProps, TextEditorToolbar, TextEditorToolbarDivider, type TextEditorToolbarProps, TextEditorTooltip, type TextEditorTooltipProps, TextareaInputField, type TextareaInputFieldProps, Toggle, type ToggleProps, type ToggleSize, type ToggleType, Tooltip, type TooltipArrow, type TooltipProps, TrailingInputField, type TrailingInputFieldProps, type TreeNode, TreeView, TreeViewConnector, type TreeViewConnectorProps, type TreeViewConnectorSize, type TreeViewConnectorType, TreeViewItem, type TreeViewItemProps, type TreeViewItemSize, type TreeViewProps, type UseContextMenuReturn, type UseTextEditorOptions, type VerificationCodeDigits, VerificationCodeInput, type VerificationCodeInputProps, type VerificationCodeSize, index as illustrations, useContextMenu, useTextEditor };
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
4
4
  import { dateFnsLocalizer, Calendar as Calendar$1 } from 'react-big-calendar';
5
5
  import { getDay, parse, format, startOfWeek, isSameDay } from 'date-fns';
6
6
  import { enUS } from 'date-fns/locale';
7
- import { Plus, LogOut01, ChevronSelectorVertical, ChevronDown as ChevronDown$1, XClose as XClose$1, Menu02, Bold01, AlignLeft, AlignCenter, AlignRight, Link01, ArrowLeft, ArrowRight } from '@borisj74/bv-ds-icons';
7
+ import { Plus, ChevronDown, LogOut01, ChevronSelectorVertical, XClose as XClose$1, Menu02, Bold01, AlignLeft, AlignCenter, AlignRight, Link01, ArrowLeft, ArrowRight } from '@borisj74/bv-ds-icons';
8
8
  import { useEditor, EditorContent } from '@tiptap/react';
9
9
  import { StarterKit } from '@tiptap/starter-kit';
10
10
  import { TextAlign } from '@tiptap/extension-text-align';
@@ -29571,6 +29571,156 @@ function CommandShortcut({ keys: keys2, className }) {
29571
29571
  i
29572
29572
  )) });
29573
29573
  }
29574
+ var inputSizeClasses = {
29575
+ sm: "px-lg py-md text-sm",
29576
+ md: "px-lg py-md text-md",
29577
+ lg: "px-[14px] py-2.5 text-md"
29578
+ };
29579
+ function boxClasses(destructive) {
29580
+ return clsx_default(
29581
+ "flex w-full items-center gap-md rounded-md border bg-bg-primary shadow-xs",
29582
+ "transition-shadow focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-offset-bg-primary",
29583
+ destructive ? "border-border-error focus-within:ring-border-error" : "border-border-primary focus-within:border-border-brand focus-within:ring-border-brand"
29584
+ );
29585
+ }
29586
+ function FieldWrapper({
29587
+ label,
29588
+ required,
29589
+ hint,
29590
+ destructive,
29591
+ children,
29592
+ className
29593
+ }) {
29594
+ return /* @__PURE__ */ jsxs("div", { className: clsx_default("flex w-full flex-col gap-sm font-body", className), children: [
29595
+ label ? /* @__PURE__ */ jsxs("span", { className: "flex gap-xxs text-sm font-medium text-text-secondary", children: [
29596
+ label,
29597
+ required ? /* @__PURE__ */ jsx("span", { className: "text-text-brand-tertiary", children: "*" }) : null
29598
+ ] }) : null,
29599
+ children,
29600
+ hint ? /* @__PURE__ */ jsx(
29601
+ "span",
29602
+ {
29603
+ className: clsx_default(
29604
+ "text-sm font-normal",
29605
+ destructive ? "text-text-error-primary" : "text-text-tertiary"
29606
+ ),
29607
+ children: hint
29608
+ }
29609
+ ) : null
29610
+ ] });
29611
+ }
29612
+ function CheckboxBox({ selected, big }) {
29613
+ return /* @__PURE__ */ jsx(
29614
+ "span",
29615
+ {
29616
+ className: clsx_default(
29617
+ "flex shrink-0 items-center justify-center rounded-xs border",
29618
+ big ? "size-5" : "size-4",
29619
+ selected ? "border-transparent bg-bg-brand-solid" : "border-border-primary bg-bg-primary"
29620
+ ),
29621
+ children: selected && /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", fill: "none", className: "size-3 text-fg-white", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M13.33 4 6 11.33 2.67 8", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round", strokeLinejoin: "round" }) })
29622
+ }
29623
+ );
29624
+ }
29625
+ function SelectMenuItem({
29626
+ label,
29627
+ supportingText,
29628
+ selected = false,
29629
+ size = "sm",
29630
+ leading,
29631
+ multi = false,
29632
+ disabled,
29633
+ className,
29634
+ ...rest
29635
+ }) {
29636
+ const big = size !== "sm";
29637
+ return /* @__PURE__ */ jsxs(
29638
+ "button",
29639
+ {
29640
+ type: "button",
29641
+ role: "option",
29642
+ "aria-selected": selected,
29643
+ disabled,
29644
+ className: clsx_default(
29645
+ "flex w-full items-center gap-md rounded-sm text-left transition-colors",
29646
+ size === "lg" ? "py-2.5 pl-md pr-2.5" : "p-md",
29647
+ disabled ? "opacity-50" : "hover:bg-bg-primary-hover",
29648
+ className
29649
+ ),
29650
+ ...rest,
29651
+ children: [
29652
+ multi && /* @__PURE__ */ jsx(CheckboxBox, { selected, big }),
29653
+ !multi && leading && /* @__PURE__ */ jsx("span", { className: "shrink-0", children: leading }),
29654
+ /* @__PURE__ */ jsxs("span", { className: clsx_default("flex min-w-0 flex-1 items-center gap-sm", big ? "text-md" : "text-sm"), children: [
29655
+ /* @__PURE__ */ jsx("span", { className: "truncate font-medium text-text-primary", children: label }),
29656
+ supportingText && /* @__PURE__ */ jsx("span", { className: "truncate font-normal text-text-tertiary", children: supportingText })
29657
+ ] }),
29658
+ !multi && selected && /* @__PURE__ */ jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5 shrink-0 text-fg-brand-primary", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M16.67 5 7.5 14.17 3.33 10", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round", strokeLinejoin: "round" }) })
29659
+ ]
29660
+ }
29661
+ );
29662
+ }
29663
+ function ComboBox({
29664
+ options,
29665
+ value,
29666
+ onChange,
29667
+ onInputChange,
29668
+ placeholder = "Search...",
29669
+ disabled = false,
29670
+ error = false,
29671
+ label,
29672
+ hint,
29673
+ required,
29674
+ className
29675
+ }) {
29676
+ const selectedLabel = useMemo(
29677
+ () => options.find((o) => o.value === value)?.label ?? "",
29678
+ [options, value]
29679
+ );
29680
+ const [query, setQuery] = useState(selectedLabel);
29681
+ const [open, setOpen] = useState(false);
29682
+ const display = open ? query : selectedLabel;
29683
+ const filtered = options.filter(
29684
+ (o) => o.label.toLowerCase().includes(query.trim().toLowerCase())
29685
+ );
29686
+ const pick = (o) => {
29687
+ onChange?.(o.value);
29688
+ setQuery(o.label);
29689
+ setOpen(false);
29690
+ };
29691
+ return /* @__PURE__ */ jsx(FieldWrapper, { label, required, hint, destructive: error, className, children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
29692
+ /* @__PURE__ */ jsxs("div", { className: clsx_default(boxClasses(error), "px-lg py-md", disabled && "cursor-not-allowed bg-bg-secondary opacity-60"), children: [
29693
+ /* @__PURE__ */ jsx(
29694
+ "input",
29695
+ {
29696
+ value: display,
29697
+ disabled,
29698
+ placeholder,
29699
+ onFocus: () => setOpen(true),
29700
+ onBlur: () => setTimeout(() => setOpen(false), 120),
29701
+ onChange: (e) => {
29702
+ setQuery(e.target.value);
29703
+ setOpen(true);
29704
+ onInputChange?.(e.target.value);
29705
+ },
29706
+ className: "min-w-0 flex-1 bg-transparent text-md text-text-primary outline-none placeholder:text-text-placeholder"
29707
+ }
29708
+ ),
29709
+ /* @__PURE__ */ jsx("span", { className: clsx_default("text-fg-quaternary transition-transform", open && "rotate-180"), children: /* @__PURE__ */ jsx(IconBox, { size: 16, children: /* @__PURE__ */ jsx(ChevronDown, {}) }) })
29710
+ ] }),
29711
+ open && !disabled && /* @__PURE__ */ jsx("div", { className: "absolute left-0 right-0 top-full z-50 mt-xs flex max-h-[320px] flex-col gap-px overflow-auto rounded-md border border-border-secondary-alt bg-bg-primary p-xs shadow-lg", children: filtered.length ? filtered.map((o) => /* @__PURE__ */ jsx(
29712
+ SelectMenuItem,
29713
+ {
29714
+ label: o.label,
29715
+ supportingText: o.supportingText,
29716
+ selected: o.value === value,
29717
+ onMouseDown: (e) => e.preventDefault(),
29718
+ onClick: () => pick(o)
29719
+ },
29720
+ o.value
29721
+ )) : /* @__PURE__ */ jsx("div", { className: "px-md py-lg text-center text-sm text-text-tertiary", children: "No results" }) })
29722
+ ] }) });
29723
+ }
29574
29724
  var isTextType = (t) => t === "heading" || t === "text";
29575
29725
  function ContentDivider({
29576
29726
  type = "heading",
@@ -30749,7 +30899,7 @@ function FilterLines2() {
30749
30899
  }
30750
30900
  ) });
30751
30901
  }
30752
- function ChevronDown() {
30902
+ function ChevronDown2() {
30753
30903
  return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", fill: "none", className: "size-4", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "m4 6 4 4 4-4", stroke: "currentColor", strokeWidth: "1.333", strokeLinecap: "round", strokeLinejoin: "round" }) });
30754
30904
  }
30755
30905
  function FiltersDropdownMenu({
@@ -30783,7 +30933,7 @@ function FiltersDropdownMenu({
30783
30933
  /* @__PURE__ */ jsx(FilterLines2, {}),
30784
30934
  /* @__PURE__ */ jsx("span", { children: label }),
30785
30935
  active ? /* @__PURE__ */ jsx("span", { className: "rounded-full bg-bg-brand-solid px-1.5 text-xs font-medium text-text-white", children: count }) : null,
30786
- chevron ? /* @__PURE__ */ jsx(ChevronDown, {}) : null
30936
+ chevron ? /* @__PURE__ */ jsx(ChevronDown2, {}) : null
30787
30937
  ]
30788
30938
  }
30789
30939
  ),
@@ -30999,44 +31149,6 @@ function HelpIcon2({
30999
31149
  /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute bottom-[calc(100%+8px)] left-1/2 -translate-x-1/2 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100", children: /* @__PURE__ */ jsx(Tooltip2, { text, supportingText, arrow }) })
31000
31150
  ] });
31001
31151
  }
31002
- var inputSizeClasses = {
31003
- sm: "px-lg py-md text-sm",
31004
- md: "px-lg py-md text-md",
31005
- lg: "px-[14px] py-2.5 text-md"
31006
- };
31007
- function boxClasses(destructive) {
31008
- return clsx_default(
31009
- "flex w-full items-center gap-md rounded-md border bg-bg-primary shadow-xs",
31010
- "transition-shadow focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-offset-bg-primary",
31011
- destructive ? "border-border-error focus-within:ring-border-error" : "border-border-primary focus-within:border-border-brand focus-within:ring-border-brand"
31012
- );
31013
- }
31014
- function FieldWrapper({
31015
- label,
31016
- required,
31017
- hint,
31018
- destructive,
31019
- children,
31020
- className
31021
- }) {
31022
- return /* @__PURE__ */ jsxs("div", { className: clsx_default("flex w-full flex-col gap-sm font-body", className), children: [
31023
- label ? /* @__PURE__ */ jsxs("span", { className: "flex gap-xxs text-sm font-medium text-text-secondary", children: [
31024
- label,
31025
- required ? /* @__PURE__ */ jsx("span", { className: "text-text-brand-tertiary", children: "*" }) : null
31026
- ] }) : null,
31027
- children,
31028
- hint ? /* @__PURE__ */ jsx(
31029
- "span",
31030
- {
31031
- className: clsx_default(
31032
- "text-sm font-normal",
31033
- destructive ? "text-text-error-primary" : "text-text-tertiary"
31034
- ),
31035
- children: hint
31036
- }
31037
- ) : null
31038
- ] });
31039
- }
31040
31152
  function CalendarIcon() {
31041
31153
  return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5 text-fg-quaternary", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M17.5 8.333H2.5M13.333 1.667V5M6.667 1.667V5M6.5 18.333h7c1.4 0 2.1 0 2.635-.272a2.5 2.5 0 0 0 1.093-1.093C17.5 16.433 17.5 15.733 17.5 14.333v-7c0-1.4 0-2.1-.272-2.635a2.5 2.5 0 0 0-1.093-1.093C15.6 3.333 14.9 3.333 13.5 3.333h-7c-1.4 0-2.1 0-2.635.272A2.5 2.5 0 0 0 2.772 4.698C2.5 5.233 2.5 5.933 2.5 7.333v7c0 1.4 0 2.1.272 2.635a2.5 2.5 0 0 0 1.093 1.093c.535.272 1.235.272 2.635.272Z", stroke: "currentColor", strokeWidth: "1.667", strokeLinecap: "round", strokeLinejoin: "round" }) });
31042
31154
  }
@@ -31965,57 +32077,6 @@ function ModalActions({
31965
32077
  )
31966
32078
  ] });
31967
32079
  }
31968
- function CheckboxBox({ selected, big }) {
31969
- return /* @__PURE__ */ jsx(
31970
- "span",
31971
- {
31972
- className: clsx_default(
31973
- "flex shrink-0 items-center justify-center rounded-xs border",
31974
- big ? "size-5" : "size-4",
31975
- selected ? "border-transparent bg-bg-brand-solid" : "border-border-primary bg-bg-primary"
31976
- ),
31977
- children: selected && /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", fill: "none", className: "size-3 text-fg-white", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M13.33 4 6 11.33 2.67 8", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round", strokeLinejoin: "round" }) })
31978
- }
31979
- );
31980
- }
31981
- function SelectMenuItem({
31982
- label,
31983
- supportingText,
31984
- selected = false,
31985
- size = "sm",
31986
- leading,
31987
- multi = false,
31988
- disabled,
31989
- className,
31990
- ...rest
31991
- }) {
31992
- const big = size !== "sm";
31993
- return /* @__PURE__ */ jsxs(
31994
- "button",
31995
- {
31996
- type: "button",
31997
- role: "option",
31998
- "aria-selected": selected,
31999
- disabled,
32000
- className: clsx_default(
32001
- "flex w-full items-center gap-md rounded-sm text-left transition-colors",
32002
- size === "lg" ? "py-2.5 pl-md pr-2.5" : "p-md",
32003
- disabled ? "opacity-50" : "hover:bg-bg-primary-hover",
32004
- className
32005
- ),
32006
- ...rest,
32007
- children: [
32008
- multi && /* @__PURE__ */ jsx(CheckboxBox, { selected, big }),
32009
- !multi && leading && /* @__PURE__ */ jsx("span", { className: "shrink-0", children: leading }),
32010
- /* @__PURE__ */ jsxs("span", { className: clsx_default("flex min-w-0 flex-1 items-center gap-sm", big ? "text-md" : "text-sm"), children: [
32011
- /* @__PURE__ */ jsx("span", { className: "truncate font-medium text-text-primary", children: label }),
32012
- supportingText && /* @__PURE__ */ jsx("span", { className: "truncate font-normal text-text-tertiary", children: supportingText })
32013
- ] }),
32014
- !multi && selected && /* @__PURE__ */ jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5 shrink-0 text-fg-brand-primary", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M16.67 5 7.5 14.17 3.33 10", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round", strokeLinejoin: "round" }) })
32015
- ]
32016
- }
32017
- );
32018
- }
32019
32080
  function Tag({
32020
32081
  size = "md",
32021
32082
  children,
@@ -32398,7 +32459,7 @@ function NavItemBase({
32398
32459
  /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-left text-sm font-semibold text-text-secondary", children: label })
32399
32460
  ] }),
32400
32461
  badge != null && /* @__PURE__ */ jsx("span", { className: "shrink-0 rounded-full border border-utility-neutral-200 bg-utility-neutral-50 px-md py-xxs text-xs font-medium text-utility-neutral-700", children: badge }),
32401
- trailingChevron && /* @__PURE__ */ jsx(IconBox, { size: 16, className: "text-fg-quaternary", children: /* @__PURE__ */ jsx(ChevronDown$1, {}) })
32462
+ trailingChevron && /* @__PURE__ */ jsx(IconBox, { size: 16, className: "text-fg-quaternary", children: /* @__PURE__ */ jsx(ChevronDown, {}) })
32402
32463
  ]
32403
32464
  }
32404
32465
  )
@@ -32436,7 +32497,7 @@ function NavItemDropdownBase({
32436
32497
  icon && /* @__PURE__ */ jsx(IconBox, { size: 20, className: "text-fg-quaternary", children: icon }),
32437
32498
  /* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-left text-sm font-semibold text-text-secondary", children: label })
32438
32499
  ] }),
32439
- /* @__PURE__ */ jsx(IconBox, { size: 16, className: "text-fg-quaternary", children: /* @__PURE__ */ jsx(ChevronDown$1, { className: clsx_default("transition-transform", open && "rotate-180") }) })
32500
+ /* @__PURE__ */ jsx(IconBox, { size: 16, className: "text-fg-quaternary", children: /* @__PURE__ */ jsx(ChevronDown, { className: clsx_default("transition-transform", open && "rotate-180") }) })
32440
32501
  ]
32441
32502
  }
32442
32503
  )
@@ -32955,6 +33016,7 @@ function TagChip({ label, onRemove }) {
32955
33016
  function TagsInputField({
32956
33017
  tags = [],
32957
33018
  onRemoveTag,
33019
+ onAddTag,
32958
33020
  variant = "inner",
32959
33021
  size = "md",
32960
33022
  label,
@@ -32965,6 +33027,21 @@ function TagsInputField({
32965
33027
  placeholder = "Add tag",
32966
33028
  ...rest
32967
33029
  }) {
33030
+ const [draft, setDraft] = useState("");
33031
+ const commit = (raw) => {
33032
+ const next = raw.trim();
33033
+ if (!next || tags.includes(next)) return;
33034
+ onAddTag?.(next);
33035
+ };
33036
+ const handleKeyDown = (e) => {
33037
+ if (e.key === "Enter" || e.key === ",") {
33038
+ e.preventDefault();
33039
+ commit(draft);
33040
+ setDraft("");
33041
+ } else if (e.key === "Backspace" && draft === "" && tags.length) {
33042
+ onRemoveTag?.(tags.length - 1);
33043
+ }
33044
+ };
32968
33045
  const chips = tags.map((t, i) => /* @__PURE__ */ jsx(TagChip, { label: t, onRemove: onRemoveTag ? () => onRemoveTag(i) : void 0 }, i));
32969
33046
  const box = (inner) => /* @__PURE__ */ jsxs(
32970
33047
  "div",
@@ -32981,7 +33058,12 @@ function TagsInputField({
32981
33058
  {
32982
33059
  placeholder,
32983
33060
  className: "min-w-[80px] flex-1 bg-transparent text-md text-text-primary outline-none placeholder:text-text-placeholder",
32984
- ...rest
33061
+ ...rest,
33062
+ ...onAddTag ? {
33063
+ value: draft,
33064
+ onChange: (e) => setDraft(e.target.value),
33065
+ onKeyDown: handleKeyDown
33066
+ } : {}
32985
33067
  }
32986
33068
  )
32987
33069
  ]
@@ -34384,6 +34466,6 @@ object-assign/index.js:
34384
34466
  *)
34385
34467
  */
34386
34468
 
34387
- export { ActivityFeed, ActivityGauge, AdvancedFilterBar, Alert, Avatar, AvatarAddButton, AvatarGroup, AvatarLabelGroup, AvatarProfilePhoto, BadgeCloseX, BadgeGroup, BreadcrumbButtonBase, Breadcrumbs, Button, ButtonCloseX, ButtonDestructive, ButtonGroup, ButtonGroupSegment, ButtonUtility, Calendar, CalendarCell, CalendarCellDayWeekView, CalendarColumnHeader, CalendarDateIcon, CalendarEvent, CalendarEventDayWeekView, CalendarHeader, CalendarRowLabel, CalendarTimemarker, CalendarViewDropdown, CardHeader, CarouselArrow, CarouselImage, Change, ChartLegend, ChartMarker, ChartMini, ChartTooltip, Checkbox, CodeSnippet, CodeSnippetTabs, ColorBadge, CommandBar, CommandBarFooter, CommandBarMenuSection, CommandBarNavigationIcon, CommandDropdownMenuItem, CommandInput, CommandShortcut, ContentDivider, ContentFeatureText, ContentHeading, ContentParagraph, ContentQuote, ContentRule, ContextMenu, DatePickerCell, DatePickerListItem, DatePickerMenu, DropdownAccountListItem, DropdownMenuFooter, DropdownMenuHeader, DropdownMenuItemInsetIcon, DropdownMenuListItem, EmptyState, FeaturedIcon, FeedItemBase, FileUpload, FileUploadBase, FileUploadItemBase, FilterBar, FilterTabs, FiltersDropdownMenu, FiltersSlideoutMenu, HeaderNavigation, HelpIcon2 as HelpIcon, InputField, LeadingInputField, LineAndBarChart, LinkMessage, LoadingIndicator, MediaMessage, MegaInputFieldBase, Message, MessageAction, MessageActionButton, MessageActionPanel, MessageReaction, MessageStatusIcon, MetricItem, Modal, ModalActions, ModalHeader, ModernBadge, MultiSelect, NavAccountCard, NavAccountCardMenuItem, NavButton2 as NavButton, NavFeaturedCard, NavItemBase, NavItemDropdownBase, NavMenuButton, Notification, NumberInput, PageHeader, Pagination, PaginationButtonGroupBase, PaginationCards, PaginationDotGroup, PaginationDotIndicator, PaginationNumberBase, PieChart2 as PieChart, PillBadge, ProgressBar, ProgressCircle, RadarChart2 as RadarChart, Radio, RadioGroup, RadioGroupItem, SectionFooter, SectionHeader, SectionLabel, Select, SelectMenuItem, SidebarNavigation, SlideOutMenuHeader, SlideoutMenu, Slider, SocialButton, StatusIcon, StepBase, StepIconBase, TabButtonBase, TableCell, TableHeaderCell, TableHeaderLabel, Tabs, Tag, TagsInputField, TextEditor, TextEditorToolbar, TextEditorToolbarDivider, TextEditorTooltip, TextareaInputField, Toggle, Tooltip2 as Tooltip, TrailingInputField, TreeView, TreeViewConnector, TreeViewItem, VerificationCodeInput, illustrations_exports as illustrations, useContextMenu, useTextEditor };
34469
+ export { ActivityFeed, ActivityGauge, AdvancedFilterBar, Alert, Avatar, AvatarAddButton, AvatarGroup, AvatarLabelGroup, AvatarProfilePhoto, BadgeCloseX, BadgeGroup, BreadcrumbButtonBase, Breadcrumbs, Button, ButtonCloseX, ButtonDestructive, ButtonGroup, ButtonGroupSegment, ButtonUtility, Calendar, CalendarCell, CalendarCellDayWeekView, CalendarColumnHeader, CalendarDateIcon, CalendarEvent, CalendarEventDayWeekView, CalendarHeader, CalendarRowLabel, CalendarTimemarker, CalendarViewDropdown, CardHeader, CarouselArrow, CarouselImage, Change, ChartLegend, ChartMarker, ChartMini, ChartTooltip, Checkbox, CodeSnippet, CodeSnippetTabs, ColorBadge, ComboBox, CommandBar, CommandBarFooter, CommandBarMenuSection, CommandBarNavigationIcon, CommandDropdownMenuItem, CommandInput, CommandShortcut, ContentDivider, ContentFeatureText, ContentHeading, ContentParagraph, ContentQuote, ContentRule, ContextMenu, DatePickerCell, DatePickerListItem, DatePickerMenu, DropdownAccountListItem, DropdownMenuFooter, DropdownMenuHeader, DropdownMenuItemInsetIcon, DropdownMenuListItem, EmptyState, FeaturedIcon, FeedItemBase, FileUpload, FileUploadBase, FileUploadItemBase, FilterBar, FilterTabs, FiltersDropdownMenu, FiltersSlideoutMenu, HeaderNavigation, HelpIcon2 as HelpIcon, InputField, LeadingInputField, LineAndBarChart, LinkMessage, LoadingIndicator, MediaMessage, MegaInputFieldBase, Message, MessageAction, MessageActionButton, MessageActionPanel, MessageReaction, MessageStatusIcon, MetricItem, Modal, ModalActions, ModalHeader, ModernBadge, MultiSelect, NavAccountCard, NavAccountCardMenuItem, NavButton2 as NavButton, NavFeaturedCard, NavItemBase, NavItemDropdownBase, NavMenuButton, Notification, NumberInput, PageHeader, Pagination, PaginationButtonGroupBase, PaginationCards, PaginationDotGroup, PaginationDotIndicator, PaginationNumberBase, PieChart2 as PieChart, PillBadge, ProgressBar, ProgressCircle, RadarChart2 as RadarChart, Radio, RadioGroup, RadioGroupItem, SectionFooter, SectionHeader, SectionLabel, Select, SelectMenuItem, SidebarNavigation, SlideOutMenuHeader, SlideoutMenu, Slider, SocialButton, StatusIcon, StepBase, StepIconBase, TabButtonBase, TableCell, TableHeaderCell, TableHeaderLabel, Tabs, Tag, TagsInputField, TextEditor, TextEditorToolbar, TextEditorToolbarDivider, TextEditorTooltip, TextareaInputField, Toggle, Tooltip2 as Tooltip, TrailingInputField, TreeView, TreeViewConnector, TreeViewItem, VerificationCodeInput, illustrations_exports as illustrations, useContextMenu, useTextEditor };
34388
34470
  //# sourceMappingURL=index.js.map
34389
34471
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@borisj74/bv-ds",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "bv-ds — React component library synced from Figma (Untitled UI v8.0), built on Tailwind CSS",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -0,0 +1,114 @@
1
+ import { useMemo, useState, type ReactNode } from "react";
2
+ import clsx from "clsx";
3
+ import { ChevronDown } from "@borisj74/bv-ds-icons";
4
+ import { IconBox } from "../../internal/iconBox";
5
+ import { FieldWrapper, boxClasses } from "../InputField/inputFieldShared";
6
+ import { SelectMenuItem } from "../SelectMenuItem";
7
+
8
+ export interface ComboBoxOption {
9
+ value: string;
10
+ label: string;
11
+ supportingText?: ReactNode;
12
+ }
13
+
14
+ export interface ComboBoxProps {
15
+ options: ComboBoxOption[];
16
+ /** Selected option value (controlled). */
17
+ value?: string;
18
+ onChange?: (value: string) => void;
19
+ /** Fires on every keystroke in the input — wire for async/remote filtering. */
20
+ onInputChange?: (input: string) => void;
21
+ placeholder?: string;
22
+ disabled?: boolean;
23
+ /** Error styling on the input shell + hint. */
24
+ error?: boolean;
25
+ label?: ReactNode;
26
+ hint?: ReactNode;
27
+ required?: boolean;
28
+ className?: string;
29
+ }
30
+
31
+ /**
32
+ * Text input with an autocomplete dropdown. Typing filters `options` by label
33
+ * (case-insensitive, substring); picking a row commits its `value` via
34
+ * `onChange` and fills the input with that label. A non-matching query shows a
35
+ * "No results" row. Controlled selection via `value`/`onChange`; raw keystrokes
36
+ * surface through `onInputChange` for remote filtering.
37
+ */
38
+ export function ComboBox({
39
+ options,
40
+ value,
41
+ onChange,
42
+ onInputChange,
43
+ placeholder = "Search...",
44
+ disabled = false,
45
+ error = false,
46
+ label,
47
+ hint,
48
+ required,
49
+ className,
50
+ }: ComboBoxProps) {
51
+ const selectedLabel = useMemo(
52
+ () => options.find((o) => o.value === value)?.label ?? "",
53
+ [options, value],
54
+ );
55
+ const [query, setQuery] = useState(selectedLabel);
56
+ const [open, setOpen] = useState(false);
57
+
58
+ // Reflect external value changes while the field is closed (not mid-typing).
59
+ const display = open ? query : selectedLabel;
60
+
61
+ const filtered = options.filter((o) =>
62
+ o.label.toLowerCase().includes(query.trim().toLowerCase()),
63
+ );
64
+
65
+ const pick = (o: ComboBoxOption) => {
66
+ onChange?.(o.value);
67
+ setQuery(o.label);
68
+ setOpen(false);
69
+ };
70
+
71
+ return (
72
+ <FieldWrapper label={label} required={required} hint={hint} destructive={error} className={className}>
73
+ <div className="relative">
74
+ <div className={clsx(boxClasses(error), "px-lg py-md", disabled && "cursor-not-allowed bg-bg-secondary opacity-60")}>
75
+ <input
76
+ value={display}
77
+ disabled={disabled}
78
+ placeholder={placeholder}
79
+ onFocus={() => setOpen(true)}
80
+ onBlur={() => setTimeout(() => setOpen(false), 120)}
81
+ onChange={(e) => {
82
+ setQuery(e.target.value);
83
+ setOpen(true);
84
+ onInputChange?.(e.target.value);
85
+ }}
86
+ className="min-w-0 flex-1 bg-transparent text-md text-text-primary outline-none placeholder:text-text-placeholder"
87
+ />
88
+ <span className={clsx("text-fg-quaternary transition-transform", open && "rotate-180")}>
89
+ <IconBox size={16}><ChevronDown /></IconBox>
90
+ </span>
91
+ </div>
92
+
93
+ {open && !disabled && (
94
+ <div className="absolute left-0 right-0 top-full z-50 mt-xs flex max-h-[320px] flex-col gap-px overflow-auto rounded-md border border-border-secondary-alt bg-bg-primary p-xs shadow-lg">
95
+ {filtered.length ? (
96
+ filtered.map((o) => (
97
+ <SelectMenuItem
98
+ key={o.value}
99
+ label={o.label}
100
+ supportingText={o.supportingText}
101
+ selected={o.value === value}
102
+ onMouseDown={(e) => e.preventDefault()}
103
+ onClick={() => pick(o)}
104
+ />
105
+ ))
106
+ ) : (
107
+ <div className="px-md py-lg text-center text-sm text-text-tertiary">No results</div>
108
+ )}
109
+ </div>
110
+ )}
111
+ </div>
112
+ </FieldWrapper>
113
+ );
114
+ }
@@ -0,0 +1,2 @@
1
+ export { ComboBox } from "./ComboBox";
2
+ export type { ComboBoxProps, ComboBoxOption } from "./ComboBox";
@@ -1,4 +1,4 @@
1
- import type { InputHTMLAttributes, ReactNode } from "react";
1
+ import { useState, type InputHTMLAttributes, type KeyboardEvent, type ReactNode } from "react";
2
2
  import clsx from "clsx";
3
3
  import { FieldWrapper, type InputFieldSize } from "../InputField/inputFieldShared";
4
4
 
@@ -10,6 +10,14 @@ export interface TagsInputFieldProps
10
10
  tags?: string[];
11
11
  /** Remove handler (receives the tag index). Renders a close button per chip. */
12
12
  onRemoveTag?: (index: number) => void;
13
+ /**
14
+ * Add handler. When supplied, the inner input becomes interactive: Enter or
15
+ * comma commits the trimmed input text as a new tag; Backspace on an empty
16
+ * input removes the last chip (via `onRemoveTag`). Empty/duplicate adds are
17
+ * ignored. Without it the field stays display-only (chips controlled by
18
+ * `tags`/`onRemoveTag`).
19
+ */
20
+ onAddTag?: (tag: string) => void;
13
21
  /** `inner` keeps chips inside the field; `outer` shows them below it. */
14
22
  variant?: TagsInputVariant;
15
23
  size?: InputFieldSize;
@@ -42,6 +50,7 @@ function TagChip({ label, onRemove }: { label: string; onRemove?: () => void })
42
50
  export function TagsInputField({
43
51
  tags = [],
44
52
  onRemoveTag,
53
+ onAddTag,
45
54
  variant = "inner",
46
55
  size = "md",
47
56
  label,
@@ -52,6 +61,24 @@ export function TagsInputField({
52
61
  placeholder = "Add tag",
53
62
  ...rest
54
63
  }: TagsInputFieldProps) {
64
+ const [draft, setDraft] = useState("");
65
+
66
+ const commit = (raw: string) => {
67
+ const next = raw.trim();
68
+ if (!next || tags.includes(next)) return;
69
+ onAddTag?.(next);
70
+ };
71
+
72
+ const handleKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {
73
+ if (e.key === "Enter" || e.key === ",") {
74
+ e.preventDefault();
75
+ commit(draft);
76
+ setDraft("");
77
+ } else if (e.key === "Backspace" && draft === "" && tags.length) {
78
+ onRemoveTag?.(tags.length - 1);
79
+ }
80
+ };
81
+
55
82
  const chips = tags.map((t, i) => (
56
83
  <TagChip key={i} label={t} onRemove={onRemoveTag ? () => onRemoveTag(i) : undefined} />
57
84
  ));
@@ -71,6 +98,13 @@ export function TagsInputField({
71
98
  placeholder={placeholder}
72
99
  className="min-w-[80px] flex-1 bg-transparent text-md text-text-primary outline-none placeholder:text-text-placeholder"
73
100
  {...rest}
101
+ {...(onAddTag
102
+ ? {
103
+ value: draft,
104
+ onChange: (e) => setDraft(e.target.value),
105
+ onKeyDown: handleKeyDown,
106
+ }
107
+ : {})}
74
108
  />
75
109
  </div>
76
110
  );
package/src/index.ts CHANGED
@@ -47,6 +47,7 @@ export * from "./components/CommandBarNavigationIcon";
47
47
  export * from "./components/CommandDropdownMenuItem";
48
48
  export * from "./components/CommandInput";
49
49
  export * from "./components/CommandShortcut";
50
+ export * from "./components/ComboBox";
50
51
  export * from "./components/ContentDivider";
51
52
  export * from "./components/ContentFeatureText";
52
53
  export * from "./components/ContentHeading";