@staffbase/design 21.3.0 → 21.3.1

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/main.d.ts CHANGED
@@ -15,6 +15,7 @@ import { ClassAttributes } from 'react';
15
15
  import { Combobox } from '@base-ui/react/combobox';
16
16
  import { ComboboxChipProps } from '@base-ui/react';
17
17
  import { ComboboxItemProps } from '@base-ui/react';
18
+ import { ComboboxSeparatorProps } from '@base-ui/react';
18
19
  import { ComponentProps } from 'react';
19
20
  import { ContextMenuGroupLabelProps } from '@base-ui/react';
20
21
  import { ContextMenuGroupProps } from '@base-ui/react';
@@ -566,7 +567,7 @@ export declare const DashIcon: default_2.NamedExoticComponent<default_2.SVGAttri
566
567
  export declare const DesktopIcon: default_2.NamedExoticComponent<default_2.SVGAttributes<SVGSVGElement> & default_2.RefAttributes<SVGSVGElement>>;
567
568
 
568
569
  export declare const Dialog: {
569
- Root: typeof Dialog_2.Root;
570
+ Root: <Payload>(props: Dialog_2.Root.Props<Payload>) => React.JSX.Element;
570
571
  Popup: ForwardRefExoticComponent<Omit<PopupProps_3, "ref"> & RefAttributes<HTMLDivElement>>;
571
572
  Trigger: (props: TriggerProps_3) => JSX.Element;
572
573
  Close: ForwardRefExoticComponent<Omit<CloseProps_3, "ref"> & RefAttributes<HTMLButtonElement>>;
@@ -1722,7 +1723,7 @@ export declare const SearchableMultiSelect: {
1722
1723
  GroupLabel: ForwardRefExoticComponent<Omit< AutocompleteGroupLabelProps, "ref"> & RefAttributes<HTMLDivElement>>;
1723
1724
  Popup: ForwardRefExoticComponent<Omit<PopupProps_5, "ref"> & RefAttributes<HTMLDivElement>>;
1724
1725
  Item: ForwardRefExoticComponent<Omit< ComboboxItemProps, "ref"> & RefAttributes<HTMLDivElement>>;
1725
- Separator: ForwardRefExoticComponent<Omit< SeparatorProps, "ref"> & RefAttributes<HTMLDivElement>>;
1726
+ Separator: ForwardRefExoticComponent<Omit< ComboboxSeparatorProps, "ref"> & RefAttributes<HTMLDivElement>>;
1726
1727
  Input: ForwardRefExoticComponent<Omit< AutocompleteInputProps, "ref"> & RefAttributes<HTMLInputElement>>;
1727
1728
  Value: (props: ValueProps) => JSX.Element;
1728
1729
  Chip: ForwardRefExoticComponent<Omit< ComboboxChipProps, "ref"> & RefAttributes<HTMLDivElement>>;
@@ -1740,7 +1741,7 @@ export declare const SearchableSingleSelect: {
1740
1741
  GroupLabel: ForwardRefExoticComponent<Omit< AutocompleteGroupLabelProps, "ref"> & RefAttributes<HTMLDivElement>>;
1741
1742
  Popup: ForwardRefExoticComponent<Omit<PopupProps_6, "ref"> & RefAttributes<HTMLDivElement>>;
1742
1743
  Item: ForwardRefExoticComponent<Omit< ComboboxItemProps, "ref"> & RefAttributes<HTMLDivElement>>;
1743
- Separator: ForwardRefExoticComponent<Omit< SeparatorProps, "ref"> & RefAttributes<HTMLDivElement>>;
1744
+ Separator: ForwardRefExoticComponent<Omit< ComboboxSeparatorProps, "ref"> & RefAttributes<HTMLDivElement>>;
1744
1745
  Input: ForwardRefExoticComponent<Omit<InputProps, "ref"> & RefAttributes<HTMLInputElement>>;
1745
1746
  Empty: ForwardRefExoticComponent<Omit< AutocompleteEmptyProps, "ref"> & RefAttributes<HTMLDivElement>>;
1746
1747
  };
package/dist/main.js CHANGED
@@ -9756,10 +9756,13 @@ function useFilter({ placement = "bottom-start", open, onOpenChange } = {}) {
9756
9756
  ]
9757
9757
  });
9758
9758
  const context = data.context;
9759
+ const click = useClick(context, { enabled: true });
9760
+ const dismiss = useDismiss(context);
9761
+ const role = useRole(context);
9759
9762
  const interactions = useInteractions([
9760
- useClick(context, { enabled: true }),
9761
- useDismiss(context),
9762
- useRole(context)
9763
+ click,
9764
+ dismiss,
9765
+ role
9763
9766
  ]);
9764
9767
  return useMemo(() => ({
9765
9768
  open,
@@ -10332,18 +10335,20 @@ var useModalContext = () => {
10332
10335
  var ModalHeader = forwardRef(function ModalHeader(props, ref) {
10333
10336
  const { title, titleAddon, showCancelButton = false, cancelButtonText, onCancel, showHeaderButton = false, headerButtonIsGhost = true, onHeaderButtonClick, headerButtonText } = props;
10334
10337
  let headerButton;
10335
- if (showHeaderButton && onHeaderButtonClick && headerButtonText) if (headerButtonIsGhost) headerButton = /* @__PURE__ */ jsx(Button, {
10336
- className: clsx$1("ds-modal__ghost-button--accept"),
10337
- variant: "ghost",
10338
- onClick: () => onHeaderButtonClick(),
10339
- children: headerButtonText
10340
- });
10341
- else headerButton = /* @__PURE__ */ jsx(ButtonDeprecated, {
10342
- className: clsx$1("ds-modal__button--accept"),
10343
- variant: "primary",
10344
- onClick: () => onHeaderButtonClick(),
10345
- children: headerButtonText
10346
- });
10338
+ if (showHeaderButton && onHeaderButtonClick && headerButtonText) {
10339
+ if (headerButtonIsGhost) headerButton = /* @__PURE__ */ jsx(Button, {
10340
+ className: clsx$1("ds-modal__ghost-button--accept"),
10341
+ variant: "ghost",
10342
+ onClick: () => onHeaderButtonClick(),
10343
+ children: headerButtonText
10344
+ });
10345
+ else headerButton = /* @__PURE__ */ jsx(ButtonDeprecated, {
10346
+ className: clsx$1("ds-modal__button--accept"),
10347
+ variant: "primary",
10348
+ onClick: () => onHeaderButtonClick(),
10349
+ children: headerButtonText
10350
+ });
10351
+ }
10347
10352
  return /* @__PURE__ */ jsxs("div", {
10348
10353
  className: clsx$1("ds-modal__header"),
10349
10354
  ref,