bianic-ui 1.2.0-beta → 1.3.0-beta.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/cjs/index.js +34 -18
- package/dist/cjs/lib.css +1 -1
- package/dist/cjs/types/components/Button/ContextualButton/ContextualButton.d.ts +2 -1
- package/dist/cjs/types/components/Button/ContextualButton/config.d.ts +4 -0
- package/dist/cjs/types/components/Forms/TextArea/Simulation.d.ts +11 -0
- package/dist/cjs/types/components/Forms/TextArea/index.d.ts +5 -1
- package/dist/cjs/types/components/Forms/TextInput/index.d.ts +2 -1
- package/dist/cjs/types/stories/Form/{TextArea.stories.d.ts → TextArea/TextArea.stories.d.ts} +1 -1
- package/dist/cjs/types/stories/Form/TextArea/TextAreaSimulation.stories.d.ts +14 -0
- package/dist/esm/index.js +34 -18
- package/dist/esm/lib.css +1 -1
- package/dist/esm/types/components/Button/ContextualButton/ContextualButton.d.ts +2 -1
- package/dist/esm/types/components/Button/ContextualButton/config.d.ts +4 -0
- package/dist/esm/types/components/Forms/TextArea/Simulation.d.ts +11 -0
- package/dist/esm/types/components/Forms/TextArea/index.d.ts +5 -1
- package/dist/esm/types/components/Forms/TextInput/index.d.ts +2 -1
- package/dist/esm/types/stories/Form/{TextArea.stories.d.ts → TextArea/TextArea.stories.d.ts} +1 -1
- package/dist/esm/types/stories/Form/TextArea/TextAreaSimulation.stories.d.ts +14 -0
- package/dist/index.d.ts +7 -2
- package/package.json +1 -1
- package/tailwind.config.js +5 -14
|
@@ -4,6 +4,7 @@ interface ContextualButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
4
4
|
variant?: 'dark' | 'light' | undefined;
|
|
5
5
|
icon?: React.ReactNode;
|
|
6
6
|
isNotified?: boolean;
|
|
7
|
+
isSelected?: boolean;
|
|
7
8
|
}
|
|
8
|
-
declare const ContextualButton: ({ label, icon, variant, disabled, isNotified, ...props }: ContextualButtonProps) => React.JSX.Element;
|
|
9
|
+
declare const ContextualButton: ({ label, icon, variant, disabled, isNotified, isSelected, ...props }: ContextualButtonProps) => React.JSX.Element;
|
|
9
10
|
export default ContextualButton;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface TextAreaSimulationProps {
|
|
3
|
+
size?: 'md' | 'sm';
|
|
4
|
+
}
|
|
5
|
+
declare function TextAreaSimulation({ size }: TextAreaSimulationProps): React.JSX.Element;
|
|
6
|
+
declare namespace TextAreaSimulation {
|
|
7
|
+
var defaultProps: {
|
|
8
|
+
size: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export default TextAreaSimulation;
|
|
@@ -8,8 +8,10 @@ export interface TextAreaProps extends ComponentPropsWithoutRef<'textarea'> {
|
|
|
8
8
|
placeholder?: string;
|
|
9
9
|
required?: boolean;
|
|
10
10
|
rows?: number;
|
|
11
|
+
maxLength?: number;
|
|
12
|
+
value?: string;
|
|
11
13
|
}
|
|
12
|
-
declare function TextArea({ descText, disabled, id, size, label, placeholder, required, rows, ...props }: TextAreaProps): React.JSX.Element;
|
|
14
|
+
declare function TextArea({ descText, disabled, id, size, label, placeholder, required, rows, maxLength, value, ...props }: TextAreaProps): React.JSX.Element;
|
|
13
15
|
declare namespace TextArea {
|
|
14
16
|
var defaultProps: {
|
|
15
17
|
disabled: boolean;
|
|
@@ -20,6 +22,8 @@ declare namespace TextArea {
|
|
|
20
22
|
placeholder: string;
|
|
21
23
|
required: boolean;
|
|
22
24
|
rows: number;
|
|
25
|
+
maxLength: undefined;
|
|
26
|
+
value: string;
|
|
23
27
|
};
|
|
24
28
|
}
|
|
25
29
|
export default TextArea;
|
|
@@ -12,8 +12,9 @@ interface TextInputProps extends Omit<ComponentPropsWithoutRef<'input'>, 'size'>
|
|
|
12
12
|
variant?: 'password' | 'text' | 'number' | 'date';
|
|
13
13
|
value?: string;
|
|
14
14
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
+
maxLength?: number;
|
|
15
16
|
}
|
|
16
|
-
declare function TextInput({ descText, disabled, icon, id, size, isValid, label, placeholder, readOnly, required, variant, value, onChange, ...props }: TextInputProps): React.JSX.Element;
|
|
17
|
+
declare function TextInput({ descText, disabled, icon, id, size, isValid, label, placeholder, readOnly, required, variant, value, onChange, maxLength, ...props }: TextInputProps): React.JSX.Element;
|
|
17
18
|
declare namespace TextInput {
|
|
18
19
|
var defaultProps: {
|
|
19
20
|
descText: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import TextAreaSimulation from '../../../components/Forms/TextArea/Simulation';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof TextAreaSimulation;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
args: {};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Simulation: Story;
|
package/dist/index.d.ts
CHANGED
|
@@ -149,8 +149,9 @@ interface TextInputProps extends Omit<ComponentPropsWithoutRef<'input'>, 'size'>
|
|
|
149
149
|
variant?: 'password' | 'text' | 'number' | 'date';
|
|
150
150
|
value?: string;
|
|
151
151
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
152
|
+
maxLength?: number;
|
|
152
153
|
}
|
|
153
|
-
declare function TextInput({ descText, disabled, icon, id, size, isValid, label, placeholder, readOnly, required, variant, value, onChange, ...props }: TextInputProps): React.JSX.Element;
|
|
154
|
+
declare function TextInput({ descText, disabled, icon, id, size, isValid, label, placeholder, readOnly, required, variant, value, onChange, maxLength, ...props }: TextInputProps): React.JSX.Element;
|
|
154
155
|
declare namespace TextInput {
|
|
155
156
|
var defaultProps: {
|
|
156
157
|
descText: string;
|
|
@@ -197,8 +198,10 @@ interface TextAreaProps extends ComponentPropsWithoutRef<'textarea'> {
|
|
|
197
198
|
placeholder?: string;
|
|
198
199
|
required?: boolean;
|
|
199
200
|
rows?: number;
|
|
201
|
+
maxLength?: number;
|
|
202
|
+
value?: string;
|
|
200
203
|
}
|
|
201
|
-
declare function TextArea({ descText, disabled, id, size, label, placeholder, required, rows, ...props }: TextAreaProps): React.JSX.Element;
|
|
204
|
+
declare function TextArea({ descText, disabled, id, size, label, placeholder, required, rows, maxLength, value, ...props }: TextAreaProps): React.JSX.Element;
|
|
202
205
|
declare namespace TextArea {
|
|
203
206
|
var defaultProps: {
|
|
204
207
|
disabled: boolean;
|
|
@@ -209,6 +212,8 @@ declare namespace TextArea {
|
|
|
209
212
|
placeholder: string;
|
|
210
213
|
required: boolean;
|
|
211
214
|
rows: number;
|
|
215
|
+
maxLength: undefined;
|
|
216
|
+
value: string;
|
|
212
217
|
};
|
|
213
218
|
}
|
|
214
219
|
|
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": "1.
|
|
6
|
+
"version": "1.3.0-beta.1",
|
|
7
7
|
"description": "Design Language System develop by BIAENERGI",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"rollup": "rollup -c",
|
package/tailwind.config.js
CHANGED
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
/** @type {import('tailwindcss').Config} */
|
|
2
|
-
const colors = require('tailwindcss/colors')
|
|
2
|
+
const colors = require('tailwindcss/colors');
|
|
3
3
|
|
|
4
4
|
module.exports = {
|
|
5
5
|
content: ['./src/**/*.{js,ts,jsx,tsx}', './dist/**/*.{js,ts,jsx,tsx}'],
|
|
6
6
|
safelist: [
|
|
7
|
-
{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
pattern: /^text-/,
|
|
13
|
-
variants: ['hover', 'focus', 'active'],
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
pattern: /^border-/,
|
|
17
|
-
variants: ['hover', 'focus', 'active'],
|
|
18
|
-
},
|
|
7
|
+
{ pattern: /^bg-/ }, // Memastikan semua class background tetap ada
|
|
8
|
+
{ pattern: /^text-/ }, // Memastikan semua class text tetap ada
|
|
9
|
+
{ pattern: /^border-/ }, // Memastikan semua border tetap ada
|
|
19
10
|
],
|
|
20
11
|
theme: {
|
|
21
12
|
colors: {
|
|
@@ -548,4 +539,4 @@ module.exports = {
|
|
|
548
539
|
},
|
|
549
540
|
},
|
|
550
541
|
plugins: [],
|
|
551
|
-
}
|
|
542
|
+
};
|