@agility/plenum-ui 2.0.0-rc3 → 2.0.0-rc5
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/README.md +1 -1
- package/dist/index.d.ts +72 -2
- package/dist/index.js +196 -69
- package/dist/index.js.map +4 -4
- package/dist/lib/tailwind.css +63510 -0
- package/dist/types/stories/molecules/inputs/InputCounter/InputCounter.d.ts +10 -0
- package/dist/types/stories/molecules/inputs/InputCounter/index.d.ts +2 -0
- package/dist/types/stories/molecules/inputs/InputField/InputField.d.ts +2 -0
- package/dist/types/stories/molecules/inputs/TextInput/TextInput.d.ts +39 -0
- package/dist/types/stories/molecules/inputs/TextInput/index.d.ts +4 -0
- package/dist/types/stories/molecules/inputs/index.d.ts +3 -2
- package/package.json +2 -2
- package/stories/Introduction.mdx +1 -1
- package/stories/molecules/inputs/InputCounter/InputCounter.stories.tsx +18 -0
- package/stories/molecules/inputs/InputCounter/InputCounter.tsx +24 -0
- package/stories/molecules/inputs/InputCounter/index.tsx +3 -0
- package/stories/molecules/inputs/InputField/InputField.tsx +6 -1
- package/stories/molecules/inputs/TextInput/TextInput.stories.tsx +32 -0
- package/stories/molecules/inputs/TextInput/TextInput.tsx +162 -0
- package/stories/molecules/inputs/TextInput/index.tsx +5 -0
- package/stories/molecules/inputs/index.ts +14 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ In your app entry point (i.e. \`_app.tsx\`), import the \`globals.css\` file fro
|
|
|
27
27
|
|
|
28
28
|
```jsx
|
|
29
29
|
import "<RELATIVE_PATH>/globals.css";
|
|
30
|
-
import "@agility/plenum-ui/lib/tailwind.css";
|
|
30
|
+
import "@agility/plenum-ui/dist/lib/tailwind.css";
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
Make sure to add any additional styles before these two import statements to prevent overwriting the Plenum styling.
|
package/dist/index.d.ts
CHANGED
|
@@ -415,6 +415,24 @@ declare module '@agility/plenum-ui/stories/molecules/index' {
|
|
|
415
415
|
export type { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextAreaFieldProps, IToggleSwitchProps, AcceptedInputTypes };
|
|
416
416
|
export { Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, TextAreaField, ToggleSwitch };
|
|
417
417
|
|
|
418
|
+
}
|
|
419
|
+
declare module '@agility/plenum-ui/stories/molecules/inputs/InputCounter/InputCounter' {
|
|
420
|
+
import { FC } from "react";
|
|
421
|
+
export interface IInputCounterProps {
|
|
422
|
+
/** Counter limit */
|
|
423
|
+
limit: number | undefined;
|
|
424
|
+
/** Counter current number */
|
|
425
|
+
current: number;
|
|
426
|
+
}
|
|
427
|
+
/** Primary UI component for user interaction */
|
|
428
|
+
const InputCounter: FC<IInputCounterProps>;
|
|
429
|
+
export default InputCounter;
|
|
430
|
+
|
|
431
|
+
}
|
|
432
|
+
declare module '@agility/plenum-ui/stories/molecules/inputs/InputCounter/index' {
|
|
433
|
+
export { default } from '@agility/plenum-ui/stories/molecules/inputs/InputCounter/InputCounter';
|
|
434
|
+
export * from '@agility/plenum-ui/stories/molecules/inputs/InputCounter/InputCounter';
|
|
435
|
+
|
|
418
436
|
}
|
|
419
437
|
declare module '@agility/plenum-ui/stories/molecules/inputs/InputField/InputField' {
|
|
420
438
|
import React from "react";
|
|
@@ -442,6 +460,8 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/InputField/InputFiel
|
|
|
442
460
|
required?: boolean;
|
|
443
461
|
/** use input psuedo classes for :valid and :invalid styles. on by default */
|
|
444
462
|
clientSideCheck?: boolean;
|
|
463
|
+
/**ref for input */
|
|
464
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
445
465
|
}
|
|
446
466
|
const InputField: React.FC<IInputFieldProps>;
|
|
447
467
|
export default InputField;
|
|
@@ -502,6 +522,55 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/NestedInputButton/in
|
|
|
502
522
|
export type { INestedInputButtonProps };
|
|
503
523
|
export default NestedInputButton;
|
|
504
524
|
|
|
525
|
+
}
|
|
526
|
+
declare module '@agility/plenum-ui/stories/molecules/inputs/TextInput/TextInput' {
|
|
527
|
+
import React from "react";
|
|
528
|
+
import { AcceptedInputTypes } from "@agility/plenum-ui/stories/molecules/inputs/InputField/index";
|
|
529
|
+
export interface ITextInputProps {
|
|
530
|
+
/** Input type*/
|
|
531
|
+
type: AcceptedInputTypes;
|
|
532
|
+
/** Input ID */
|
|
533
|
+
id?: string;
|
|
534
|
+
/** Input Name */
|
|
535
|
+
name?: string;
|
|
536
|
+
/** Label for the input */
|
|
537
|
+
label?: string;
|
|
538
|
+
/** Force the focus state on the input */
|
|
539
|
+
isFocused?: boolean;
|
|
540
|
+
/** Error state */
|
|
541
|
+
isError?: boolean;
|
|
542
|
+
/** If field is required */
|
|
543
|
+
isRequired?: boolean;
|
|
544
|
+
/** Disabled state */
|
|
545
|
+
isDisabled?: boolean;
|
|
546
|
+
/** Readonly state */
|
|
547
|
+
isReadonly?: boolean;
|
|
548
|
+
/** Set default value */
|
|
549
|
+
defaultValue?: string;
|
|
550
|
+
/** Message shown under the text field */
|
|
551
|
+
message?: string;
|
|
552
|
+
/** Input character counter */
|
|
553
|
+
isShowCounter?: boolean;
|
|
554
|
+
/** Max length of input character */
|
|
555
|
+
maxLength?: number;
|
|
556
|
+
/** Callback on change */
|
|
557
|
+
onChange(value: string): void;
|
|
558
|
+
/** input value */
|
|
559
|
+
value: string;
|
|
560
|
+
/**Placeholder input text*/
|
|
561
|
+
placeholder?: string;
|
|
562
|
+
className?: string;
|
|
563
|
+
}
|
|
564
|
+
const _TextInput: React.ForwardRefExoticComponent<ITextInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
565
|
+
export default _TextInput;
|
|
566
|
+
|
|
567
|
+
}
|
|
568
|
+
declare module '@agility/plenum-ui/stories/molecules/inputs/TextInput/index' {
|
|
569
|
+
import TextInput from "@agility/plenum-ui/stories/molecules/inputs/TextInput/TextInput";
|
|
570
|
+
import { ITextInputProps } from "@agility/plenum-ui/stories/molecules/inputs/TextInput/TextInput";
|
|
571
|
+
export type { ITextInputProps };
|
|
572
|
+
export default TextInput;
|
|
573
|
+
|
|
505
574
|
}
|
|
506
575
|
declare module '@agility/plenum-ui/stories/molecules/inputs/checkbox/Checkbox' {
|
|
507
576
|
import { FC } from "react";
|
|
@@ -610,9 +679,10 @@ declare module '@agility/plenum-ui/stories/molecules/inputs/index' {
|
|
|
610
679
|
import Radio, { IRadioProps } from "@agility/plenum-ui/stories/molecules/inputs/radio/index";
|
|
611
680
|
import Select, { ISelectProps } from "@agility/plenum-ui/stories/molecules/inputs/select/index";
|
|
612
681
|
import TextAreaField, { ITextAreaFieldProps } from "@agility/plenum-ui/stories/molecules/inputs/textArea/index";
|
|
682
|
+
import TextInput, { ITextInputProps } from "@agility/plenum-ui/stories/molecules/inputs/TextInput/index";
|
|
613
683
|
import ToggleSwitch, { IToggleSwitchProps } from "@agility/plenum-ui/stories/molecules/inputs/toggleSwitch/index";
|
|
614
|
-
export type { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextAreaFieldProps, IToggleSwitchProps, AcceptedInputTypes };
|
|
615
|
-
export { Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, TextAreaField, ToggleSwitch };
|
|
684
|
+
export type { ICheckboxProps, IComboboxProps, IInputFieldProps, IInputLabelProps, INestedInputButtonProps, IRadioProps, ISelectProps, ITextAreaFieldProps, ITextInputProps, IToggleSwitchProps, AcceptedInputTypes };
|
|
685
|
+
export { Checkbox, Combobox, InputField, InputLabel, NestedInputButton, Radio, Select, TextAreaField, ToggleSwitch, TextInput };
|
|
616
686
|
|
|
617
687
|
}
|
|
618
688
|
declare module '@agility/plenum-ui/stories/molecules/inputs/radio/Radio' {
|