bianic-ui 2.14.0-beta.2 → 2.14.0-beta.4

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.
Files changed (30) hide show
  1. package/dist/cjs/index.js +171 -12
  2. package/dist/cjs/lib.css +1 -1
  3. package/dist/cjs/types/components/Forms/Toggle/configs.d.ts +13 -2
  4. package/dist/cjs/types/components/Forms/Toggle/index.d.ts +1 -1
  5. package/dist/cjs/types/components/Stepper/Horizontal/Navbar.d.ts +4 -0
  6. package/dist/cjs/types/components/Stepper/Horizontal/Standard.d.ts +4 -0
  7. package/dist/cjs/types/components/Stepper/Horizontal/configs.d.ts +9 -0
  8. package/dist/cjs/types/components/Stepper/Horizontal/index.d.ts +3 -20
  9. package/dist/cjs/types/components/Stepper/Horizontal/types.d.ts +32 -0
  10. package/dist/cjs/types/components/Stepper/index.d.ts +1 -0
  11. package/dist/cjs/types/components/index.d.ts +1 -0
  12. package/dist/cjs/types/stories/Button/Button.test.stories.d.ts +24 -0
  13. package/dist/cjs/types/stories/HorizontalStepper/HorizontalStepper.stories.d.ts +123 -4
  14. package/dist/cjs/types/stories/HorizontalStepper/HorizontalStepper.test.stories.d.ts +49 -0
  15. package/dist/esm/index.js +171 -12
  16. package/dist/esm/lib.css +1 -1
  17. package/dist/esm/types/components/Forms/Toggle/configs.d.ts +13 -2
  18. package/dist/esm/types/components/Forms/Toggle/index.d.ts +1 -1
  19. package/dist/esm/types/components/Stepper/Horizontal/Navbar.d.ts +4 -0
  20. package/dist/esm/types/components/Stepper/Horizontal/Standard.d.ts +4 -0
  21. package/dist/esm/types/components/Stepper/Horizontal/configs.d.ts +9 -0
  22. package/dist/esm/types/components/Stepper/Horizontal/index.d.ts +3 -20
  23. package/dist/esm/types/components/Stepper/Horizontal/types.d.ts +32 -0
  24. package/dist/esm/types/components/Stepper/index.d.ts +1 -0
  25. package/dist/esm/types/components/index.d.ts +1 -0
  26. package/dist/esm/types/stories/Button/Button.test.stories.d.ts +24 -0
  27. package/dist/esm/types/stories/HorizontalStepper/HorizontalStepper.stories.d.ts +123 -4
  28. package/dist/esm/types/stories/HorizontalStepper/HorizontalStepper.test.stories.d.ts +49 -0
  29. package/dist/index.d.ts +18 -6
  30. package/package.json +13 -3
@@ -1,12 +1,23 @@
1
1
  declare const sizeConfig: {
2
2
  md: {
3
3
  containerSize: string;
4
- checkSize: string;
4
+ trackBorder: string;
5
+ knobSize: string;
6
+ knobInset: string;
5
7
  labelClass: string;
6
8
  };
7
9
  sm: {
8
10
  containerSize: string;
9
- checkSize: string;
11
+ trackBorder: string;
12
+ knobSize: string;
13
+ knobInset: string;
14
+ labelClass: string;
15
+ };
16
+ tn: {
17
+ containerSize: string;
18
+ trackBorder: string;
19
+ knobSize: string;
20
+ knobInset: string;
10
21
  labelClass: string;
11
22
  };
12
23
  };
@@ -1,7 +1,7 @@
1
1
  import React, { ComponentPropsWithoutRef } from 'react';
2
2
  interface CheckboxProps extends Omit<ComponentPropsWithoutRef<'input'>, 'size'> {
3
3
  label?: string;
4
- size?: 'md' | 'sm';
4
+ size?: 'md' | 'sm' | 'tn';
5
5
  checked?: boolean;
6
6
  id?: string;
7
7
  onClick?: (event: React.MouseEvent<HTMLInputElement>) => void;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { NavbarHorizontalStepperProps } from './types';
3
+ export declare function NavbarHorizontalStepper({ steps, activeStep, className, onStepClick, color, processedIcon, currentIcon, size, showLabels, }: Omit<NavbarHorizontalStepperProps, 'variant'>): React.JSX.Element;
4
+ export default NavbarHorizontalStepper;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { StandardHorizontalStepperProps } from './types';
3
+ export declare function StandardHorizontalStepper({ steps, activeStep, size, className, onStepClick, processedIcon, currentIcon, color, showLabels, }: Omit<StandardHorizontalStepperProps, 'variant'>): React.JSX.Element;
4
+ export default StandardHorizontalStepper;
@@ -0,0 +1,9 @@
1
+ import { HorizontalStepperColor } from './types';
2
+ export type NavbarStepState = 'current' | 'clickable' | 'static' | 'disabled';
3
+ export declare const navbarItemConfig: Record<NavbarStepState, string>;
4
+ export declare const navbarCircleConfig: Record<'currentDefault' | 'other' | 'disabled', string>;
5
+ export declare const navbarCurrentColorConfig: Record<HorizontalStepperColor, string>;
6
+ export declare const navbarProcessedColorConfig: Record<HorizontalStepperColor, string>;
7
+ export declare const navbarProcessedFilledColorConfig: Record<HorizontalStepperColor, string>;
8
+ export declare const navbarLabelConfig: Record<'enabled' | 'disabled', string>;
9
+ export declare const navbarChevronConfig: Record<'enabled' | 'disabled', string>;
@@ -1,22 +1,5 @@
1
1
  import React from 'react';
2
- export type StepStatus = 'upcoming' | 'current' | 'processed';
3
- export type StepperSize = 'sm' | 'md';
4
- export interface Step {
5
- id: string | number;
6
- label?: string;
7
- description?: string;
8
- icon?: React.ReactNode;
9
- }
10
- export interface HorizontalStepperProps {
11
- steps: Step[];
12
- activeStep: number;
13
- size?: StepperSize;
14
- className?: string;
15
- onStepClick?: (index: number) => void;
16
- processedIcon?: React.ReactNode;
17
- currentIcon?: React.ReactNode;
18
- color?: string;
19
- showLabels?: boolean;
20
- }
21
- export declare function HorizontalStepper({ steps, activeStep, size, className, onStepClick, processedIcon, currentIcon, color, showLabels, }: HorizontalStepperProps): React.JSX.Element;
2
+ import { HorizontalStepperProps } from './types';
3
+ export declare function HorizontalStepper(props: HorizontalStepperProps): React.JSX.Element;
22
4
  export default HorizontalStepper;
5
+ export type { Step, StepStatus, StepperSize, HorizontalStepperProps, HorizontalStepperVariant, HorizontalStepperColor, StandardHorizontalStepperProps, NavbarHorizontalStepperProps, } from './types';
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ export type StepStatus = 'upcoming' | 'current' | 'processed';
3
+ export type StepperSize = 'sm' | 'md';
4
+ export interface Step {
5
+ id: string | number;
6
+ label?: string;
7
+ description?: string;
8
+ icon?: React.ReactNode;
9
+ disabled?: boolean;
10
+ }
11
+ export type HorizontalStepperVariant = 'default' | 'navbar';
12
+ export type HorizontalStepperColor = 'blue' | 'green' | 'teal' | 'crayola' | 'orange' | 'red';
13
+ interface BaseHorizontalStepperProps {
14
+ steps: Step[];
15
+ activeStep: number;
16
+ className?: string;
17
+ onStepClick?: (index: number) => void;
18
+ processedIcon?: React.ReactNode;
19
+ currentIcon?: React.ReactNode;
20
+ size?: StepperSize;
21
+ showLabels?: boolean;
22
+ }
23
+ export interface StandardHorizontalStepperProps extends BaseHorizontalStepperProps {
24
+ variant?: 'default';
25
+ color?: string;
26
+ }
27
+ export interface NavbarHorizontalStepperProps extends BaseHorizontalStepperProps {
28
+ variant: 'navbar';
29
+ color?: HorizontalStepperColor;
30
+ }
31
+ export type HorizontalStepperProps = StandardHorizontalStepperProps | NavbarHorizontalStepperProps;
32
+ export {};
@@ -1,2 +1,3 @@
1
1
  export { default as HorizontalStepper } from './Horizontal';
2
2
  export { default as VerticalStepper } from './Vertical';
3
+ export type { HorizontalStepperProps, HorizontalStepperVariant, HorizontalStepperColor, StandardHorizontalStepperProps, NavbarHorizontalStepperProps, } from './Horizontal';
@@ -35,6 +35,7 @@ export { default as Tooltip } from './Tooltip';
35
35
  export { Display, P, Heading, Text, Link } from './Typography';
36
36
  export { Toaster } from './Toaster';
37
37
  export { HorizontalStepper, VerticalStepper } from './Stepper';
38
+ export type { HorizontalStepperProps, HorizontalStepperVariant, HorizontalStepperColor, StandardHorizontalStepperProps, NavbarHorizontalStepperProps, } from './Stepper';
38
39
  export { default as Window } from './Window';
39
40
  export { getRelativeTime, formatDateTime } from '../utility';
40
41
  export type { DateTimeFormatType } from '../utility';
@@ -0,0 +1,24 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import("react").ForwardRefExoticComponent<Omit<import("../../components/Button/PropInterfaceButton").ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
5
+ tags: string[];
6
+ parameters: {
7
+ layout: string;
8
+ a11y: {
9
+ test: string;
10
+ };
11
+ chromatic: {
12
+ disableSnapshot: boolean;
13
+ };
14
+ };
15
+ args: {
16
+ label: string;
17
+ onClick: import("storybook/test").Mock<(...args: any[]) => any>;
18
+ };
19
+ };
20
+ export default meta;
21
+ type Story = StoryObj<typeof meta>;
22
+ export declare const ClickCallsOnClick: Story;
23
+ export declare const DisabledDoesNotFire: Story;
24
+ export declare const KeyboardActivates: Story;
@@ -1,9 +1,128 @@
1
- import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
- import { HorizontalStepper } from '../../components/Stepper/Horizontal';
3
- declare const meta: Meta<typeof HorizontalStepper>;
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ import { HorizontalStepper } from '../../components';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof HorizontalStepper;
6
+ argTypes: {
7
+ variant: {
8
+ control: "inline-radio";
9
+ options: string[];
10
+ description: string;
11
+ table: {
12
+ defaultValue: {
13
+ summary: string;
14
+ };
15
+ };
16
+ };
17
+ steps: {
18
+ control: false;
19
+ description: string;
20
+ table: {
21
+ defaultValue: {
22
+ summary: string;
23
+ };
24
+ };
25
+ };
26
+ activeStep: {
27
+ control: {
28
+ type: "number";
29
+ min: number;
30
+ max: number;
31
+ };
32
+ description: string;
33
+ };
34
+ className: {
35
+ control: "text";
36
+ description: string;
37
+ table: {
38
+ defaultValue: {
39
+ summary: string;
40
+ };
41
+ };
42
+ };
43
+ size: {
44
+ control: "radio";
45
+ options: string[];
46
+ description: string;
47
+ table: {
48
+ defaultValue: {
49
+ summary: string;
50
+ };
51
+ };
52
+ };
53
+ color: {
54
+ control: "select";
55
+ options: string[];
56
+ description: string;
57
+ table: {
58
+ defaultValue: {
59
+ summary: string;
60
+ };
61
+ };
62
+ };
63
+ showLabels: {
64
+ control: "boolean";
65
+ description: string;
66
+ table: {
67
+ defaultValue: {
68
+ summary: string;
69
+ };
70
+ };
71
+ };
72
+ processedIcon: {
73
+ control: false;
74
+ description: string;
75
+ table: {
76
+ defaultValue: {
77
+ summary: string;
78
+ };
79
+ };
80
+ };
81
+ currentIcon: {
82
+ control: false;
83
+ description: string;
84
+ table: {
85
+ defaultValue: {
86
+ summary: string;
87
+ };
88
+ };
89
+ };
90
+ onStepClick: {
91
+ control: false;
92
+ action: string;
93
+ description: string;
94
+ table: {
95
+ type: {
96
+ summary: string;
97
+ };
98
+ };
99
+ };
100
+ };
101
+ args: {
102
+ variant: "default";
103
+ steps: {
104
+ id: string;
105
+ label: string;
106
+ }[];
107
+ activeStep: number;
108
+ };
109
+ };
4
110
  export default meta;
5
- type Story = StoryObj<typeof HorizontalStepper>;
111
+ type Story = StoryObj<typeof meta>;
6
112
  export declare const Medium: Story;
7
113
  export declare const Small: Story;
8
114
  export declare const Interactive: Story;
9
115
  export declare const InteractiveCustomIcon: Story;
116
+ export declare const Default: Story;
117
+ export declare const Basic: Story;
118
+ export declare const DefaultVariant: Story;
119
+ export declare const WithColor: Story;
120
+ export declare const WithoutLabels: Story;
121
+ export declare const Navbar: Story;
122
+ export declare const NavbarWithColor: Story;
123
+ export declare const NavbarWithIcons: Story;
124
+ export declare const NavbarWithDisabledSteps: Story;
125
+ export declare const NavbarStatic: Story;
126
+ export declare const NavbarLongLabels: Story;
127
+ export declare const NavbarSimulation: Story;
128
+ export declare const NavbarLockedStepsSimulation: Story;
@@ -0,0 +1,49 @@
1
+ import type { StoryObj } from '@storybook/react-webpack5';
2
+ import { HorizontalStepper } from '../../components';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof HorizontalStepper;
6
+ tags: string[];
7
+ parameters: {
8
+ a11y: {
9
+ test: string;
10
+ };
11
+ chromatic: {
12
+ disableSnapshot: boolean;
13
+ };
14
+ };
15
+ args: {
16
+ variant: "default";
17
+ steps: {
18
+ id: string;
19
+ label: string;
20
+ }[];
21
+ activeStep: number;
22
+ onStepClick: import("storybook/test").Mock<(...args: any[]) => any>;
23
+ };
24
+ };
25
+ export default meta;
26
+ type Story = StoryObj<typeof meta>;
27
+ export declare const DefaultVariantMatchesOmittedVariant: Story;
28
+ export declare const InvalidVariantFallsBackToDefault: Story;
29
+ export declare const NavbarStructure: Story;
30
+ export declare const NavbarClickCallsOnStepClick: Story;
31
+ export declare const NavbarKeyboardActivates: Story;
32
+ export declare const NavbarCurrentStepNotClickable: Story;
33
+ export declare const NavbarDisabledStepsBlockClicks: Story;
34
+ export declare const NavbarCurrentStepIgnoresDisabled: Story;
35
+ export declare const NavbarStaticNoButtons: Story;
36
+ export declare const NavbarIgnoresSizeAndShowLabels: Story;
37
+ export declare const NavbarSimulationClickMovesActiveStep: Story;
38
+ export declare const NavbarLockedStepsSimulationFlow: Story;
39
+ export declare const NavbarEmpty: Story;
40
+ export declare const NavbarOutOfRange: Story;
41
+ export declare const NavbarManySteps: Story;
42
+ export declare const NavbarClassName: Story;
43
+ export declare const StandardIgnoresDisabled: Story;
44
+ export declare const NavbarColorAppliesToCircles: Story;
45
+ export declare const NavbarDefaultColorIsWhite: Story;
46
+ export declare const NavbarColorDisabledIgnoresColor: Story;
47
+ export declare const NavbarInvalidColor: Story;
48
+ export declare const NavbarIcons: Story;
49
+ export declare const NavbarCurrentShowsNumberWithoutIcon: Story;
package/dist/index.d.ts CHANGED
@@ -407,7 +407,7 @@ declare const TagLabelInput: <T extends TagValue = TagValue>(props: TagLabelInpu
407
407
 
408
408
  interface CheckboxProps extends Omit<ComponentPropsWithoutRef<'input'>, 'size'> {
409
409
  label?: string;
410
- size?: 'md' | 'sm';
410
+ size?: 'md' | 'sm' | 'tn';
411
411
  checked?: boolean;
412
412
  id?: string;
413
413
  onClick?: (event: React__default.MouseEvent<HTMLInputElement>) => void;
@@ -932,19 +932,31 @@ interface Step {
932
932
  label?: string;
933
933
  description?: string;
934
934
  icon?: React__default.ReactNode;
935
+ disabled?: boolean;
935
936
  }
936
- interface HorizontalStepperProps {
937
+ type HorizontalStepperVariant = 'default' | 'navbar';
938
+ type HorizontalStepperColor = 'blue' | 'green' | 'teal' | 'crayola' | 'orange' | 'red';
939
+ interface BaseHorizontalStepperProps {
937
940
  steps: Step[];
938
941
  activeStep: number;
939
- size?: StepperSize;
940
942
  className?: string;
941
943
  onStepClick?: (index: number) => void;
942
944
  processedIcon?: React__default.ReactNode;
943
945
  currentIcon?: React__default.ReactNode;
944
- color?: string;
946
+ size?: StepperSize;
945
947
  showLabels?: boolean;
946
948
  }
947
- declare function HorizontalStepper({ steps, activeStep, size, className, onStepClick, processedIcon, currentIcon, color, showLabels, }: HorizontalStepperProps): React__default.JSX.Element;
949
+ interface StandardHorizontalStepperProps extends BaseHorizontalStepperProps {
950
+ variant?: 'default';
951
+ color?: string;
952
+ }
953
+ interface NavbarHorizontalStepperProps extends BaseHorizontalStepperProps {
954
+ variant: 'navbar';
955
+ color?: HorizontalStepperColor;
956
+ }
957
+ type HorizontalStepperProps = StandardHorizontalStepperProps | NavbarHorizontalStepperProps;
958
+
959
+ declare function HorizontalStepper(props: HorizontalStepperProps): React__default.JSX.Element;
948
960
 
949
961
  interface StepperItemProps {
950
962
  onClick?: () => void;
@@ -1046,4 +1058,4 @@ declare const useTableDataHandler: (initialData: any[], options?: UseTableDataOp
1046
1058
  };
1047
1059
 
1048
1060
  export { Accordions, Alert, Avatar, AlertRoundedSquare as BCAlertRoundedSquare, CubeHeader as BCCubeHeader, Discrepancy as BCDiscrepancy, ExposedPort as BCExposedPort, FQAnalytical as BCFQAnalytical, FQGetaway as BCFQGetaway, FQModeler as BCFQModeler, FQOperation as BCFQOperation, FQWelldone as BCFQWelldone, Flowqount as BCFlowqount, Inlet as BCInlet, Legend as BCLegend, ModalBalance as BCModalBalance, Neutral as BCNeutral, Node as BCNode, Outlet as BCOutlet, Port as BCPort, Rhombus as BCRhombus, SelectAllAdd as BCSelectAllAdd, SelectAllRemove as BCSelectAllRemove, Spinner$1 as BCSpinner, Stack as BCStack, Unlinked as BCUnlinked, VirtualPort as BCVirtualPort, Badge, Banner, BlockLoading, Brand, Breadcrumb, Button, ButtonApp, Card, Checkbox, Color, ContextualButton, Countdown, DatePicker, Display, Divider, DropdownContainer, DropdownItem, DropzoneFileUploader, EmptyTable, FileTree, FormGroup, FormGroupButton, FormGroupLabel, FormLabel, Heading, HorizontalStepper, InfoPanel, Link, LiveSearch, MenuContainer, MenuItem, Modal, MonospaceBadge, Notification, P, PaginationBar, PickerCalendar, Pills, Popover, ProgressBar, ProgressCircle, Radio, ResizeableDiv, SegmentButtonGroup, SegmentButtonItem, SelectInput, SidebarContainer, SidebarItem, SidebarMenu, SidebarProfile, SimpleFileUploader, Slider, Spinner, Tab, TabMenu, Table, TableBody, TableCell, TableFooterController, TableHead, TableHeaderController, TableRow, TableSearchInput, TagLabel, TagLabelInput, Text, TextArea, TextInput, Toaster, Toggle, Tooltip, TreeItem, StepperItem as VerticalStepper, Window, YearPicker, formatDateTime, getRelativeTime, useFileTree, useTableDataHandler };
1049
- export type { DateTimeFormatType };
1061
+ export type { DateTimeFormatType, HorizontalStepperColor, HorizontalStepperProps, HorizontalStepperVariant, NavbarHorizontalStepperProps, StandardHorizontalStepperProps };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "@biaenergi:registry": "https://gitlab.com/api/v4/projects/50905269/packages/npm/"
5
5
  },
6
- "version": "2.14.0-beta.2",
6
+ "version": "2.14.0-beta.4",
7
7
  "description": "Design Language System develop by BIAENERGI",
8
8
  "repository": {
9
9
  "type": "git",
@@ -21,7 +21,11 @@
21
21
  "release": "standard-version",
22
22
  "release:alpha": "node scripts/release.js alpha",
23
23
  "release:beta": "node scripts/release.js beta",
24
- "release:stable": "node scripts/release.js"
24
+ "release:stable": "node scripts/release.js",
25
+ "test-storybook": "test-storybook",
26
+ "test-storybook:static": "concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" -P \"http-server storybook-static -a 127.0.0.1 -p 6006 -s -c-1\" \"wait-on tcp:127.0.0.1:6006 && test-storybook --url http://127.0.0.1:6006 --index-json --maxWorkers=2 {@}\" --",
27
+ "dls:check": "node scripts/dls-check.mjs",
28
+ "dls:publish": "node scripts/dls-publish.mjs"
25
29
  },
26
30
  "lint-staged": {
27
31
  "src/components/**/*.{ts,tsx,js,jsx}": [
@@ -76,17 +80,20 @@
76
80
  "@rollup/plugin-node-resolve": "^15.2.1",
77
81
  "@rollup/plugin-typescript": "^11.1.4",
78
82
  "@rollup/plugin-url": "^8.0.2",
83
+ "@storybook/addon-a11y": "^10.4.2",
79
84
  "@storybook/addon-docs": "^10.4.2",
80
85
  "@storybook/addon-links": "^10.4.2",
81
86
  "@storybook/addon-onboarding": "^10.4.2",
82
- "@storybook/addon-styling-webpack": "^1.0.0",
87
+ "@storybook/addon-styling-webpack": "^3.0.2",
83
88
  "@storybook/addon-webpack5-compiler-swc": "^4.0.3",
84
89
  "@storybook/react-webpack5": "^10.4.2",
90
+ "@storybook/test-runner": "^0.24.5",
85
91
  "@types/react": "^18.2.24",
86
92
  "@typescript-eslint/eslint-plugin": "^7.13.1",
87
93
  "@typescript-eslint/parser": "^7.13.1",
88
94
  "autoprefixer": "^10.4.19",
89
95
  "chromatic": "^11.5.3",
96
+ "concurrently": "^10.0.5",
90
97
  "css-loader": "^7.1.2",
91
98
  "dotenv-cli": "^11.0.0",
92
99
  "eslint": "^8.57.0",
@@ -102,8 +109,10 @@
102
109
  "eslint-plugin-react-hooks": "^4.3.0",
103
110
  "eslint-plugin-storybook": "10.4.2",
104
111
  "globals": "^15.6.0",
112
+ "http-server": "^14.1.1",
105
113
  "husky": "^9.0.11",
106
114
  "lint-staged": "^16.4.0",
115
+ "playwright": "^1.63.0",
107
116
  "postcss": "^8.4.31",
108
117
  "postcss-loader": "^8.1.1",
109
118
  "postcss-url": "^10.1.3",
@@ -127,6 +136,7 @@
127
136
  "typescript": "^5.2.2",
128
137
  "typescript-eslint": "^7.13.1",
129
138
  "url-loader": "^4.1.1",
139
+ "wait-on": "^9.1.0",
130
140
  "webpack": "^5.88.2"
131
141
  },
132
142
  "main": "dist/cjs/index.js",