@loja-integrada/admin-components 0.17.0 → 0.18.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/RadioButton/RadioButton.d.ts +24 -0
- package/dist/Forms/RadioButton/RadioButton.spec.d.ts +1 -0
- package/dist/Forms/RadioButton/RadioButton.stories.d.ts +6 -0
- package/dist/Forms/RadioButton/index.d.ts +1 -0
- package/dist/Forms/ToggleButton/ToggleButton.d.ts +24 -0
- package/dist/Forms/ToggleButton/ToggleButton.spec.d.ts +1 -0
- package/dist/Forms/ToggleButton/ToggleButton.stories.d.ts +7 -0
- package/dist/Forms/ToggleButton/index.d.ts +1 -0
- package/dist/Forms/index.d.ts +2 -0
- package/dist/Icons/icons-path/AngleDown.d.ts +2 -0
- package/dist/Icons/icons-path/Calculator.d.ts +2 -0
- package/dist/Icons/icons-path/Desktop.d.ts +2 -0
- package/dist/Icons/icons-path/Mobile.d.ts +2 -0
- package/dist/Icons/icons-path/Plus.d.ts +2 -0
- package/dist/Icons/icons-path/index.d.ts +5 -0
- package/dist/admin-components.cjs.development.js +153 -13
- package/dist/admin-components.cjs.development.js.map +1 -1
- package/dist/admin-components.cjs.production.min.js +1 -1
- package/dist/admin-components.cjs.production.min.js.map +1 -1
- package/dist/admin-components.esm.js +152 -14
- package/dist/admin-components.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/Forms/RadioButton/RadioButton.spec.tsx +26 -0
- package/src/Forms/RadioButton/RadioButton.stories.tsx +40 -0
- package/src/Forms/RadioButton/RadioButton.tsx +80 -0
- package/src/Forms/RadioButton/index.tsx +1 -0
- package/src/Forms/ToggleButton/ToggleButton.spec.tsx +28 -0
- package/src/Forms/ToggleButton/ToggleButton.stories.tsx +51 -0
- package/src/Forms/ToggleButton/ToggleButton.tsx +95 -0
- package/src/Forms/ToggleButton/index.tsx +1 -0
- package/src/Forms/index.ts +2 -0
- package/src/Icons/Icon.stories.tsx +4 -4
- package/src/Icons/icons-path/AngleDown.tsx +9 -0
- package/src/Icons/icons-path/Bell.tsx +2 -2
- package/src/Icons/icons-path/Calculator.tsx +9 -0
- package/src/Icons/icons-path/Copy.tsx +1 -1
- package/src/Icons/icons-path/Desktop.tsx +9 -0
- package/src/Icons/icons-path/Image.tsx +1 -1
- package/src/Icons/icons-path/Mobile.tsx +9 -0
- package/src/Icons/icons-path/MoneyBill.tsx +1 -1
- package/src/Icons/icons-path/Move.tsx +1 -1
- package/src/Icons/icons-path/PaperList.tsx +2 -2
- package/src/Icons/icons-path/Pix.tsx +1 -2
- package/src/Icons/icons-path/Plus.tsx +9 -0
- package/src/Icons/icons-path/Sync.tsx +1 -1
- package/src/Icons/icons-path/index.ts +10 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const RadioButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<RadioButtonProps & React.RefAttributes<HTMLInputElement>>>;
|
|
3
|
+
export interface RadioButtonProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Custom class name
|
|
6
|
+
* */
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Custom id
|
|
10
|
+
* */
|
|
11
|
+
id?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Custom name
|
|
14
|
+
* */
|
|
15
|
+
name?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Custom value
|
|
18
|
+
* */
|
|
19
|
+
value?: string | number;
|
|
20
|
+
/**
|
|
21
|
+
* Text label of the radio button
|
|
22
|
+
* */
|
|
23
|
+
label?: string | React.ReactNode;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RadioButtonProps } from '.';
|
|
2
|
+
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, RadioButtonProps>;
|
|
5
|
+
export declare const Grouped: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, RadioButtonProps>;
|
|
6
|
+
export declare const Disabled: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, RadioButtonProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RadioButton';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ToggleButton: React.MemoExoticComponent<React.ForwardRefExoticComponent<ToggleButtonProps & React.RefAttributes<HTMLInputElement>>>;
|
|
3
|
+
export interface ToggleButtonProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Custom class name
|
|
6
|
+
* */
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Custom id
|
|
10
|
+
* */
|
|
11
|
+
id?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Custom value
|
|
14
|
+
* */
|
|
15
|
+
value?: string | number;
|
|
16
|
+
/**
|
|
17
|
+
* Set icon or an text element to be a children
|
|
18
|
+
* */
|
|
19
|
+
children: React.ReactNode[];
|
|
20
|
+
/**
|
|
21
|
+
* Set element should be a checked
|
|
22
|
+
* */
|
|
23
|
+
defaultCheckedIndex: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ToggleButtonProps } from '.';
|
|
2
|
+
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const WithIcon: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, ToggleButtonProps>;
|
|
5
|
+
export declare const WithText: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, ToggleButtonProps>;
|
|
6
|
+
export declare const Disabled: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, ToggleButtonProps>;
|
|
7
|
+
export declare const WithOnChange: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, ToggleButtonProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ToggleButton';
|
package/dist/Forms/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export * from './Input';
|
|
2
2
|
export * from './InputMask';
|
|
3
|
+
export * from './RadioButton';
|
|
3
4
|
export * from './InputCurrency';
|
|
4
5
|
export * from './InputLabel';
|
|
5
6
|
export * from './InputHelpText';
|
|
6
7
|
export * from './Select';
|
|
7
8
|
export * from './Toggle';
|
|
9
|
+
export * from './ToggleButton';
|
|
8
10
|
export * from './Dropdown';
|
|
9
11
|
export * from './Checkbox';
|
|
10
12
|
export * from './FloatingLabelInput';
|
|
@@ -3,6 +3,7 @@ export declare const icons: {
|
|
|
3
3
|
adjust: () => JSX.Element;
|
|
4
4
|
angleLeft: () => JSX.Element;
|
|
5
5
|
angleRight: () => JSX.Element;
|
|
6
|
+
angleDown: () => JSX.Element;
|
|
6
7
|
angleDiagonal: () => JSX.Element;
|
|
7
8
|
angleHeight: () => JSX.Element;
|
|
8
9
|
angleWidth: () => JSX.Element;
|
|
@@ -16,6 +17,7 @@ export declare const icons: {
|
|
|
16
17
|
bell: () => JSX.Element;
|
|
17
18
|
blog: () => JSX.Element;
|
|
18
19
|
bullhorn: () => JSX.Element;
|
|
20
|
+
calculator: () => JSX.Element;
|
|
19
21
|
calendarAlt: () => JSX.Element;
|
|
20
22
|
camera: () => JSX.Element;
|
|
21
23
|
check: () => JSX.Element;
|
|
@@ -44,6 +46,7 @@ export declare const icons: {
|
|
|
44
46
|
pagali: () => JSX.Element;
|
|
45
47
|
paperList: () => JSX.Element;
|
|
46
48
|
pieChart: () => JSX.Element;
|
|
49
|
+
plus: () => JSX.Element;
|
|
47
50
|
plusCircle: () => JSX.Element;
|
|
48
51
|
print: () => JSX.Element;
|
|
49
52
|
shoppingCart: () => JSX.Element;
|
|
@@ -57,6 +60,8 @@ export declare const icons: {
|
|
|
57
60
|
timesCircle: () => JSX.Element;
|
|
58
61
|
minus: () => JSX.Element;
|
|
59
62
|
tv: () => JSX.Element;
|
|
63
|
+
desktop: () => JSX.Element;
|
|
64
|
+
mobile: () => JSX.Element;
|
|
60
65
|
truck: () => JSX.Element;
|
|
61
66
|
usdCircle: () => JSX.Element;
|
|
62
67
|
questionCircle: () => JSX.Element;
|
|
@@ -102,6 +102,14 @@ var AngleRight = function AngleRight() {
|
|
|
102
102
|
});
|
|
103
103
|
};
|
|
104
104
|
|
|
105
|
+
var AngleDown = function AngleDown() {
|
|
106
|
+
return React__default.createElement("path", {
|
|
107
|
+
fillRule: "evenodd",
|
|
108
|
+
d: "M9 12.25c-.286 0-.558-.123-.748-.336l-4-4.5a1 1 0 0 1 1.495-1.329L9 9.745l3.252-3.66a1 1 0 1 1 1.495 1.33l-4 4.5a1 1 0 0 1-.747.334Z",
|
|
109
|
+
clipRule: "evenodd"
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
|
|
105
113
|
var App = function App() {
|
|
106
114
|
return React__default.createElement("path", {
|
|
107
115
|
fillRule: "evenodd",
|
|
@@ -158,9 +166,9 @@ var BarcodeRead = function BarcodeRead() {
|
|
|
158
166
|
|
|
159
167
|
var Bell = function Bell() {
|
|
160
168
|
return React__default.createElement("path", {
|
|
161
|
-
|
|
162
|
-
d: "
|
|
163
|
-
|
|
169
|
+
fillRule: "evenodd",
|
|
170
|
+
d: "M16.5 13c0 .275-.225.5-.5.5H2c-.275 0-.5-.225-.5-.5v-.368c0-.174.093-.339.242-.428l.109-.065c1.26-.756 2.15-1.957 2.506-3.383l.509-2.037C5.34 4.824 7.036 3.5 8.989 3.5h.022c1.953 0 3.649 1.324 4.123 3.219l.509 2.037c.356 1.426 1.246 2.627 2.506 3.383l.108.065c.15.089.243.254.243.428V13Zm-6 2c0 .827-.673 1.5-1.5 1.5s-1.5-.673-1.5-1.5h3Zm6.529-4.083-.108-.064c-.91-.546-1.566-1.431-1.823-2.46l-.509-2.038c-.529-2.117-2.195-3.708-4.248-4.196.098-.2.159-.421.159-.659C10.5.671 9.829 0 9 0S7.5.671 7.5 1.5c0 .238.061.459.159.659-2.053.488-3.719 2.079-4.248 4.196l-.509 2.038c-.257 1.029-.913 1.914-1.823 2.46l-.108.064C.369 11.279 0 11.93 0 12.632V13c0 1.104.896 2 2 2h4c0 1.657 1.343 3 3 3s3-1.343 3-3h4c1.104 0 2-.896 2-2v-.368c0-.702-.369-1.353-.971-1.715Z",
|
|
171
|
+
clipRule: "evenodd"
|
|
164
172
|
});
|
|
165
173
|
};
|
|
166
174
|
|
|
@@ -180,6 +188,14 @@ var Bullhorn = function Bullhorn() {
|
|
|
180
188
|
});
|
|
181
189
|
};
|
|
182
190
|
|
|
191
|
+
var Calculator = function Calculator() {
|
|
192
|
+
return React__default.createElement("path", {
|
|
193
|
+
fillRule: "evenodd",
|
|
194
|
+
d: "M15.6248 14.6389V2.36111C15.6248 1.05683 14.5679 0 13.2636-1e-7L4.76365-5e-7C3.45937-5e-7 2.40253 1.05683 2.40253 2.36111V14.6389C2.40253 15.9422 3.45937 17 4.76365 17h8.49995c1.3043 0 2.3612-1.0578 2.3612-2.3611Zm-1.4167 0c0 .5204-.4231.9444-.9445.9444H4.76364c-.52133 0-.94444-.424-.94444-.9444V2.36111c0-.52133.42311-.94444.94445-.94444h8.49995c.5214 0 .9445.42311.9445.94444V14.6389ZM5.9442 2.71528c-.4564 0-.82639.36998-.82639.82639v1.41666c0 .4564.36999.82639.82639.82639h6.1389c.4564 0 .8264-.36998.8264-.82639V3.54167c0-.4564-.37-.82639-.8264-.82639H5.9442Zm.35417 1.88889v-.70834h5.43053v.70834H6.29837ZM5.9442 7.08333h.47222c.3912 0 .70834.31714.70834.70834v.47222c0 .3912-.31714.70833-.70834.70833H5.9442c-.3912 0-.70833-.31713-.70833-.70833v-.47222c0-.3912.31713-.70834.70833-.70834Zm.47222 2.83334H5.9442c-.3912 0-.70833.31713-.70833.70833v.4722c0 .3912.31713.7084.70833.7084h.47222c.39121 0 .70834-.3172.70834-.7084v-.4722c0-.3912-.31714-.70833-.70834-.70833Zm0 2.83333H5.9442c-.3912 0-.70833.3171-.70833.7083v.4723c0 .3912.31713.7083.70833.7083h.47222c.39121 0 .70834-.3171.70834-.7083v-.4723c0-.3912-.31713-.7083-.70834-.7083Zm2.83334-5.66667h-.47223c-.3912 0-.70833.31714-.70833.70834v.47222c0 .3912.31713.70833.70833.70833h.47223c.3912 0 .70833-.31713.70833-.70833v-.47222c0-.3912-.31713-.70834-.70833-.70834Zm0 2.83334h-.47223c-.3912 0-.70833.31713-.70833.70833v.4722c0 .3912.31713.7084.70833.7084h.47223c.3912 0 .70833-.3172.70833-.7084v-.4722c0-.3912-.31713-.70833-.70833-.70833Zm0 2.83333h-.47223c-.3912 0-.70833.3171-.70833.7083v.4723c0 .3912.31713.7083.70833.7083h.47223c.3912 0 .70833-.3171.70833-.7083v-.4723c0-.3912-.31713-.7083-.70833-.7083Zm2.83334-5.66667h-.4722c-.3912 0-.7084.31713-.7084.70834v.47222c0 .3912.3172.70833.7084.70833h.4722c.3912 0 .7083-.31713.7083-.70833v-.47222c0-.39121-.3171-.70834-.7083-.70834Zm0 2.83334h-.4722c-.3912 0-.7084.31713-.7084.70833v3.3056c0 .3912.3172.7083.7084.7083h.4722c.3912 0 .7083-.3171.7083-.7083V10.625c0-.3912-.3171-.70833-.7083-.70833Z",
|
|
195
|
+
clipRule: "evenodd"
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
|
|
183
199
|
var CalendarAlt = function CalendarAlt() {
|
|
184
200
|
return React__default.createElement("path", {
|
|
185
201
|
fillRule: "evenodd",
|
|
@@ -199,7 +215,7 @@ var Cog = function Cog() {
|
|
|
199
215
|
var Copy = function Copy() {
|
|
200
216
|
return React__default.createElement("path", {
|
|
201
217
|
fillRule: "evenodd",
|
|
202
|
-
d: "
|
|
218
|
+
d: "M11 15.5h1.5v.5c0 1.104-.896 2-2 2h-7c-1.104 0-2-.896-2-2V6c0-1.104.896-2 2-2H4v1.5h-.5c-.276 0-.5.225-.5.5v10c0 .275.224.5.5.5h7c.276 0 .5-.225.5-.5v-.5Zm3.5-3h-7c-.275 0-.5-.225-.5-.5V2c0-.275.225-.5.5-.5h3.9v2c0 1.158.942 2.1 2.1 2.1H15V12c0 .275-.225.5-.5.5Zm.354-8.775c.093.093.146.222.146.353V4.4h-1.5c-.496 0-.9-.404-.9-.9V1.535c.065.026.126.062.175.111l2.079 2.079Zm1.06-1.061L13.836.586C13.461.211 12.952 0 12.422 0H7.5c-1.104 0-2 .896-2 2v10c0 1.104.896 2 2 2h7c1.104 0 2-.896 2-2V4.078c0-.53-.211-1.039-.586-1.414Z",
|
|
203
219
|
clipRule: "evenodd"
|
|
204
220
|
});
|
|
205
221
|
};
|
|
@@ -329,7 +345,7 @@ var Home = function Home() {
|
|
|
329
345
|
var Image = function Image() {
|
|
330
346
|
return React__default.createElement("path", {
|
|
331
347
|
fillRule: "evenodd",
|
|
332
|
-
d: "M10.5
|
|
348
|
+
d: "M10.5 7c0-.828.671-1.5 1.5-1.5s1.5.672 1.5 1.5-.671 1.5-1.5 1.5-1.5-.672-1.5-1.5Zm5.5 7.5H2c-.276 0-.5-.225-.5-.5v-.937l3.676-2.673c.792-.575 1.856-.575 2.647 0l2.188 1.59c1.176.857 2.758.952 4.027.246l2.462-1.369V14c0 .275-.224.5-.5.5ZM2 3.5h14c.276 0 .5.225.5.5v5.261c-.124-.001-.249.018-.364.084l-2.827 1.57c-.762.424-1.711.365-2.416-.147L8.706 9.177c-1.32-.959-3.092-.959-4.412 0L1.5 11.209V4c0-.275.224-.5.5-.5ZM16 2H2C.896 2 0 2.896 0 4v10c0 1.104.896 2 2 2h14c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2Z",
|
|
333
349
|
clipRule: "evenodd"
|
|
334
350
|
});
|
|
335
351
|
};
|
|
@@ -337,7 +353,7 @@ var Image = function Image() {
|
|
|
337
353
|
var MoneyBill = function MoneyBill() {
|
|
338
354
|
return React__default.createElement("path", {
|
|
339
355
|
fillRule: "evenodd",
|
|
340
|
-
d: "M3.245
|
|
356
|
+
d: "M3.245 14.2h11.51c.027-1.064.881-1.918 1.945-1.945v-6.51c-1.064-.027-1.918-.881-1.945-1.945H3.245C3.218 4.864 2.364 5.718 1.3 5.745v6.51c1.064.027 1.918.881 1.945 1.945ZM18 4v10c0 .828-.672 1.5-1.5 1.5h-15C.672 15.5 0 14.828 0 14V4c0-.828.672-1.5 1.5-1.5h15c.828 0 1.5.672 1.5 1.5Zm-6.5 5c0 2-1 3-2.5 3s-2.5-1-2.5-3 1-3 2.5-3 2.5 1 2.5 3Z",
|
|
341
357
|
clipRule: "evenodd"
|
|
342
358
|
});
|
|
343
359
|
};
|
|
@@ -345,7 +361,7 @@ var MoneyBill = function MoneyBill() {
|
|
|
345
361
|
var Move = function Move() {
|
|
346
362
|
return React__default.createElement("path", {
|
|
347
363
|
fillRule: "evenodd",
|
|
348
|
-
d: "
|
|
364
|
+
d: "M13.5 15c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5Zm-6 0c0-.828-.671-1.5-1.5-1.5s-1.5.672-1.5 1.5.671 1.5 1.5 1.5 1.5-.672 1.5-1.5Zm6-12c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5Zm-6 0c0-.828-.671-1.5-1.5-1.5S4.5 2.172 4.5 3 5.171 4.5 6 4.5 7.5 3.828 7.5 3Zm6 6c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5ZM6 10.5c-.829 0-1.5-.672-1.5-1.5S5.171 7.5 6 7.5s1.5.672 1.5 1.5-.671 1.5-1.5 1.5Z",
|
|
349
365
|
clipRule: "evenodd"
|
|
350
366
|
});
|
|
351
367
|
};
|
|
@@ -372,9 +388,9 @@ var Pagali = function Pagali() {
|
|
|
372
388
|
|
|
373
389
|
var PaperList = function PaperList() {
|
|
374
390
|
return React__default.createElement("path", {
|
|
375
|
-
|
|
376
|
-
d: "
|
|
377
|
-
|
|
391
|
+
fillRule: "evenodd",
|
|
392
|
+
d: "M17 3c0-1.657-1.343-3-3-3H4C2.343 0 1 1.343 1 3v12c0 1.657 1.343 3 3 3h10c1.657 0 3-1.343 3-3V3Zm-3 13.5c.827 0 1.5-.673 1.5-1.5V3c0-.827-.673-1.5-1.5-1.5H4c-.827 0-1.5.673-1.5 1.5v12c0 .827.673 1.5 1.5 1.5h10ZM5 5h8V4H5v1Zm0 3h8V7H5v1Zm0 3h8v-1H5v1Zm0 3h8v-1H5v1Z",
|
|
393
|
+
clipRule: "evenodd"
|
|
378
394
|
});
|
|
379
395
|
};
|
|
380
396
|
|
|
@@ -386,6 +402,14 @@ var PieChart = function PieChart() {
|
|
|
386
402
|
});
|
|
387
403
|
};
|
|
388
404
|
|
|
405
|
+
var Plus = function Plus() {
|
|
406
|
+
return React__default.createElement("path", {
|
|
407
|
+
fillRule: "evenodd",
|
|
408
|
+
d: "M16.5 7.75h-6.25V1.5h-2.5v6.25H1.5v2.5h6.25v6.25h2.5v-6.25h6.25v-2.5Z",
|
|
409
|
+
clipRule: "evenodd"
|
|
410
|
+
});
|
|
411
|
+
};
|
|
412
|
+
|
|
389
413
|
var PlusCircle = function PlusCircle() {
|
|
390
414
|
return React__default.createElement("path", {
|
|
391
415
|
fillRule: "evenodd",
|
|
@@ -437,8 +461,7 @@ var Loading = function Loading() {
|
|
|
437
461
|
var Pix = function Pix() {
|
|
438
462
|
return React__default.createElement("path", {
|
|
439
463
|
fillRule: "evenodd",
|
|
440
|
-
d: "
|
|
441
|
-
clipRule: "evenodd"
|
|
464
|
+
d: "m4.179688 3.6875-.53125.53125h.53125c.449218 0 .882812.113281 1.265624.324219.21875.117187.421876.269531.601563.453125l2.710937 2.707031c.195313.195313.515626.195313.710938 0l2.699219-2.699219c.144531-.144531.300781-.269531.472656-.375.414063-.261718.894531-.398437 1.398437-.398437h.324219L10.933594.800781c-1.066406-1.066406-2.800782-1.066406-3.867188 0Zm5.691406-1.824219c-.480469-.484375-1.261719-.484375-1.746094 0L6.535156 3.453125c.203125.140625.394532.300781.574219.480469L9.113281 5.9375l1.992188-1.992188c.144531-.144531.296875-.277343.457031-.394531Zm1.234375 12.191407L9.113281 12.0625l-2.003906 2.003906c-.179687.179688-.371094.339844-.574219.480469l1.59375 1.589844c.480469.484375 1.261719.484375 1.742188 0l1.691406-1.6875c-.160156-.117188-.3125-.25-.457031-.394531Zm1.535156-.683594c.414063.261718.894531.398437 1.398437.398437h.324219l-3.429687 3.429688c-1.066406 1.066406-2.800782 1.066406-3.867188 0L3.648438 13.78125h.53125c.449218 0 .882812-.113281 1.265624-.324219.21875-.117187.421876-.269531.601563-.453125l2.710937-2.707031c.191407-.191406.519532-.191406.710938 0l2.699219 2.699219c.144531.144531.300781.269531.472656.375Zm1.398437-.394532c-.488281 0-.964843-.199218-1.308593-.542968L10.03125 9.734375c-.246094-.246094-.582031-.367187-.917969-.367187-.335937 0-.671875.121093-.917969.367187l-2.707031 2.710937c-.34375.34375-.820312.539063-1.308593.539063H3.019531c-.046875 0-.09375.011719-.136719.03125L.800781 10.933594c-1.066406-1.066406-1.066406-2.800782 0-3.867188l2.082031-2.082031c.042969.019531.089844.03125.136719.03125h1.160157c.488281 0 .964843.195313 1.308593.539063l2.707031 2.710937c.253907.253906.585938.378906.917969.378906.332031 0 .664063-.125.917969-.378906l2.699219-2.699219c.34375-.34375.820312-.542968 1.308593-.542968h.941407c.050781 0 .101562-.011719.144531-.027344l2.074219 2.070312c1.066406 1.066406 1.066406 2.800782 0 3.867188L15.125 13.003906c-.042969-.015625-.09375-.027344-.144531-.027344Zm-.25-1.601562L11.417969 9l2.371093-2.375c.0625-.0625.160157-.101562.25-.101562h.496094l1.601563 1.605468c.484375.480469.484375 1.261719 0 1.742188l-1.601563 1.605468h-.496094c-.089843 0-.1875-.039062-.25-.101562ZM4.425781 6.617188 6.808594 9l-2.382813 2.382812c-.0625.0625-.15625.101563-.246093.101563h-.707032L1.863281 9.871094c-.484375-.480469-.484375-1.261719 0-1.742188l1.613281-1.613281h.703126c.089843 0 .183593.039063.246093.101563Zm0 0"
|
|
442
465
|
});
|
|
443
466
|
};
|
|
444
467
|
|
|
@@ -474,6 +497,22 @@ var Tv = function Tv() {
|
|
|
474
497
|
});
|
|
475
498
|
};
|
|
476
499
|
|
|
500
|
+
var Desktop = function Desktop() {
|
|
501
|
+
return React__default.createElement("path", {
|
|
502
|
+
fillRule: "evenodd",
|
|
503
|
+
d: "M16.5 11c0 .275-.225.5-.5.5H2a.501.501 0 0 1-.5-.5V2c0-.275.225-.5.5-.5h14c.275 0 .5.225.5.5v9Zm-6.009 5.5H7.509l1.05-3.5h.882l1.05 3.5ZM16 0H2a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h4.991l-1.05 3.5H2.5V18h13v-1.5h-3.441l-1.05-3.5H16a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2Z",
|
|
504
|
+
clipRule: "evenodd"
|
|
505
|
+
});
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
var Mobile = function Mobile() {
|
|
509
|
+
return React__default.createElement("path", {
|
|
510
|
+
fillRule: "evenodd",
|
|
511
|
+
d: "M9 13c-.553 0-1 .447-1 1 0 .553.447 1 1 1 .553 0 1-.447 1-1 0-.553-.447-1-1-1Zm3.5-13h-7c-1.104 0-2 .896-2 2v14c0 1.104.896 2 2 2h7c1.104 0 2-.896 2-2V2c0-1.104-.896-2-2-2Zm0 1.5c.275 0 .5.225.5.5v14c0 .275-.225.5-.5.5h-7c-.275 0-.5-.225-.5-.5V2c0-.275.225-.5.5-.5h7Z",
|
|
512
|
+
clipRule: "evenodd"
|
|
513
|
+
});
|
|
514
|
+
};
|
|
515
|
+
|
|
477
516
|
var Truck = function Truck() {
|
|
478
517
|
return React__default.createElement("path", {
|
|
479
518
|
fillRule: "evenodd",
|
|
@@ -509,7 +548,7 @@ var Search = function Search() {
|
|
|
509
548
|
var Sync = function Sync() {
|
|
510
549
|
return React__default.createElement("path", {
|
|
511
550
|
fillRule: "evenodd",
|
|
512
|
-
d: "
|
|
551
|
+
d: "m17.1315 1.947-1.245 1.358C13.6965 1.011 11.4455 0 8.59449 0 4.42749 0 .0004883 3 .0004883 8.5H1.51549c0-4.5 3.561-6.945 7.079-6.945 2.45401 0 4.34101.858 6.25401 2.882l-1.58 1.725c-.294.32-.067.838.368.838h3.864c.276 0 .5-.224.5-.5V2.285c0-.456-.561-.674-.869-.338Zm-.646 7.553h1.515c0 5.5-4.428 8.5-8.59501 8.5-2.851 0-5.102-1.012-7.293-3.306L.868488 16.051c-.103.114-.235.164-.364.164-.257 0-.5039997-.198-.5039997-.501V11.5c0-.277.2229997-.5.4999997-.5H4.36149c.435 0 .662.517.369.838l-1.58 1.723c1.914 2.025 3.801 2.883 6.255 2.883 3.51801 0 7.08001-2.444 7.08001-6.944Z",
|
|
513
552
|
clipRule: "evenodd"
|
|
514
553
|
});
|
|
515
554
|
};
|
|
@@ -601,6 +640,7 @@ var icons = {
|
|
|
601
640
|
adjust: Adjust,
|
|
602
641
|
angleLeft: AngleLeft,
|
|
603
642
|
angleRight: AngleRight,
|
|
643
|
+
angleDown: AngleDown,
|
|
604
644
|
angleDiagonal: AngleDiagonal,
|
|
605
645
|
angleHeight: AngleHeight,
|
|
606
646
|
angleWidth: AngleWidth,
|
|
@@ -614,6 +654,7 @@ var icons = {
|
|
|
614
654
|
bell: Bell,
|
|
615
655
|
blog: Blog,
|
|
616
656
|
bullhorn: Bullhorn,
|
|
657
|
+
calculator: Calculator,
|
|
617
658
|
calendarAlt: CalendarAlt,
|
|
618
659
|
camera: Camera,
|
|
619
660
|
check: Check,
|
|
@@ -642,6 +683,7 @@ var icons = {
|
|
|
642
683
|
pagali: Pagali,
|
|
643
684
|
paperList: PaperList,
|
|
644
685
|
pieChart: PieChart,
|
|
686
|
+
plus: Plus,
|
|
645
687
|
plusCircle: PlusCircle,
|
|
646
688
|
print: Print,
|
|
647
689
|
shoppingCart: ShoppingCart,
|
|
@@ -655,6 +697,8 @@ var icons = {
|
|
|
655
697
|
timesCircle: TimesCircle,
|
|
656
698
|
minus: Minus,
|
|
657
699
|
tv: Tv,
|
|
700
|
+
desktop: Desktop,
|
|
701
|
+
mobile: Mobile,
|
|
658
702
|
truck: Truck,
|
|
659
703
|
usdCircle: UsdCircle,
|
|
660
704
|
questionCircle: QuestionCircle,
|
|
@@ -1200,6 +1244,50 @@ function InputMaskComponent(_ref, inputRef) {
|
|
|
1200
1244
|
|
|
1201
1245
|
var InputMask = /*#__PURE__*/React__default.forwardRef(InputMaskComponent);
|
|
1202
1246
|
|
|
1247
|
+
var RadioButtonComponent = function RadioButtonComponent(_ref, ref) {
|
|
1248
|
+
var label = _ref.label,
|
|
1249
|
+
id = _ref.id,
|
|
1250
|
+
name = _ref.name,
|
|
1251
|
+
value = _ref.value,
|
|
1252
|
+
_ref$className = _ref.className,
|
|
1253
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
1254
|
+
onChange = _ref.onChange,
|
|
1255
|
+
_ref$disabled = _ref.disabled,
|
|
1256
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
1257
|
+
props = _objectWithoutPropertiesLoose(_ref, ["label", "id", "name", "value", "className", "onChange", "disabled"]);
|
|
1258
|
+
|
|
1259
|
+
var inputId = id || name;
|
|
1260
|
+
var toggleClasses = disabled ? "pointer-events-none border-card-stroke text-on-base-2 font-semibold peer-checked:bg-base-3" : "peer-checked:bg-primary cursor-pointer";
|
|
1261
|
+
|
|
1262
|
+
var handleChange = function handleChange(event) {
|
|
1263
|
+
onChange && onChange(event);
|
|
1264
|
+
};
|
|
1265
|
+
|
|
1266
|
+
return React__default.createElement("div", {
|
|
1267
|
+
className: "radioContainer relative inline-flex justify-center items-center text-f6 text-inverted-1 font-semibold mx-2"
|
|
1268
|
+
}, React__default.createElement("label", {
|
|
1269
|
+
className: className + " relative inline-flex justify-center items-center border border-base-4 rounded-full w-4 h-4 mr-1 m-auto focus-within:border-focus focus-within:border-2\n }"
|
|
1270
|
+
}, React__default.createElement("input", Object.assign({
|
|
1271
|
+
ref: ref,
|
|
1272
|
+
className: "absolute peer opacity-0 " + toggleClasses,
|
|
1273
|
+
type: "radio",
|
|
1274
|
+
name: name,
|
|
1275
|
+
value: value,
|
|
1276
|
+
id: inputId,
|
|
1277
|
+
onChange: handleChange
|
|
1278
|
+
}, props, {
|
|
1279
|
+
disabled: disabled
|
|
1280
|
+
})), React__default.createElement("span", {
|
|
1281
|
+
className: "checkmark rounded-full w-2 h-2 " + toggleClasses + " peer-checked:inline-block"
|
|
1282
|
+
})), React__default.createElement("label", {
|
|
1283
|
+
htmlFor: inputId,
|
|
1284
|
+
className: "radioLabel " + toggleClasses
|
|
1285
|
+
}, label));
|
|
1286
|
+
};
|
|
1287
|
+
|
|
1288
|
+
var RadioButtonWithForwardRef = /*#__PURE__*/React__default.forwardRef(RadioButtonComponent);
|
|
1289
|
+
var RadioButton = /*#__PURE__*/React__default.memo(RadioButtonWithForwardRef);
|
|
1290
|
+
|
|
1203
1291
|
function formatCurrency(value, localeConfig) {
|
|
1204
1292
|
var numberConfig = localeConfig.format;
|
|
1205
1293
|
var currencyOptions = new global.Intl.NumberFormat(localeConfig.locale, numberConfig).resolvedOptions();
|
|
@@ -1577,6 +1665,56 @@ var ToggleComponent = function ToggleComponent(_ref, ref) {
|
|
|
1577
1665
|
var ToggleWithForwardRef = /*#__PURE__*/React__default.forwardRef(ToggleComponent);
|
|
1578
1666
|
var Toggle = /*#__PURE__*/React__default.memo(ToggleWithForwardRef);
|
|
1579
1667
|
|
|
1668
|
+
var ToggleButtonComponent = function ToggleButtonComponent(_ref, ref) {
|
|
1669
|
+
var value = _ref.value,
|
|
1670
|
+
_ref$className = _ref.className,
|
|
1671
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
1672
|
+
id = _ref.id,
|
|
1673
|
+
children = _ref.children,
|
|
1674
|
+
disabled = _ref.disabled,
|
|
1675
|
+
_ref$defaultCheckedIn = _ref.defaultCheckedIndex,
|
|
1676
|
+
defaultCheckedIndex = _ref$defaultCheckedIn === void 0 ? 0 : _ref$defaultCheckedIn,
|
|
1677
|
+
onChange = _ref.onChange,
|
|
1678
|
+
props = _objectWithoutPropertiesLoose(_ref, ["value", "className", "id", "children", "disabled", "defaultCheckedIndex", "onChange"]);
|
|
1679
|
+
|
|
1680
|
+
var toggleClasses = disabled ? "pointer-events-none bg-base-3 border-card-stroke text-on-base-2" : "peer-checked:bg-primary peer-checked:border-primary peer-checked:text-base-1 text-primary";
|
|
1681
|
+
|
|
1682
|
+
var handleChange = function handleChange(e) {
|
|
1683
|
+
onChange && onChange(e);
|
|
1684
|
+
};
|
|
1685
|
+
|
|
1686
|
+
var toggleItems = children.map(function (item, index) {
|
|
1687
|
+
var borderRadius = index === 0 ? 'rounded-l' : children.length - 1 === index ? 'border-r rounded-r' : '';
|
|
1688
|
+
return React__default.createElement("li", {
|
|
1689
|
+
key: "toggle-btn-[" + index + "]",
|
|
1690
|
+
className: "inline-flex justify-center items-center h-12"
|
|
1691
|
+
}, React__default.createElement("label", {
|
|
1692
|
+
className: "relative inline-flex justify-center items-center h-12"
|
|
1693
|
+
}, React__default.createElement("input", Object.assign({
|
|
1694
|
+
ref: ref,
|
|
1695
|
+
className: "peer absolute top-0 bottom-0 left-0 right-0 cursor-pointer opacity-0 z-20",
|
|
1696
|
+
type: "radio",
|
|
1697
|
+
id: id,
|
|
1698
|
+
name: "toggleButton",
|
|
1699
|
+
value: value,
|
|
1700
|
+
onChange: handleChange
|
|
1701
|
+
}, props, {
|
|
1702
|
+
defaultChecked: defaultCheckedIndex === index ? true : false,
|
|
1703
|
+
disabled: disabled
|
|
1704
|
+
})), React__default.createElement("div", {
|
|
1705
|
+
className: className + " checkmark " + toggleClasses + " inline-flex justify-center items-center " + borderRadius + " py-4 px-6 border-y border-l h-12"
|
|
1706
|
+
}, item)));
|
|
1707
|
+
});
|
|
1708
|
+
return React__default.createElement("div", {
|
|
1709
|
+
className: className + " inline-flex justify-center items-center h-12 " + toggleClasses + "} rounded text-f6 tracking-4 font-semibold"
|
|
1710
|
+
}, React__default.createElement("ul", {
|
|
1711
|
+
className: "list-none inline-flex justify-center items-center h-12"
|
|
1712
|
+
}, toggleItems));
|
|
1713
|
+
};
|
|
1714
|
+
|
|
1715
|
+
var ToggleButtonWithForwardRef = /*#__PURE__*/React__default.forwardRef(ToggleButtonComponent);
|
|
1716
|
+
var ToggleButton = /*#__PURE__*/React__default.memo(ToggleButtonWithForwardRef);
|
|
1717
|
+
|
|
1580
1718
|
var sizeClasses = {
|
|
1581
1719
|
"default": 'h-12',
|
|
1582
1720
|
small: 'h-8',
|
|
@@ -3923,6 +4061,7 @@ exports.InputMask = InputMask;
|
|
|
3923
4061
|
exports.LoadingPlaceholder = LoadingPlaceholder;
|
|
3924
4062
|
exports.Modal = Modal;
|
|
3925
4063
|
exports.Pagination = Pagination;
|
|
4064
|
+
exports.RadioButton = RadioButton;
|
|
3926
4065
|
exports.Select = Select;
|
|
3927
4066
|
exports.SelectComponent = SelectComponent;
|
|
3928
4067
|
exports.Sidebar = Sidebar;
|
|
@@ -3940,6 +4079,7 @@ exports.Tag = Tag;
|
|
|
3940
4079
|
exports.Timeline = Timeline;
|
|
3941
4080
|
exports.Toast = Toast;
|
|
3942
4081
|
exports.Toggle = Toggle;
|
|
4082
|
+
exports.ToggleButton = ToggleButton;
|
|
3943
4083
|
exports.Tooltip = Tooltip;
|
|
3944
4084
|
exports.Topbar = Topbar;
|
|
3945
4085
|
exports.sizeClasses = sizeClasses;
|