@beaubrain/web-design-system 0.1.13 → 0.1.15

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.
@@ -0,0 +1,23 @@
1
+ import { PopupBody, PopupContent, PopupFooter, PopupHeader, PopupIcon, PopupMessage, PopupOverlay, PopupPortal, PopupRoot, PopupTitle } from './popup.base';
2
+ export declare const Popup: (({ __scopePopup, children, open, onOpenChange, closeOnEscape, closeOnOverlayClick, lockScroll, }: import('./popup.base').PopupRootProps & {
3
+ __scopePopup?: import('../../core/react').Scope;
4
+ }) => import("react/jsx-runtime").JSX.Element) & {
5
+ Root: ({ __scopePopup, children, open, onOpenChange, closeOnEscape, closeOnOverlayClick, lockScroll, }: import('./popup.base').PopupRootProps & {
6
+ __scopePopup?: import('../../core/react').Scope;
7
+ }) => import("react/jsx-runtime").JSX.Element;
8
+ Portal: ({ __scopePopup, children, container, forceMount, }: import('./popup.base').PopupPortalProps & {
9
+ __scopePopup?: import('../../core/react').Scope;
10
+ }) => import("react/jsx-runtime").JSX.Element | null;
11
+ Overlay: import('react').ForwardRefExoticComponent<import('./popup.base').PopupOverlayProps & import('react').RefAttributes<HTMLDivElement>>;
12
+ Content: import('react').ForwardRefExoticComponent<import('./popup.base').PopupContentProps & import('react').RefAttributes<HTMLDivElement>>;
13
+ Header: import('react').ForwardRefExoticComponent<import('./popup.base').PopupHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
14
+ Title: import('react').ForwardRefExoticComponent<import('./popup.base').PopupTitleProps & import('react').RefAttributes<HTMLDivElement>>;
15
+ Icon: import('react').ForwardRefExoticComponent<import('./popup.base').PopupIconProps & import('react').RefAttributes<HTMLDivElement>>;
16
+ Message: import('react').ForwardRefExoticComponent<import('./popup.base').PopupMessageProps & import('react').RefAttributes<HTMLDivElement>>;
17
+ Body: import('react').ForwardRefExoticComponent<import('./popup.base').PopupBodyProps & import('react').RefAttributes<HTMLDivElement>>;
18
+ Footer: import('react').ForwardRefExoticComponent<import('./popup.base').PopupFooterProps & import('react').RefAttributes<HTMLDivElement>>;
19
+ };
20
+ export default Popup;
21
+ export { PopupRoot as Root, PopupPortal as Portal, PopupOverlay as Overlay, PopupContent as Content, PopupHeader as Header, PopupTitle as Title, PopupIcon as Icon, PopupMessage as Message, PopupBody as Body, PopupFooter as Footer, };
22
+ export { PopupContentPropDefs, PopupFooterPropDefs } from './popup.defs';
23
+ export type { PopupRootProps, PopupPortalProps, PopupOverlayProps, PopupContentProps, PopupHeaderProps, PopupTitleProps, PopupIconProps, PopupMessageProps, PopupBodyProps, PopupFooterProps, } from './popup.base';
@@ -0,0 +1,53 @@
1
+ import { Scope } from '../../core/react';
2
+ import { Base } from '../__internal';
3
+ import { PopupContentDefProps, PopupFooterDefProps } from './popup.defs';
4
+ import * as React from 'react';
5
+ type ScopedProps<P> = P & {
6
+ __scopePopup?: Scope;
7
+ };
8
+ interface PopupRootProps {
9
+ children?: React.ReactNode;
10
+ open: boolean;
11
+ onOpenChange: (open: boolean) => void;
12
+ closeOnEscape?: boolean;
13
+ closeOnOverlayClick?: boolean;
14
+ lockScroll?: boolean;
15
+ }
16
+ declare const PopupRoot: ({ __scopePopup, children, open, onOpenChange, closeOnEscape, closeOnOverlayClick, lockScroll, }: ScopedProps<PopupRootProps>) => import("react/jsx-runtime").JSX.Element;
17
+ interface PopupPortalProps {
18
+ children?: React.ReactNode;
19
+ container?: HTMLElement | null;
20
+ forceMount?: true;
21
+ }
22
+ declare const PopupPortal: ({ __scopePopup, children, container, forceMount, }: ScopedProps<PopupPortalProps>) => import("react/jsx-runtime").JSX.Element | null;
23
+ type BaseDivProps = React.ComponentPropsWithoutRef<typeof Base.div>;
24
+ interface PopupOverlayProps extends BaseDivProps {
25
+ }
26
+ declare const PopupOverlay: React.ForwardRefExoticComponent<PopupOverlayProps & React.RefAttributes<HTMLDivElement>>;
27
+ type PopupContentOwnProps = React.ComponentPropsWithoutRef<typeof Base.div> & PopupContentDefProps & {
28
+ contentWidth?: number | string;
29
+ };
30
+ interface PopupContentProps extends PopupContentOwnProps {
31
+ }
32
+ declare const PopupContent: React.ForwardRefExoticComponent<PopupContentProps & React.RefAttributes<HTMLDivElement>>;
33
+ interface PopupHeaderProps extends React.ComponentPropsWithoutRef<typeof Base.div> {
34
+ }
35
+ declare const PopupHeader: React.ForwardRefExoticComponent<PopupHeaderProps & React.RefAttributes<HTMLDivElement>>;
36
+ interface PopupTitleProps extends React.ComponentPropsWithoutRef<typeof Base.div> {
37
+ }
38
+ declare const PopupTitle: React.ForwardRefExoticComponent<PopupTitleProps & React.RefAttributes<HTMLDivElement>>;
39
+ interface PopupIconProps extends React.ComponentPropsWithoutRef<typeof Base.div> {
40
+ }
41
+ declare const PopupIcon: React.ForwardRefExoticComponent<PopupIconProps & React.RefAttributes<HTMLDivElement>>;
42
+ interface PopupMessageProps extends React.ComponentPropsWithoutRef<typeof Base.div> {
43
+ }
44
+ declare const PopupMessage: React.ForwardRefExoticComponent<PopupMessageProps & React.RefAttributes<HTMLDivElement>>;
45
+ interface PopupBodyProps extends React.ComponentPropsWithoutRef<typeof Base.div> {
46
+ }
47
+ declare const PopupBody: React.ForwardRefExoticComponent<PopupBodyProps & React.RefAttributes<HTMLDivElement>>;
48
+ type PopupFooterOwnProps = React.ComponentPropsWithoutRef<typeof Base.div> & PopupFooterDefProps;
49
+ interface PopupFooterProps extends PopupFooterOwnProps {
50
+ }
51
+ declare const PopupFooter: React.ForwardRefExoticComponent<PopupFooterProps & React.RefAttributes<HTMLDivElement>>;
52
+ export { PopupRoot, PopupPortal, PopupOverlay, PopupContent, PopupHeader, PopupTitle, PopupIcon, PopupMessage, PopupBody, PopupFooter, };
53
+ export type { PopupRootProps, PopupPortalProps, PopupOverlayProps, PopupContentProps, PopupHeaderProps, PopupTitleProps, PopupIconProps, PopupMessageProps, PopupBodyProps, PopupFooterProps, };
@@ -0,0 +1,27 @@
1
+ import { GetPropDefTypes } from '../../core/defs';
2
+ declare const PopupContentPropDefs: {
3
+ size: {
4
+ type: "enum";
5
+ className: string;
6
+ values: readonly ["1", "2"];
7
+ default: "2";
8
+ };
9
+ variant: {
10
+ type: "enum";
11
+ className: string;
12
+ values: readonly ["basic", "notice", "status"];
13
+ default: "basic";
14
+ };
15
+ };
16
+ declare const PopupFooterPropDefs: {
17
+ layout: {
18
+ type: "enum";
19
+ className: string;
20
+ values: readonly ["right", "fill", "left"];
21
+ default: "left";
22
+ };
23
+ };
24
+ type PopupContentDefProps = GetPropDefTypes<typeof PopupContentPropDefs>;
25
+ type PopupFooterDefProps = GetPropDefTypes<typeof PopupFooterPropDefs>;
26
+ export { PopupContentPropDefs, PopupFooterPropDefs };
27
+ export type { PopupContentDefProps, PopupFooterDefProps };
@@ -0,0 +1,14 @@
1
+ import { Scope } from '../../core/react';
2
+ import * as React from 'react';
3
+ type PopupLayoutVariant = 'basic' | 'notice' | 'status';
4
+ type PopupPart = 'body' | 'footer' | 'header' | 'icon' | 'message';
5
+ declare function markPopupPart(component: unknown, part: PopupPart): void;
6
+ declare function resolvePopupContentWidth(contentWidth: number | string | undefined): string | undefined;
7
+ declare function getPopupContentChildren(variant: PopupLayoutVariant, children: React.ReactNode): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
8
+ declare function getFocusableElements(container: HTMLElement): HTMLElement[];
9
+ declare function stripPopupScope<P extends {
10
+ __scopePopup?: Scope;
11
+ }>(props: P): Omit<P, '__scopePopup'>;
12
+ declare function trapFocus(event: React.KeyboardEvent, container: HTMLElement | null): void;
13
+ export { getFocusableElements, getPopupContentChildren, markPopupPart, resolvePopupContentWidth, stripPopupScope, trapFocus, };
14
+ export type { PopupLayoutVariant };
@@ -9,6 +9,7 @@ interface SelectBoxRootProps {
9
9
  value?: string;
10
10
  defaultValue?: string;
11
11
  onValueChange?: (value: string) => void;
12
+ valueLabelMap?: Map<string, string>;
12
13
  open?: boolean;
13
14
  defaultOpen?: boolean;
14
15
  onOpenChange?: (open: boolean) => void;
@@ -50,7 +50,7 @@ declare const SelectBoxRootPropDefs: {
50
50
  type: "enum";
51
51
  className: string;
52
52
  values: readonly ["1", "2", "3", "4", "5"];
53
- default: "2";
53
+ default: "4";
54
54
  };
55
55
  variant: {
56
56
  type: "enum";
@@ -161,7 +161,7 @@ declare const SelectBoxPropDefs: {
161
161
  type: "enum";
162
162
  className: string;
163
163
  values: readonly ["1", "2", "3", "4", "5"];
164
- default: "2";
164
+ default: "4";
165
165
  };
166
166
  variant: {
167
167
  type: "enum";
@@ -3,6 +3,9 @@ export { default as Flex, type FlexProps } from './Flex/index.js';
3
3
  export { default as Button, type ButtonProps } from './Button/index.js';
4
4
  export { default as Spinner, type SpinnerProps } from './Spinner/index.js';
5
5
  export { default as Checkbox, type CheckboxProps } from './Checkbox/index.js';
6
+ export { default as ConfirmDialog, type ConfirmDialogProps } from './ConfirmDialog/index.js';
7
+ export { default as CheckableSelectBox, type CheckableSelectBoxProps, type CheckableSelectItem, } from './CheckableSelectBox/index.js';
8
+ export { default as Popup, type PopupRootProps, type PopupPortalProps, type PopupOverlayProps, type PopupContentProps, type PopupHeaderProps, type PopupTitleProps, type PopupIconProps, type PopupMessageProps, type PopupBodyProps, type PopupFooterProps, } from './Popup/index.js';
6
9
  export { default as CheckboxGroup, type CheckboxGroupRootProps, type CheckboxGroupItemProps, } from './CheckboxGroup';
7
10
  export { default as Radio, type RadioProps } from './Radio/index.js';
8
11
  export { default as RadioGroup, type RadioGroupRootProps, type RadioGroupItemProps, } from './RadioGroup';