@bcrumbs.net/bc-ui 0.0.13 → 0.0.14
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/index.esm.d.ts +1 -1
- package/index.esm.js +387 -231
- package/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/lib/baseComponents/button.d.ts +1 -1
- package/src/lib/charts/formatChartAxisTick.d.ts +21 -0
- package/src/lib/hooks/useForm/index.d.ts +1 -1
- package/src/lib/icon/bcicon.d.ts +15 -0
- package/src/lib/navigation/types.d.ts +1 -0
- package/src/lib/newComponents/BCNewAlertDialog/BCNewAlertDialog.d.ts +27 -2
- package/src/lib/newComponents/BCNewAlertDialog/types.d.ts +1 -27
- package/src/lib/newComponents/BCNewDropdown/types.d.ts +1 -0
- package/src/lib/newComponents/BCNewTooltip/types.d.ts +1 -0
- package/src/lib/textbox/bctextbox.d.ts +2 -1
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export * from './lib/newComponents/BCNewTable/BCNewTable';
|
|
|
46
46
|
export * from './lib/newComponents/BCNewDropdown/BCNewDropdown';
|
|
47
47
|
export * from './lib/newComponents/BCNewTooltip/BCNewTooltip';
|
|
48
48
|
export * from './lib/newComponents/BCNewAlertDialog/BCNewAlertDialog';
|
|
49
|
+
export type { RAlertDialogProps } from './lib/newComponents/BCNewAlertDialog/BCNewAlertDialog';
|
|
49
50
|
export * from './lib/newComponents/BCNewDialog/BCNewDialog';
|
|
50
51
|
export * from './lib/newComponents/BCRadioGroupItem/BCRadioItem';
|
|
51
52
|
export * from './lib/newComponents/BCNewTabs/BCNewTabs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
interface ButtonStyleProps {
|
|
3
|
-
variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
|
|
3
|
+
variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link' | 'warning';
|
|
4
4
|
size?: 'default' | 'sm' | 'lg' | 'icon';
|
|
5
5
|
}
|
|
6
6
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, ButtonStyleProps {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats Y-axis tick values with a leading zero for decimals (e.g. 0.75, not .75).
|
|
3
|
+
* Uses Western numerals for consistent chart readability across locales.
|
|
4
|
+
*/
|
|
5
|
+
export declare function formatChartAxisTick(value: number): string;
|
|
6
|
+
export declare const CHART_Y_AXIS_WIDTH = 44;
|
|
7
|
+
/** Gap between Y-axis line and tick labels (larger in RTL where axis is on the right). */
|
|
8
|
+
export declare function getChartYAxisTickMargin(rtl: boolean): number;
|
|
9
|
+
/**
|
|
10
|
+
* Positions labels inside the plot area, away from the axis line.
|
|
11
|
+
* Right-side axis (RTL): anchor end + negative dx shifts labels left of the line.
|
|
12
|
+
* Left-side axis (LTR): same anchor keeps labels in the margin to the left of the line.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getChartYAxisTickStyle(rtl: boolean): {
|
|
15
|
+
textAnchor: "end";
|
|
16
|
+
dx: number;
|
|
17
|
+
};
|
|
18
|
+
/** Space between X-axis category labels and the horizontal axis line. */
|
|
19
|
+
export declare const CHART_X_AXIS_TICK_MARGIN = 10;
|
|
20
|
+
/** Merges Recharts Y-axis tick SVG props (tick may also be a component or boolean). */
|
|
21
|
+
export declare function mergeYAxisTickProps(base: Record<string, unknown>, override: unknown, rtlStyle: ReturnType<typeof getChartYAxisTickStyle>): Record<string, unknown>;
|
|
@@ -28,7 +28,7 @@ interface useBCFormReturnFunctions {
|
|
|
28
28
|
validateForm: () => boolean;
|
|
29
29
|
onChange: (targetVal: string, e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
30
30
|
resetValidationStates: () => void;
|
|
31
|
-
renderField: (name: string, label: string, type: FieldType, readonly?: boolean, placeholder?: string, tooltip?: string, dynamicStyle?: SerializedStyles) => JSX.Element;
|
|
31
|
+
renderField: (name: string, label: string, type: FieldType, readonly?: boolean, placeholder?: string, tooltip?: string, dynamicStyle?: SerializedStyles, autoComplete?: string) => JSX.Element;
|
|
32
32
|
_renderFieldInput: (name: string, type: FieldType, readonly: boolean, placeholder: string) => JSX.Element;
|
|
33
33
|
onDroplistSelectionChange: (name: string, selectedKey?: string) => void;
|
|
34
34
|
renderDroplistField: (name: string, label: string, options: BCDropListOptionsType[], placeholder?: string, tooltip?: string, lang?: boolean, searchable?: boolean, labelStyle?: SerializedStyles, containerStyle?: SerializedStyles, loading?: boolean, noEmpty?: boolean, usePortal?: boolean) => JSX.Element;
|
package/src/lib/icon/bcicon.d.ts
CHANGED
|
@@ -446,4 +446,19 @@ export declare const BCIcons: {
|
|
|
446
446
|
height?: number | undefined;
|
|
447
447
|
fill?: string | undefined;
|
|
448
448
|
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
449
|
+
HelpCircle: ({ width, height, fill }: {
|
|
450
|
+
width?: number | undefined;
|
|
451
|
+
height?: number | undefined;
|
|
452
|
+
fill?: string | undefined;
|
|
453
|
+
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
454
|
+
SingleUser: ({ width, height, fill }: {
|
|
455
|
+
width?: number | undefined;
|
|
456
|
+
height?: number | undefined;
|
|
457
|
+
fill?: string | undefined;
|
|
458
|
+
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
459
|
+
ChatWithBubble: ({ width, height, fill }: {
|
|
460
|
+
width?: number | undefined;
|
|
461
|
+
height?: number | undefined;
|
|
462
|
+
fill?: string | undefined;
|
|
463
|
+
}) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
449
464
|
};
|
|
@@ -1,3 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
2
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
3
|
+
export interface RAlertDialogProps {
|
|
4
|
+
component?: React.ReactNode;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
cancelText?: string;
|
|
8
|
+
cancelCssStyle?: SerializedStyles;
|
|
9
|
+
cancelAction?: () => void;
|
|
10
|
+
confirmText?: string;
|
|
11
|
+
confirmCssStyle?: SerializedStyles;
|
|
12
|
+
confirmAction: () => void;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
headerItemsPosition?: string;
|
|
16
|
+
disableTrigger?: boolean;
|
|
17
|
+
triggerCssStyle?: SerializedStyles;
|
|
18
|
+
open?: boolean;
|
|
19
|
+
onOpenChange?: (open: boolean) => void;
|
|
20
|
+
titleCssStyle?: SerializedStyles;
|
|
21
|
+
descriptionCssStyle?: SerializedStyles;
|
|
22
|
+
noTrigger?: boolean;
|
|
23
|
+
rtl?: boolean;
|
|
24
|
+
icon?: React.ReactNode;
|
|
25
|
+
iconBackgroundColor?: string;
|
|
26
|
+
noConfirmButton?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare const BCNewAlertDialog: ({ component, title, description, cancelText, cancelCssStyle, confirmText, confirmCssStyle, confirmAction, triggerCssStyle, headerItemsPosition, disableTrigger, open, onOpenChange, titleCssStyle, descriptionCssStyle, noTrigger, rtl, icon, iconBackgroundColor, noConfirmButton, cancelAction, }: RAlertDialogProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,27 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
export type RAlertDialogProps = {
|
|
4
|
-
component?: ReactNode;
|
|
5
|
-
title?: string;
|
|
6
|
-
description?: string;
|
|
7
|
-
cancelText?: string;
|
|
8
|
-
cancelCssStyle?: SerializedStyles;
|
|
9
|
-
cancelAction?: () => void;
|
|
10
|
-
confirmText?: string;
|
|
11
|
-
confirmCssStyle?: SerializedStyles;
|
|
12
|
-
confirmAction: () => void;
|
|
13
|
-
loading?: boolean;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
headerItemsPosition?: string;
|
|
16
|
-
disableTrigger?: boolean;
|
|
17
|
-
triggerCssStyle?: SerializedStyles;
|
|
18
|
-
open?: boolean;
|
|
19
|
-
onOpenChange?: (open: boolean) => void;
|
|
20
|
-
titleCssStyle?: SerializedStyles;
|
|
21
|
-
descriptionCssStyle?: SerializedStyles;
|
|
22
|
-
noTrigger?: boolean;
|
|
23
|
-
rtl?: boolean;
|
|
24
|
-
icon?: ReactNode;
|
|
25
|
-
iconBackgroundColor?: string;
|
|
26
|
-
noConfirmButton?: boolean;
|
|
27
|
-
};
|
|
1
|
+
export type { RAlertDialogProps } from './BCNewAlertDialog';
|
|
@@ -11,6 +11,7 @@ export interface BCTextboxProps {
|
|
|
11
11
|
placeholder?: string;
|
|
12
12
|
maxLength?: number;
|
|
13
13
|
autoCompleteList?: string[];
|
|
14
|
+
autoComplete?: string;
|
|
14
15
|
onBlur?: (ev: ChangeEvent<HTMLInputElement>) => any;
|
|
15
16
|
onClick?: (ev: any) => any;
|
|
16
17
|
onFocus?: (ev: ChangeEvent<HTMLInputElement>) => any;
|
|
@@ -19,5 +20,5 @@ export interface BCTextboxProps {
|
|
|
19
20
|
export interface BCTextboxState {
|
|
20
21
|
showAutoComplete: boolean;
|
|
21
22
|
}
|
|
22
|
-
export declare const BCTextbox: ({ className, name, onChange, onKeyDown, onClick, value, type, disabled, placeholder, maxLength, autoCompleteList, onBlur, onFocus, inputStyle, }: BCTextboxProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const BCTextbox: ({ className, name, onChange, onKeyDown, onClick, value, type, disabled, placeholder, maxLength, autoCompleteList, autoComplete, onBlur, onFocus, inputStyle, }: BCTextboxProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
23
24
|
export default BCTextbox;
|