@loja-integrada/admin-components 1.1.3 → 1.2.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.
- package/dist/forms/Calendar/index.js +2 -2
- package/dist/forms/InputWithUnit/InputWithUnit.client.d.ts +64 -0
- package/dist/forms/InputWithUnit/index.d.ts +1 -0
- package/dist/forms/InputWithUnit/index.js +15 -0
- package/dist/forms/index.js +3 -3
- package/dist/index.js +4 -4
- package/dist/indicators/index.js +1 -1
- package/package.json +5 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";export { a as Calendar } from '../../chunk-PHVC2M6R.js';
|
|
2
|
+
import '../../chunk-KN7DOGNL.js';
|
|
3
|
+
import '../../chunk-DTLT3DYY.js';
|
|
2
4
|
import '../../chunk-DBWOW4GL.js';
|
|
3
5
|
import '../../chunk-6W6QWPEA.js';
|
|
4
6
|
import '../../chunk-4QFFUXWM.js';
|
|
5
7
|
import '../../chunk-3BKW5XAK.js';
|
|
6
8
|
import '../../chunk-L6H2NDVS.js';
|
|
7
|
-
import '../../chunk-KN7DOGNL.js';
|
|
8
|
-
import '../../chunk-DTLT3DYY.js';
|
|
9
9
|
import '../../chunk-NW24WOHT.js';
|
|
10
10
|
import '../../chunk-SJ4MATMO.js';
|
|
11
11
|
import '../../chunk-7Z3CCBLX.js';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
import { CustomOptionProps } from '../Dropdown';
|
|
3
|
+
export declare const DEFAULT_UNITS: {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}[];
|
|
7
|
+
declare const InputWithUnit: import("react").ForwardRefExoticComponent<InputWithUnitProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
8
|
+
type InputWithUnitProps = {
|
|
9
|
+
/**
|
|
10
|
+
* Array of units to be displayed in the input.
|
|
11
|
+
* Each unit should have an id and a name.
|
|
12
|
+
* @default []
|
|
13
|
+
* */
|
|
14
|
+
units: {
|
|
15
|
+
label: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}[];
|
|
18
|
+
/**
|
|
19
|
+
* Maximum size of numbers accepted.
|
|
20
|
+
* @default 6
|
|
21
|
+
* */
|
|
22
|
+
maxSize?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Help text to be displayed below the input.
|
|
25
|
+
* */
|
|
26
|
+
helpText?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Additional class name to be applied to the outter container.
|
|
29
|
+
* */
|
|
30
|
+
className?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Controls whether the input is disabled.
|
|
33
|
+
* @default false
|
|
34
|
+
* */
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Error message to display
|
|
38
|
+
* */
|
|
39
|
+
errorMessage?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Change input style to error state
|
|
42
|
+
* @default false
|
|
43
|
+
* */
|
|
44
|
+
hasError?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Indicates if the input is required.
|
|
47
|
+
* This will add an asterisk (*) next to the label.
|
|
48
|
+
* @default false
|
|
49
|
+
* */
|
|
50
|
+
required?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Label for the input field.
|
|
53
|
+
* */
|
|
54
|
+
label: string;
|
|
55
|
+
/**
|
|
56
|
+
* Callback to be called when the value changes.
|
|
57
|
+
* */
|
|
58
|
+
onChangeValue?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
59
|
+
/**
|
|
60
|
+
* Callback to be called when the value changes.
|
|
61
|
+
* */
|
|
62
|
+
onChangeUnit?: (option: CustomOptionProps) => void;
|
|
63
|
+
};
|
|
64
|
+
export { InputWithUnit, type InputWithUnitProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InputWithUnit.client';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";import { a as a$2 } from '../../chunk-RB4S3T7L.js';
|
|
2
|
+
import { a as a$1 } from '../../chunk-NW24WOHT.js';
|
|
3
|
+
import '../../chunk-SJ4MATMO.js';
|
|
4
|
+
import { a } from '../../chunk-7Z3CCBLX.js';
|
|
5
|
+
import { a as a$3 } from '../../chunk-G3GCVCTU.js';
|
|
6
|
+
import '../../chunk-LTWCICTK.js';
|
|
7
|
+
import '../../chunk-KEDPPRQK.js';
|
|
8
|
+
import '../../chunk-G2ZF74EK.js';
|
|
9
|
+
import '../../chunk-REQIQLRI.js';
|
|
10
|
+
import { forwardRef, useState } from 'react';
|
|
11
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
12
|
+
|
|
13
|
+
var N=[{label:"mm",value:"mm"},{label:"cm",value:"cm"},{label:"m",value:"m"}],U=forwardRef(({units:i=N,maxSize:h=6,className:f="",helpText:b="",disabled:a$4=!1,errorMessage:t="",hasError:l=!1,required:o=!1,label:v,onChangeValue:c,onChangeUnit:r},g)=>{let[x,I]=useState(i[0]);return jsxs("div",{className:`flex flex-col ${f}`,id:"input-with-unit__container",children:[jsx(a,{label:v,required:o,hasError:l||!!t,htmlFor:"input-with-unit",className:"mb-1"}),jsxs("div",{className:"flex w-full items-start gap-x-1",children:[jsx(a$1,{id:"input-with-unit",ref:g,maxLength:h,formatValue:"onlyNumber",disabled:a$4,hasError:l||!!t,required:o,onChange:c,formGroupClassName:"w-full"}),jsx(a$2,{id:"input-with-unit-dropdown",formGroupClassName:"w-28",placeholder:"mm",options:i,value:x,onChange:n=>{I({label:n.label,value:String(n.value)}),r&&r(n);},disabled:a$4,hasError:l||!!t})]}),jsx(a$3,{helpText:t||b,hasError:!!t})]})});U.displayName="InputWithUnit";
|
|
14
|
+
|
|
15
|
+
export { N as DEFAULT_UNITS, U as InputWithUnit };
|
package/dist/forms/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import '../chunk-BQWNCDFV.js';
|
|
2
|
-
export { a as Dropdown } from '../chunk-RB4S3T7L.js';
|
|
3
2
|
export { b as Select, a as SelectComponent } from '../chunk-HZACKBIW.js';
|
|
4
3
|
export { a as Calendar } from '../chunk-PHVC2M6R.js';
|
|
4
|
+
import '../chunk-KN7DOGNL.js';
|
|
5
|
+
import '../chunk-DTLT3DYY.js';
|
|
5
6
|
import '../chunk-DBWOW4GL.js';
|
|
6
7
|
import '../chunk-6W6QWPEA.js';
|
|
7
8
|
import '../chunk-4QFFUXWM.js';
|
|
8
9
|
import '../chunk-3BKW5XAK.js';
|
|
9
10
|
import '../chunk-L6H2NDVS.js';
|
|
10
|
-
|
|
11
|
-
import '../chunk-DTLT3DYY.js';
|
|
11
|
+
export { a as Dropdown } from '../chunk-RB4S3T7L.js';
|
|
12
12
|
export { a as InputMask } from '../chunk-NW24WOHT.js';
|
|
13
13
|
export { a as Input } from '../chunk-SJ4MATMO.js';
|
|
14
14
|
export { a as InputLabel } from '../chunk-7Z3CCBLX.js';
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import './chunk-BQWNCDFV.js';
|
|
2
|
-
export { a as Dropdown } from './chunk-RB4S3T7L.js';
|
|
3
2
|
import './chunk-7RP4L6ZM.js';
|
|
4
3
|
import './chunk-4PUGMMDC.js';
|
|
4
|
+
export { a as Tooltip } from './chunk-TZI6YTCW.js';
|
|
5
5
|
export { a as Breadcrumb } from './chunk-TSAI6WF3.js';
|
|
6
6
|
export { a as HelpLink } from './chunk-N224DIUR.js';
|
|
7
7
|
export { c as DEFAULT_OPTIONS, d as Pagination, a as PaginationInfo, b as PaginationNav } from './chunk-LYUEZJYR.js';
|
|
8
8
|
export { b as Select, a as SelectComponent } from './chunk-HZACKBIW.js';
|
|
9
9
|
export { a as Stepper } from './chunk-I7PCF2VW.js';
|
|
10
10
|
export { a as Calendar } from './chunk-PHVC2M6R.js';
|
|
11
|
+
import './chunk-KN7DOGNL.js';
|
|
12
|
+
export { a as IconCircular } from './chunk-DTLT3DYY.js';
|
|
11
13
|
import './chunk-DBWOW4GL.js';
|
|
12
14
|
export { a as ActionBar } from './chunk-6W6QWPEA.js';
|
|
13
15
|
export { b as Box, d as BoxContent, c as BoxHeader, a as BoxSeparator } from './chunk-4QFFUXWM.js';
|
|
14
16
|
export { a as Container, b as ContainerHeader } from './chunk-3BKW5XAK.js';
|
|
15
17
|
import './chunk-L6H2NDVS.js';
|
|
16
|
-
|
|
17
|
-
export { a as IconCircular } from './chunk-DTLT3DYY.js';
|
|
18
|
+
export { a as Dropdown } from './chunk-RB4S3T7L.js';
|
|
18
19
|
export { a as InputMask } from './chunk-NW24WOHT.js';
|
|
19
20
|
export { a as Input } from './chunk-SJ4MATMO.js';
|
|
20
21
|
export { a as InputLabel } from './chunk-7Z3CCBLX.js';
|
|
@@ -23,7 +24,6 @@ export { a as Badge } from './chunk-7NXFX6TD.js';
|
|
|
23
24
|
export { a as Tag } from './chunk-EUZRZJ5Q.js';
|
|
24
25
|
export { a as Button } from './chunk-VVJUHPYS.js';
|
|
25
26
|
export { b as ToastContainer, a as notify } from './chunk-RXFTQHN7.js';
|
|
26
|
-
export { a as Tooltip } from './chunk-TZI6YTCW.js';
|
|
27
27
|
export { a as DataTable } from './chunk-JZ6ZGBZ4.js';
|
|
28
28
|
import './chunk-DVFKTOCS.js';
|
|
29
29
|
export { a as Checkbox } from './chunk-DIENJUYM.js';
|
package/dist/indicators/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import '../chunk-7RP4L6ZM.js';
|
|
2
|
+
export { a as Tooltip } from '../chunk-TZI6YTCW.js';
|
|
2
3
|
export { a as Alert } from '../chunk-NGGA7AJU.js';
|
|
3
4
|
export { a as Badge } from '../chunk-7NXFX6TD.js';
|
|
4
5
|
export { a as Tag } from '../chunk-EUZRZJ5Q.js';
|
|
5
6
|
import '../chunk-VVJUHPYS.js';
|
|
6
7
|
export { b as ToastContainer, a as notify } from '../chunk-RXFTQHN7.js';
|
|
7
|
-
export { a as Tooltip } from '../chunk-TZI6YTCW.js';
|
|
8
8
|
import '../chunk-LTWCICTK.js';
|
|
9
9
|
import '../chunk-KEDPPRQK.js';
|
|
10
10
|
import '../chunk-G2ZF74EK.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loja-integrada/admin-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"author": "Loja Integrada",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -133,6 +133,10 @@
|
|
|
133
133
|
"types": "./dist/forms/InputMask/InputMask.d.ts",
|
|
134
134
|
"import": "./dist/forms/InputMask/index.js"
|
|
135
135
|
},
|
|
136
|
+
"./InputWithUnit": {
|
|
137
|
+
"types": "./dist/forms/InputWithUnit/InputWithUnit.d.ts",
|
|
138
|
+
"import": "./dist/forms/InputWithUnit/index.js"
|
|
139
|
+
},
|
|
136
140
|
"./Select": {
|
|
137
141
|
"types": "./dist/forms/Select/Select.d.ts",
|
|
138
142
|
"import": "./dist/forms/Select/index.js"
|