bianic-ui 2.9.0 → 2.10.0-alpha.0

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.
@@ -1,6 +1,7 @@
1
1
  declare const config: {
2
- 'dark-background': string;
3
- 'light-background': string;
4
- 'outline-light-background': string;
2
+ readonly 'dark-background': "bg-white enabled:hover:bg-bia-grey-light-90 outline-none focus-visible:outline-2 focus-visible:outline-bia-blue-light-50 enabled:active:bg-bia-grey-light-80";
3
+ readonly 'light-background': "bg-bia-grey-light-90 enabled:hover:bg-bia-grey-light-80 outline-none focus-visible:outline-2 focus-visible:outline-bia-blue-light-50 enabled:active:bg-bia-grey-light-70";
4
+ readonly 'outline-light-background': "bg-white border border-bia-grey-light-40 enabled:hover:bg-bia-grey-light-90 outline-none focus-visible:outline-2 focus-visible:outline-bia-blue-light-50 enabled:active:bg-bia-grey-light-80";
5
5
  };
6
+ export type CardVariant = keyof typeof config;
6
7
  export default config;
@@ -1,8 +1,8 @@
1
- import React from 'react';
2
- import config from './config';
3
- declare const Card: ({ children, disabled, variant, }: {
1
+ import React, { ComponentPropsWithoutRef } from 'react';
2
+ import { CardVariant } from './config';
3
+ export interface CardProps extends ComponentPropsWithoutRef<'button'> {
4
4
  children: React.ReactNode;
5
- disabled?: boolean | undefined;
6
- variant?: "dark-background" | "light-background" | "outline-light-background" | undefined;
7
- }) => React.JSX.Element;
5
+ variant?: CardVariant;
6
+ }
7
+ declare const Card: ({ children, disabled, variant, className, type, ...rest }: CardProps) => React.JSX.Element;
8
8
  export default Card;
@@ -1,10 +1,14 @@
1
- import React, { ComponentPropsWithoutRef } from 'react';
1
+ import React from 'react';
2
+ import type { ComponentPropsWithoutRef, MouseEvent } from 'react';
3
+ import type { TabMenuVariant, TabMenuRounded } from './configs';
2
4
  export interface TabMenuProps extends ComponentPropsWithoutRef<'div'> {
3
- variant?: 'default' | 'alternative';
4
- rounded?: 'none' | 'all' | 'top' | 'right' | 'left';
5
+ variant?: TabMenuVariant;
6
+ rounded?: TabMenuRounded;
5
7
  text?: string;
6
- onClose?: () => void;
7
8
  isActive?: boolean;
9
+ moreCount?: number;
10
+ onClose?: () => void;
11
+ onClickMore?: (e: MouseEvent<HTMLButtonElement>) => void;
8
12
  }
9
- declare const TabMenu: ({ variant, text, rounded, isActive, onClose, ...rest }: TabMenuProps) => React.JSX.Element;
13
+ declare const TabMenu: React.ForwardRefExoticComponent<TabMenuProps & React.RefAttributes<HTMLDivElement>>;
10
14
  export default TabMenu;
@@ -1,31 +1,10 @@
1
- export declare const radiusConfig: {
2
- none: string;
3
- all: string;
4
- top: string;
5
- right: string;
6
- left: string;
7
- };
8
- export declare const variantConfig: {
9
- default: string;
10
- alternative: string;
11
- };
12
- export declare const defaultConfigs: {
13
- true: string;
14
- false: string;
15
- };
16
- export declare const defaultButtonConfigs: {
17
- true: string;
18
- false: string;
19
- };
20
- export declare const alternativeConfigs: {
21
- true: string;
22
- false: string;
23
- };
24
- export declare const alternativeButtonConfigs: {
25
- true: string;
26
- false: string;
27
- };
28
- export declare const actionButtonConfig: {
29
- true: string;
30
- false: string;
31
- };
1
+ export type ComponentStateKey = 'active' | 'inactive';
2
+ export type TabMenuVariant = 'default' | 'alternative' | 'alternative-more';
3
+ export type TabMenuRounded = 'none' | 'all' | 'top' | 'right' | 'left';
4
+ export declare const radiusConfig: Record<TabMenuRounded, string>;
5
+ export declare const variantConfig: Record<TabMenuVariant, string>;
6
+ export declare const defaultConfigs: Record<ComponentStateKey, string>;
7
+ export declare const alternativeConfigs: Record<ComponentStateKey, string>;
8
+ export declare const defaultButtonConfigs: Record<ComponentStateKey, string>;
9
+ export declare const alternativeButtonConfigs: Record<ComponentStateKey, string>;
10
+ export declare const actionButtonConfig: Record<ComponentStateKey, string>;
@@ -2,11 +2,7 @@
2
2
  import type { StoryObj } from '@storybook/react';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: ({ children, disabled, variant, }: {
6
- children: import("react").ReactNode;
7
- disabled?: boolean | undefined;
8
- variant?: "dark-background" | "light-background" | "outline-light-background" | undefined;
9
- }) => import("react").JSX.Element;
5
+ component: ({ children, disabled, variant, className, type, ...rest }: import("../../components/Card").CardProps) => import("react").JSX.Element;
10
6
  parameters: {
11
7
  layout: string;
12
8
  };
@@ -2,7 +2,7 @@
2
2
  import type { StoryObj } from '@storybook/react/*';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: ({ variant, text, rounded, isActive, onClose, ...rest }: import("../../components/TabMenu/TabMenu").TabMenuProps) => import("react").JSX.Element;
5
+ component: import("react").ForwardRefExoticComponent<import("../../components/TabMenu/TabMenu").TabMenuProps & import("react").RefAttributes<HTMLDivElement>>;
6
6
  parameters: {
7
7
  layout: string;
8
8
  };
package/dist/index.d.ts CHANGED
@@ -130,11 +130,18 @@ interface ContextualButtonProps extends ComponentPropsWithoutRef<'button'> {
130
130
  }
131
131
  declare const ContextualButton: React$1.ForwardRefExoticComponent<ContextualButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
132
132
 
133
- declare const Card: ({ children, disabled, variant, }: {
133
+ declare const config: {
134
+ readonly 'dark-background': "bg-white enabled:hover:bg-bia-grey-light-90 outline-none focus-visible:outline-2 focus-visible:outline-bia-blue-light-50 enabled:active:bg-bia-grey-light-80";
135
+ readonly 'light-background': "bg-bia-grey-light-90 enabled:hover:bg-bia-grey-light-80 outline-none focus-visible:outline-2 focus-visible:outline-bia-blue-light-50 enabled:active:bg-bia-grey-light-70";
136
+ readonly 'outline-light-background': "bg-white border border-bia-grey-light-40 enabled:hover:bg-bia-grey-light-90 outline-none focus-visible:outline-2 focus-visible:outline-bia-blue-light-50 enabled:active:bg-bia-grey-light-80";
137
+ };
138
+ type CardVariant = keyof typeof config;
139
+
140
+ interface CardProps extends ComponentPropsWithoutRef<'button'> {
134
141
  children: React$1.ReactNode;
135
- disabled?: boolean | undefined;
136
- variant?: "dark-background" | "light-background" | "outline-light-background" | undefined;
137
- }) => React$1.JSX.Element;
142
+ variant?: CardVariant;
143
+ }
144
+ declare const Card: ({ children, disabled, variant, className, type, ...rest }: CardProps) => React$1.JSX.Element;
138
145
 
139
146
  declare function Color(): React$1.JSX.Element;
140
147
 
@@ -722,14 +729,19 @@ interface TabProps extends ComponentPropsWithoutRef<'button'> {
722
729
  }
723
730
  declare function Tab({ children, active, icon, disabled, mode, fit, size, className, ...rest }: TabProps): React$1.JSX.Element;
724
731
 
732
+ type TabMenuVariant = 'default' | 'alternative' | 'alternative-more';
733
+ type TabMenuRounded = 'none' | 'all' | 'top' | 'right' | 'left';
734
+
725
735
  interface TabMenuProps extends ComponentPropsWithoutRef<'div'> {
726
- variant?: 'default' | 'alternative';
727
- rounded?: 'none' | 'all' | 'top' | 'right' | 'left';
736
+ variant?: TabMenuVariant;
737
+ rounded?: TabMenuRounded;
728
738
  text?: string;
729
- onClose?: () => void;
730
739
  isActive?: boolean;
740
+ moreCount?: number;
741
+ onClose?: () => void;
742
+ onClickMore?: (e: MouseEvent<HTMLButtonElement>) => void;
731
743
  }
732
- declare const TabMenu: ({ variant, text, rounded, isActive, onClose, ...rest }: TabMenuProps) => React$1.JSX.Element;
744
+ declare const TabMenu: React$1.ForwardRefExoticComponent<TabMenuProps & React$1.RefAttributes<HTMLDivElement>>;
733
745
 
734
746
  interface TableCellProps extends ComponentPropsWithoutRef<'td'> {
735
747
  variant?: 'head' | 'body';
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.9.0",
6
+ "version": "2.10.0-alpha.0",
7
7
  "description": "Design Language System develop by BIAENERGI",
8
8
  "repository": {
9
9
  "type": "git",