@ama-pt/agora-design-system 0.1.3 → 0.1.4
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/package.json +1 -1
- package/dist/cjs/components/ui/atoms/button/button.csf.d.ts +0 -80
- package/dist/cjs/components/ui/atoms/button/button.csf.js +0 -67
- package/dist/cjs/components/ui/atoms/button/button.csf.js.map +0 -1
- package/dist/cjs/components/ui/atoms/button/button.stories.d.ts +0 -59
- package/dist/cjs/components/ui/atoms/button/button.stories.js +0 -92
- package/dist/cjs/components/ui/atoms/button/button.stories.js.map +0 -1
- package/dist/cjs/components/ui/atoms/checkbox/checkbox.csf.d.ts +0 -73
- package/dist/cjs/components/ui/atoms/checkbox/checkbox.csf.js +0 -56
- package/dist/cjs/components/ui/atoms/checkbox/checkbox.csf.js.map +0 -1
- package/dist/cjs/components/ui/atoms/checkbox/checkbox.stories.d.ts +0 -29
- package/dist/cjs/components/ui/atoms/checkbox/checkbox.stories.js +0 -62
- package/dist/cjs/components/ui/atoms/checkbox/checkbox.stories.js.map +0 -1
- package/dist/cjs/components/ui/atoms/icon/icon.stories.d.ts +0 -8
- package/dist/cjs/components/ui/atoms/icon/icon.stories.js +0 -65
- package/dist/cjs/components/ui/atoms/icon/icon.stories.js.map +0 -1
- package/dist/cjs/components/ui/atoms/input_number/input_number.csf.d.ts +0 -205
- package/dist/cjs/components/ui/atoms/input_number/input_number.csf.js +0 -142
- package/dist/cjs/components/ui/atoms/input_number/input_number.csf.js.map +0 -1
- package/dist/cjs/components/ui/atoms/input_number/input_number.stories.d.ts +0 -13
- package/dist/cjs/components/ui/atoms/input_number/input_number.stories.js +0 -84
- package/dist/cjs/components/ui/atoms/input_number/input_number.stories.js.map +0 -1
- package/dist/cjs/components/ui/atoms/input_password/input_password.csf.d.ts +0 -197
- package/dist/cjs/components/ui/atoms/input_password/input_password.csf.js +0 -137
- package/dist/cjs/components/ui/atoms/input_password/input_password.csf.js.map +0 -1
- package/dist/cjs/components/ui/atoms/input_password/input_password.stories.d.ts +0 -13
- package/dist/cjs/components/ui/atoms/input_password/input_password.stories.js +0 -82
- package/dist/cjs/components/ui/atoms/input_password/input_password.stories.js.map +0 -1
- package/dist/cjs/components/ui/atoms/input_text/input_text.csf.d.ts +0 -189
- package/dist/cjs/components/ui/atoms/input_text/input_text.csf.js +0 -132
- package/dist/cjs/components/ui/atoms/input_text/input_text.csf.js.map +0 -1
- package/dist/cjs/components/ui/atoms/input_text/input_text.stories.d.ts +0 -13
- package/dist/cjs/components/ui/atoms/input_text/input_text.stories.js +0 -83
- package/dist/cjs/components/ui/atoms/input_text/input_text.stories.js.map +0 -1
- package/dist/cjs/components/ui/atoms/input_textarea/input_textarea.csf.d.ts +0 -177
- package/dist/cjs/components/ui/atoms/input_textarea/input_textarea.csf.js +0 -122
- package/dist/cjs/components/ui/atoms/input_textarea/input_textarea.csf.js.map +0 -1
- package/dist/cjs/components/ui/atoms/input_textarea/input_textarea.stories.d.ts +0 -13
- package/dist/cjs/components/ui/atoms/input_textarea/input_textarea.stories.js +0 -82
- package/dist/cjs/components/ui/atoms/input_textarea/input_textarea.stories.js.map +0 -1
- package/dist/cjs/components/ui/atoms/radio/radio.csf.d.ts +0 -73
- package/dist/cjs/components/ui/atoms/radio/radio.csf.js +0 -56
- package/dist/cjs/components/ui/atoms/radio/radio.csf.js.map +0 -1
- package/dist/cjs/components/ui/atoms/radio/radio.stories.d.ts +0 -29
- package/dist/cjs/components/ui/atoms/radio/radio.stories.js +0 -62
- package/dist/cjs/components/ui/atoms/radio/radio.stories.js.map +0 -1
- package/dist/cjs/components/ui/molecules/accordion/accordion.stories.d.ts +0 -11
- package/dist/cjs/components/ui/molecules/accordion/accordion.stories.js +0 -63
- package/dist/cjs/components/ui/molecules/accordion/accordion.stories.js.map +0 -1
- package/dist/esm/components/ui/atoms/button/button.csf.d.ts +0 -80
- package/dist/esm/components/ui/atoms/button/button.csf.js +0 -64
- package/dist/esm/components/ui/atoms/button/button.csf.js.map +0 -1
- package/dist/esm/components/ui/atoms/button/button.stories.d.ts +0 -59
- package/dist/esm/components/ui/atoms/button/button.stories.js +0 -80
- package/dist/esm/components/ui/atoms/button/button.stories.js.map +0 -1
- package/dist/esm/components/ui/atoms/checkbox/checkbox.csf.d.ts +0 -73
- package/dist/esm/components/ui/atoms/checkbox/checkbox.csf.js +0 -53
- package/dist/esm/components/ui/atoms/checkbox/checkbox.csf.js.map +0 -1
- package/dist/esm/components/ui/atoms/checkbox/checkbox.stories.d.ts +0 -29
- package/dist/esm/components/ui/atoms/checkbox/checkbox.stories.js +0 -50
- package/dist/esm/components/ui/atoms/checkbox/checkbox.stories.js.map +0 -1
- package/dist/esm/components/ui/atoms/icon/icon.stories.d.ts +0 -8
- package/dist/esm/components/ui/atoms/icon/icon.stories.js +0 -56
- package/dist/esm/components/ui/atoms/icon/icon.stories.js.map +0 -1
- package/dist/esm/components/ui/atoms/input_number/input_number.csf.d.ts +0 -205
- package/dist/esm/components/ui/atoms/input_number/input_number.csf.js +0 -139
- package/dist/esm/components/ui/atoms/input_number/input_number.csf.js.map +0 -1
- package/dist/esm/components/ui/atoms/input_number/input_number.stories.d.ts +0 -13
- package/dist/esm/components/ui/atoms/input_number/input_number.stories.js +0 -70
- package/dist/esm/components/ui/atoms/input_number/input_number.stories.js.map +0 -1
- package/dist/esm/components/ui/atoms/input_password/input_password.csf.d.ts +0 -197
- package/dist/esm/components/ui/atoms/input_password/input_password.csf.js +0 -134
- package/dist/esm/components/ui/atoms/input_password/input_password.csf.js.map +0 -1
- package/dist/esm/components/ui/atoms/input_password/input_password.stories.d.ts +0 -13
- package/dist/esm/components/ui/atoms/input_password/input_password.stories.js +0 -68
- package/dist/esm/components/ui/atoms/input_password/input_password.stories.js.map +0 -1
- package/dist/esm/components/ui/atoms/input_text/input_text.csf.d.ts +0 -189
- package/dist/esm/components/ui/atoms/input_text/input_text.csf.js +0 -129
- package/dist/esm/components/ui/atoms/input_text/input_text.csf.js.map +0 -1
- package/dist/esm/components/ui/atoms/input_text/input_text.stories.d.ts +0 -13
- package/dist/esm/components/ui/atoms/input_text/input_text.stories.js +0 -69
- package/dist/esm/components/ui/atoms/input_text/input_text.stories.js.map +0 -1
- package/dist/esm/components/ui/atoms/input_textarea/input_textarea.csf.d.ts +0 -177
- package/dist/esm/components/ui/atoms/input_textarea/input_textarea.csf.js +0 -119
- package/dist/esm/components/ui/atoms/input_textarea/input_textarea.csf.js.map +0 -1
- package/dist/esm/components/ui/atoms/input_textarea/input_textarea.stories.d.ts +0 -13
- package/dist/esm/components/ui/atoms/input_textarea/input_textarea.stories.js +0 -68
- package/dist/esm/components/ui/atoms/input_textarea/input_textarea.stories.js.map +0 -1
- package/dist/esm/components/ui/atoms/radio/radio.csf.d.ts +0 -73
- package/dist/esm/components/ui/atoms/radio/radio.csf.js +0 -53
- package/dist/esm/components/ui/atoms/radio/radio.csf.js.map +0 -1
- package/dist/esm/components/ui/atoms/radio/radio.stories.d.ts +0 -29
- package/dist/esm/components/ui/atoms/radio/radio.stories.js +0 -50
- package/dist/esm/components/ui/atoms/radio/radio.stories.js.map +0 -1
- package/dist/esm/components/ui/molecules/accordion/accordion.stories.d.ts +0 -11
- package/dist/esm/components/ui/molecules/accordion/accordion.stories.js +0 -55
- package/dist/esm/components/ui/molecules/accordion/accordion.stories.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
export declare const parameters: {
|
|
2
|
-
actions: {
|
|
3
|
-
handles: string[];
|
|
4
|
-
};
|
|
5
|
-
design: {
|
|
6
|
-
type: string;
|
|
7
|
-
url: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export declare const btnVariantOptions: string[];
|
|
11
|
-
export declare const btnKindsOptions: string[];
|
|
12
|
-
export declare const argTypes: {
|
|
13
|
-
size: {
|
|
14
|
-
type: {
|
|
15
|
-
name: string;
|
|
16
|
-
required: boolean;
|
|
17
|
-
};
|
|
18
|
-
description: string;
|
|
19
|
-
defaultValue: string;
|
|
20
|
-
control: {
|
|
21
|
-
type: string;
|
|
22
|
-
options: string[];
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
hasIcon: {
|
|
26
|
-
type: {
|
|
27
|
-
name: string;
|
|
28
|
-
required: boolean;
|
|
29
|
-
};
|
|
30
|
-
description: string;
|
|
31
|
-
defaultValue: null;
|
|
32
|
-
};
|
|
33
|
-
icon: {
|
|
34
|
-
type: {
|
|
35
|
-
name: string;
|
|
36
|
-
required: boolean;
|
|
37
|
-
};
|
|
38
|
-
description: string;
|
|
39
|
-
defaultValue: null;
|
|
40
|
-
control: {
|
|
41
|
-
type: string;
|
|
42
|
-
options: string[];
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
iconHover: {
|
|
46
|
-
type: {
|
|
47
|
-
name: string;
|
|
48
|
-
required: boolean;
|
|
49
|
-
};
|
|
50
|
-
description: string;
|
|
51
|
-
defaultValue: null;
|
|
52
|
-
control: {
|
|
53
|
-
type: string;
|
|
54
|
-
options: string[];
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
iconPosition: {
|
|
58
|
-
type: {
|
|
59
|
-
name: string;
|
|
60
|
-
required: boolean;
|
|
61
|
-
};
|
|
62
|
-
description: string;
|
|
63
|
-
defaultValue: string;
|
|
64
|
-
control: {
|
|
65
|
-
type: string;
|
|
66
|
-
options: string[];
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
iconAltText: {
|
|
70
|
-
type: {
|
|
71
|
-
name: string;
|
|
72
|
-
required: boolean;
|
|
73
|
-
};
|
|
74
|
-
description: string;
|
|
75
|
-
defaultValue: string;
|
|
76
|
-
control: {
|
|
77
|
-
type: string;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.argTypes = exports.btnKindsOptions = exports.btnVariantOptions = exports.parameters = void 0;
|
|
4
|
-
const icon_1 = require("../icon");
|
|
5
|
-
exports.parameters = {
|
|
6
|
-
actions: {
|
|
7
|
-
handles: ['mouseenter', 'click', 'focusin', 'focusout']
|
|
8
|
-
},
|
|
9
|
-
design: {
|
|
10
|
-
type: 'zeroheight',
|
|
11
|
-
url: 'https://zeroheight.com/1be481dc2/p/489b41-buttons/b/026ea1'
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
exports.btnVariantOptions = ['primary', 'secondary', 'danger', 'success', 'warning', 'neutral', 'white'];
|
|
15
|
-
exports.btnKindsOptions = ['solid', 'outline', 'link'];
|
|
16
|
-
exports.argTypes = {
|
|
17
|
-
size: {
|
|
18
|
-
type: { name: 'string', required: false },
|
|
19
|
-
description: 'The size of the button.',
|
|
20
|
-
defaultValue: 'default',
|
|
21
|
-
control: {
|
|
22
|
-
type: 'select',
|
|
23
|
-
options: ['default', 'small']
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
hasIcon: {
|
|
27
|
-
type: { name: 'boolean', required: false },
|
|
28
|
-
description: 'Prepare the Button for containing Icon',
|
|
29
|
-
defaultValue: null
|
|
30
|
-
},
|
|
31
|
-
icon: {
|
|
32
|
-
type: { name: 'string', required: false },
|
|
33
|
-
description: 'The icon to display on the left/right hand side of button.',
|
|
34
|
-
defaultValue: null,
|
|
35
|
-
control: {
|
|
36
|
-
type: 'select',
|
|
37
|
-
options: [...icon_1.allIcons.filter((i) => i.indexOf('agora-line') === 0)]
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
iconHover: {
|
|
41
|
-
type: { name: 'string', required: false },
|
|
42
|
-
description: 'The icon to display on the left/right hand side of button when mouse over',
|
|
43
|
-
defaultValue: null,
|
|
44
|
-
control: {
|
|
45
|
-
type: 'select',
|
|
46
|
-
options: [...icon_1.allIcons.filter((i) => i.indexOf('agora-solid') === 0)]
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
iconPosition: {
|
|
50
|
-
type: { name: 'string', required: false },
|
|
51
|
-
description: 'The position of icon to display',
|
|
52
|
-
defaultValue: 'leading',
|
|
53
|
-
control: {
|
|
54
|
-
type: 'select',
|
|
55
|
-
options: ['leading', 'trailing']
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
iconAltText: {
|
|
59
|
-
type: { name: 'string', required: false },
|
|
60
|
-
description: 'Alternative text recommended for icon with role="img"',
|
|
61
|
-
defaultValue: 'Alternative Text',
|
|
62
|
-
control: {
|
|
63
|
-
type: 'text'
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=button.csf.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.csf.js","sourceRoot":"","sources":["../../../../../../src/components/ui/atoms/button/button.csf.ts"],"names":[],"mappings":";;;AAAA,kCAAmC;AAEtB,QAAA,UAAU,GAAG;IACxB,OAAO,EAAE;QACP,OAAO,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC;KACxD;IACD,MAAM,EAAE;QACN,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,4DAA4D;KAClE;CACF,CAAC;AAEW,QAAA,iBAAiB,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AAEjG,QAAA,eAAe,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAE/C,QAAA,QAAQ,GAAG;IACtB,IAAI,EAAE;QACJ,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE;QACzC,WAAW,EAAE,yBAAyB;QACtC,YAAY,EAAE,SAAS;QACvB,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC;SAC9B;KACF;IACD,OAAO,EAAE;QACP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ACb;KACF;CACF,CAAC"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { ComponentMeta } from '@storybook/react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ButtonProps } from './button';
|
|
4
|
-
declare const _default: ComponentMeta<React.FC<ButtonProps>>;
|
|
5
|
-
export default _default;
|
|
6
|
-
/**
|
|
7
|
-
* Button Solid
|
|
8
|
-
* @param args
|
|
9
|
-
* @returns
|
|
10
|
-
*/
|
|
11
|
-
export declare const ButtonSolid: {
|
|
12
|
-
(args: ButtonProps): JSX.Element;
|
|
13
|
-
storyName: string;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Button Outline
|
|
17
|
-
* @param args
|
|
18
|
-
* @returns
|
|
19
|
-
*/
|
|
20
|
-
export declare const ButtonOutline: {
|
|
21
|
-
(args: ButtonProps): JSX.Element;
|
|
22
|
-
storyName: string;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Button Link
|
|
26
|
-
* @param args B
|
|
27
|
-
* @returns
|
|
28
|
-
*/
|
|
29
|
-
export declare const ButtonLink: {
|
|
30
|
-
(args: ButtonProps): JSX.Element;
|
|
31
|
-
storyName: string;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Button Solid Disabled
|
|
35
|
-
* @param args B
|
|
36
|
-
* @returns
|
|
37
|
-
*/
|
|
38
|
-
export declare const ButtonDisabled: {
|
|
39
|
-
(args: ButtonProps): JSX.Element;
|
|
40
|
-
storyName: string;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Button Solid Full Width
|
|
44
|
-
* @param args B
|
|
45
|
-
* @returns
|
|
46
|
-
*/
|
|
47
|
-
export declare const ButtonFullwidth: {
|
|
48
|
-
(args: ButtonProps): JSX.Element[];
|
|
49
|
-
storyName: string;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* Button Solid Icon Only
|
|
53
|
-
* @param args B
|
|
54
|
-
* @returns
|
|
55
|
-
*/
|
|
56
|
-
export declare const ButtonFullIconOnly: {
|
|
57
|
-
(args: ButtonProps): JSX.Element;
|
|
58
|
-
storyName: string;
|
|
59
|
-
};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ButtonFullIconOnly = exports.ButtonFullwidth = exports.ButtonDisabled = exports.ButtonLink = exports.ButtonOutline = exports.ButtonSolid = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const button_1 = require("./button");
|
|
9
|
-
const button_csf_1 = require("./button.csf");
|
|
10
|
-
exports.default = {
|
|
11
|
-
title: 'Components/Atoms/Button',
|
|
12
|
-
component: button_1.Button,
|
|
13
|
-
argTypes: Object.assign(Object.assign({}, button_csf_1.argTypes), { children: {
|
|
14
|
-
type: { name: 'string', required: false },
|
|
15
|
-
description: 'The content to render inside the component.',
|
|
16
|
-
defaultValue: 'Button',
|
|
17
|
-
control: {
|
|
18
|
-
type: 'text'
|
|
19
|
-
}
|
|
20
|
-
} }),
|
|
21
|
-
parameters: button_csf_1.parameters
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Button Solid
|
|
25
|
-
* @param args
|
|
26
|
-
* @returns
|
|
27
|
-
*/
|
|
28
|
-
const ButtonSolid = (args) => {
|
|
29
|
-
const btnVariantOptions = ['primary', 'secondary', 'danger', 'success', 'warning', 'neutral', 'white'];
|
|
30
|
-
return (react_1.default.createElement("div", { className: "flex justify-between p-16" }, btnVariantOptions.map((variant, index) => (react_1.default.createElement(button_1.Button, Object.assign({ key: index }, args, { variant: variant }))))));
|
|
31
|
-
};
|
|
32
|
-
exports.ButtonSolid = ButtonSolid;
|
|
33
|
-
exports.ButtonSolid.storyName = 'Button Solid';
|
|
34
|
-
/**
|
|
35
|
-
* Button Outline
|
|
36
|
-
* @param args
|
|
37
|
-
* @returns
|
|
38
|
-
*/
|
|
39
|
-
const ButtonOutline = (args) => {
|
|
40
|
-
const btnVariantOptions = ['primary', 'danger', 'success', 'warning', 'neutral', 'white'];
|
|
41
|
-
return (react_1.default.createElement("div", { className: "flex justify-between items-center p-16" }, btnVariantOptions.map((variant, index) => (react_1.default.createElement("div", { key: index, className: variant === 'white' ? 'bg-primary-900 p-16 rounded-4' : '' },
|
|
42
|
-
react_1.default.createElement(button_1.Button, Object.assign({}, args, { variant: variant, appearence: "outline" })))))));
|
|
43
|
-
};
|
|
44
|
-
exports.ButtonOutline = ButtonOutline;
|
|
45
|
-
exports.ButtonOutline.storyName = 'Button Outline';
|
|
46
|
-
/**
|
|
47
|
-
* Button Link
|
|
48
|
-
* @param args B
|
|
49
|
-
* @returns
|
|
50
|
-
*/
|
|
51
|
-
const ButtonLink = (args) => {
|
|
52
|
-
const btnVariantOptions = ['primary', 'danger', 'success', 'warning', 'neutral', 'white'];
|
|
53
|
-
return (react_1.default.createElement("div", { className: "flex justify-between items-center p-16" }, btnVariantOptions.map((variant, index) => (react_1.default.createElement("div", { key: index, className: variant === 'white' ? 'bg-primary-900 p-16 rounded-4' : '' },
|
|
54
|
-
react_1.default.createElement(button_1.Button, Object.assign({}, args, { variant: variant, appearence: "link" })))))));
|
|
55
|
-
};
|
|
56
|
-
exports.ButtonLink = ButtonLink;
|
|
57
|
-
exports.ButtonLink.storyName = 'Button Link';
|
|
58
|
-
/**
|
|
59
|
-
* Button Solid Disabled
|
|
60
|
-
* @param args B
|
|
61
|
-
* @returns
|
|
62
|
-
*/
|
|
63
|
-
const ButtonDisabled = (args) => {
|
|
64
|
-
const btnVariantOptions = ['primary', 'secondary', 'danger', 'success', 'warning', 'neutral', 'white'];
|
|
65
|
-
return (react_1.default.createElement("div", { className: "flex justify-between p-16" }, btnVariantOptions.map((variant, index) => (react_1.default.createElement(button_1.Button, Object.assign({ key: index }, args, { variant: variant, appearence: "solid", disabled: true }))))));
|
|
66
|
-
};
|
|
67
|
-
exports.ButtonDisabled = ButtonDisabled;
|
|
68
|
-
exports.ButtonDisabled.storyName = 'Button Disabled';
|
|
69
|
-
/**
|
|
70
|
-
* Button Solid Full Width
|
|
71
|
-
* @param args B
|
|
72
|
-
* @returns
|
|
73
|
-
*/
|
|
74
|
-
const ButtonFullwidth = (args) => {
|
|
75
|
-
const btnVariantOptions = ['primary', 'secondary', 'danger', 'success', 'warning', 'neutral', 'white'];
|
|
76
|
-
return btnVariantOptions.map((variant, index) => (react_1.default.createElement("div", { key: index, className: "p-16" },
|
|
77
|
-
react_1.default.createElement(button_1.Button, Object.assign({}, args, { variant: variant, appearence: "solid", fullWidth: true })))));
|
|
78
|
-
};
|
|
79
|
-
exports.ButtonFullwidth = ButtonFullwidth;
|
|
80
|
-
exports.ButtonFullwidth.storyName = 'Button Full Width';
|
|
81
|
-
/**
|
|
82
|
-
* Button Solid Icon Only
|
|
83
|
-
* @param args B
|
|
84
|
-
* @returns
|
|
85
|
-
*/
|
|
86
|
-
const ButtonFullIconOnly = (args) => {
|
|
87
|
-
const btnVariantOptions = ['primary', 'secondary', 'danger', 'success', 'warning', 'neutral', 'white'];
|
|
88
|
-
return (react_1.default.createElement("div", { className: "flex justify-between p-16" }, btnVariantOptions.map((variant, index) => (react_1.default.createElement(button_1.Button, Object.assign({ key: index }, args, { variant: variant, appearence: "solid", iconOnly: true }))))));
|
|
89
|
-
};
|
|
90
|
-
exports.ButtonFullIconOnly = ButtonFullIconOnly;
|
|
91
|
-
exports.ButtonFullIconOnly.storyName = 'Button Icon Only';
|
|
92
|
-
//# sourceMappingURL=button.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.stories.js","sourceRoot":"","sources":["../../../../../../src/components/ui/atoms/button/button.stories.tsx"],"names":[],"mappings":";;;;;;AACA,kDAA0B;AAC1B,qCAA+C;AAC/C,6CAAoD;AAEpD,kBA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,CAAC"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
export declare const parameters: {
|
|
2
|
-
actions: {
|
|
3
|
-
handles: string[];
|
|
4
|
-
};
|
|
5
|
-
design: {
|
|
6
|
-
type: string;
|
|
7
|
-
url: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export declare const argTypes: {
|
|
11
|
-
label: {
|
|
12
|
-
type: {
|
|
13
|
-
name: string;
|
|
14
|
-
required: boolean;
|
|
15
|
-
};
|
|
16
|
-
description: string;
|
|
17
|
-
defaultValue: string;
|
|
18
|
-
control: {
|
|
19
|
-
type: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
ariaLabel: {
|
|
23
|
-
type: {
|
|
24
|
-
name: string;
|
|
25
|
-
required: boolean;
|
|
26
|
-
};
|
|
27
|
-
description: string;
|
|
28
|
-
defaultValue: string;
|
|
29
|
-
control: {
|
|
30
|
-
type: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
disabled: {
|
|
34
|
-
type: {
|
|
35
|
-
name: string;
|
|
36
|
-
required: boolean;
|
|
37
|
-
};
|
|
38
|
-
description: string;
|
|
39
|
-
defaultValue: null;
|
|
40
|
-
};
|
|
41
|
-
hasError: {
|
|
42
|
-
type: {
|
|
43
|
-
name: string;
|
|
44
|
-
required: boolean;
|
|
45
|
-
};
|
|
46
|
-
description: string;
|
|
47
|
-
defaultValue: boolean;
|
|
48
|
-
};
|
|
49
|
-
hideLabel: {
|
|
50
|
-
type: {
|
|
51
|
-
name: string;
|
|
52
|
-
required: boolean;
|
|
53
|
-
};
|
|
54
|
-
description: string;
|
|
55
|
-
defaultValue: boolean;
|
|
56
|
-
};
|
|
57
|
-
isChecked: {
|
|
58
|
-
type: {
|
|
59
|
-
name: string;
|
|
60
|
-
required: boolean;
|
|
61
|
-
};
|
|
62
|
-
description: string;
|
|
63
|
-
defaultValue: boolean;
|
|
64
|
-
};
|
|
65
|
-
isOptional: {
|
|
66
|
-
type: {
|
|
67
|
-
name: string;
|
|
68
|
-
required: boolean;
|
|
69
|
-
};
|
|
70
|
-
description: string;
|
|
71
|
-
defaultValue: boolean;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.argTypes = exports.parameters = void 0;
|
|
4
|
-
exports.parameters = {
|
|
5
|
-
actions: {
|
|
6
|
-
handles: ['mouseenter', 'click', 'focusin', 'focusout']
|
|
7
|
-
},
|
|
8
|
-
design: {
|
|
9
|
-
type: 'zeroheight',
|
|
10
|
-
url: 'https://zeroheight.com/1be481dc2/p/489b41-buttons/b/026ea1'
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
exports.argTypes = {
|
|
14
|
-
label: {
|
|
15
|
-
type: { name: 'string', required: true },
|
|
16
|
-
description: 'Checkbox descriptive label',
|
|
17
|
-
defaultValue: 'Lorem ipsum dolor sit amet',
|
|
18
|
-
control: {
|
|
19
|
-
type: 'text'
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
ariaLabel: {
|
|
23
|
-
type: { name: 'string', required: false },
|
|
24
|
-
description: 'Descritive attribute that labels the checkbox in terms of accessibility',
|
|
25
|
-
defaultValue: '',
|
|
26
|
-
control: {
|
|
27
|
-
type: 'text'
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
disabled: {
|
|
31
|
-
type: { name: 'boolean', required: false },
|
|
32
|
-
description: 'Indicate if this field is able to be selected',
|
|
33
|
-
defaultValue: null
|
|
34
|
-
},
|
|
35
|
-
hasError: {
|
|
36
|
-
type: { name: 'boolean', required: false },
|
|
37
|
-
description: 'Indicate that this field has error',
|
|
38
|
-
defaultValue: false
|
|
39
|
-
},
|
|
40
|
-
hideLabel: {
|
|
41
|
-
type: { name: 'boolean', required: false },
|
|
42
|
-
description: 'Should display/hide label',
|
|
43
|
-
defaultValue: false
|
|
44
|
-
},
|
|
45
|
-
isChecked: {
|
|
46
|
-
type: { name: 'boolean', required: false },
|
|
47
|
-
description: 'Should this field must start checked',
|
|
48
|
-
defaultValue: false
|
|
49
|
-
},
|
|
50
|
-
isOptional: {
|
|
51
|
-
type: { name: 'boolean', required: false },
|
|
52
|
-
description: 'Decides if this field could be optional',
|
|
53
|
-
defaultValue: false
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=checkbox.csf.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.csf.js","sourceRoot":"","sources":["../../../../../../src/components/ui/atoms/checkbox/checkbox.csf.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;IACxB,OAAO,EAAE;QACP,OAAO,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC;KACxD;IACD,MAAM,EAAE;QACN,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,4DAA4D;KAClE;CACF,CAAC;AAEW,QAAA,QAAQ,GAAG;IACtB,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACxC,WAAW,EAAE,4BAA4B;QACzC,YAAY,EAAE,4BAA4B;QAC1C,OAAO,EAAE;YACP,IAAI,EAAE,MAAM;SACb;KACF;IACD,SAAS,EAAE;QACT,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE;QACzC,WAAW,EAAE,yEAAyE;QACtF,YAAY,EAAE,EAAE;QAChB,OAAO,EAAE;YACP,IAAI,EAAE,MAAM;SACb;KACF;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC1C,WAAW,EAAE,+CAA+C;QAC5D,YAAY,EAAE,IAAI;KACnB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC1C,WAAW,EAAE,oCAAoC;QACjD,YAAY,EAAE,KAAK;KACpB;IACD,SAAS,EAAE;QACT,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC1C,WAAW,EAAE,2BAA2B;QACxC,YAAY,EAAE,KAAK;KACpB;IACD,SAAS,EAAE;QACT,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC1C,WAAW,EAAE,sCAAsC;QACnD,YAAY,EAAE,KAAK;KACpB;IACD,UAAU,EAAE;QACV,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC1C,WAAW,EAAE,yCAAyC;QACtD,YAAY,EAAE,KAAK;KACpB;CACF,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { ComponentMeta } from '@storybook/react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { CheckboxProps } from './checkbox';
|
|
4
|
-
declare const _default: ComponentMeta<React.FC<CheckboxProps>>;
|
|
5
|
-
export default _default;
|
|
6
|
-
export declare const CheckboxDefault: {
|
|
7
|
-
(args: CheckboxProps): JSX.Element;
|
|
8
|
-
storyName: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const CheckboxChildren: {
|
|
11
|
-
(args: CheckboxProps): JSX.Element;
|
|
12
|
-
storyName: string;
|
|
13
|
-
};
|
|
14
|
-
export declare const CheckboxNoLabel: {
|
|
15
|
-
(args: CheckboxProps): JSX.Element;
|
|
16
|
-
storyName: string;
|
|
17
|
-
};
|
|
18
|
-
export declare const CheckboxDisabled: {
|
|
19
|
-
(args: CheckboxProps): JSX.Element;
|
|
20
|
-
storyName: string;
|
|
21
|
-
};
|
|
22
|
-
export declare const CheckboxDisabledSelected: {
|
|
23
|
-
(args: CheckboxProps): JSX.Element;
|
|
24
|
-
storyName: string;
|
|
25
|
-
};
|
|
26
|
-
export declare const CheckboxHasError: {
|
|
27
|
-
(args: CheckboxProps): JSX.Element;
|
|
28
|
-
storyName: string;
|
|
29
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CheckboxHasError = exports.CheckboxDisabledSelected = exports.CheckboxDisabled = exports.CheckboxNoLabel = exports.CheckboxChildren = exports.CheckboxDefault = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const checkbox_1 = require("./checkbox");
|
|
9
|
-
const checkbox_csf_1 = require("./checkbox.csf");
|
|
10
|
-
exports.default = {
|
|
11
|
-
title: 'Components/Atoms/Checkbox',
|
|
12
|
-
argTypes: Object.assign({}, checkbox_csf_1.argTypes),
|
|
13
|
-
component: checkbox_1.Checkbox
|
|
14
|
-
};
|
|
15
|
-
const CheckboxDefault = (args) => {
|
|
16
|
-
return (react_1.default.createElement("div", { className: "p-16" },
|
|
17
|
-
react_1.default.createElement(checkbox_1.Checkbox, Object.assign({}, args, { id: "form-checkbox", name: "input-name" }))));
|
|
18
|
-
};
|
|
19
|
-
exports.CheckboxDefault = CheckboxDefault;
|
|
20
|
-
exports.CheckboxDefault.storyName = 'Checkbox';
|
|
21
|
-
const CheckboxChildren = (args) => {
|
|
22
|
-
return (react_1.default.createElement("div", { className: "p-16" },
|
|
23
|
-
react_1.default.createElement(checkbox_1.Checkbox, Object.assign({}, args, { id: "form-checkbox", name: "input-name" }),
|
|
24
|
-
react_1.default.createElement("div", null,
|
|
25
|
-
react_1.default.createElement("p", null,
|
|
26
|
-
"I declare that I read and accept uncondicionally",
|
|
27
|
-
' ',
|
|
28
|
-
react_1.default.createElement("a", { target: "_blank", className: "underline text-primary-600", href: "http://google.com", rel: "noreferrer" }, "Terms"),
|
|
29
|
-
' ',
|
|
30
|
-
"and",
|
|
31
|
-
' ',
|
|
32
|
-
react_1.default.createElement("a", { target: "_blank", className: "underline text-primary-600", href: "http://google.com", rel: "noreferrer" }, "Conditions"),
|
|
33
|
-
' ',
|
|
34
|
-
"of Agora Design System.")))));
|
|
35
|
-
};
|
|
36
|
-
exports.CheckboxChildren = CheckboxChildren;
|
|
37
|
-
exports.CheckboxChildren.storyName = 'Checkbox Custom Children';
|
|
38
|
-
const CheckboxNoLabel = (args) => {
|
|
39
|
-
return (react_1.default.createElement("div", { className: "p-16" },
|
|
40
|
-
react_1.default.createElement(checkbox_1.Checkbox, Object.assign({}, args, { id: "form-checkbox", name: "input-name", hideLabel: true }))));
|
|
41
|
-
};
|
|
42
|
-
exports.CheckboxNoLabel = CheckboxNoLabel;
|
|
43
|
-
exports.CheckboxNoLabel.storyName = 'Checkbox No Label';
|
|
44
|
-
const CheckboxDisabled = (args) => {
|
|
45
|
-
return (react_1.default.createElement("div", { className: "p-16" },
|
|
46
|
-
react_1.default.createElement(checkbox_1.Checkbox, Object.assign({}, args, { id: "form-checkbox", name: "input-name", disabled: true }))));
|
|
47
|
-
};
|
|
48
|
-
exports.CheckboxDisabled = CheckboxDisabled;
|
|
49
|
-
exports.CheckboxDisabled.storyName = 'Checkbox Disabled';
|
|
50
|
-
const CheckboxDisabledSelected = (args) => {
|
|
51
|
-
return (react_1.default.createElement("div", { className: "p-16" },
|
|
52
|
-
react_1.default.createElement(checkbox_1.Checkbox, Object.assign({}, args, { id: "form-checkbox", name: "input-name", disabled: true, isChecked: true }))));
|
|
53
|
-
};
|
|
54
|
-
exports.CheckboxDisabledSelected = CheckboxDisabledSelected;
|
|
55
|
-
exports.CheckboxDisabledSelected.storyName = 'Checkbox Disabled Selected';
|
|
56
|
-
const CheckboxHasError = (args) => {
|
|
57
|
-
return (react_1.default.createElement("div", { className: "p-16" },
|
|
58
|
-
react_1.default.createElement(checkbox_1.Checkbox, Object.assign({}, args, { id: "form-checkbox", name: "input-name", hasError: true }))));
|
|
59
|
-
};
|
|
60
|
-
exports.CheckboxHasError = CheckboxHasError;
|
|
61
|
-
exports.CheckboxHasError.storyName = 'Checkbox Has Error';
|
|
62
|
-
//# sourceMappingURL=checkbox.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.stories.js","sourceRoot":"","sources":["../../../../../../src/components/ui/atoms/checkbox/checkbox.stories.tsx"],"names":[],"mappings":";;;;;;AACA,kDAA0B;AAC1B,yCAAqD;AACrD,iDAA0C;AAE1C,kBAAe;IACb,KAAK,EAAE,2BAA2B;IAClC,QAAQ,oBACH,uBAAQ,CACZ;IACD,SAAS,EAAE,mBAAQ;CACc,CAAC;AAE7B,MAAM,eAAe,GAAG,CAAC,IAAmB,EAAE,EAAE;IACrD,OAAO,CACL,uCAAK,SAAS,EAAC,MAAM;QACnB,8BAAC,mBAAQ,oBAAK,IAAI,IAAE,EAAE,EAAC,eAAe,EAAC,IAAI,EAAC,YAAY,IAAG,CACvD,CACP,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,eAAe,mBAM1B;AACF,uBAAe,CAAC,SAAS,GAAG,UAAU,CAAC;AAEhC,MAAM,gBAAgB,GAAG,CAAC,IAAmB,EAAE,EAAE;IACtD,OAAO,CACL,uCAAK,SAAS,EAAC,MAAM;QACnB,8BAAC,mBAAQ,oBAAK,IAAI,IAAE,EAAE,EAAC,eAAe,EAAC,IAAI,EAAC,YAAY;YACtD;gBACE;;oBACmD,GAAG;oBACpD,qCAAG,MAAM,EAAC,QAAQ,EAAC,SAAS,EAAC,4BAA4B,EAAC,IAAI,EAAC,mBAAmB,EAAC,GAAG,EAAC,YAAY,YAE/F;oBAAC,GAAG;;oBACJ,GAAG;oBACP,qCAAG,MAAM,EAAC,QAAQ,EAAC,SAAS,EAAC,4BAA4B,EAAC,IAAI,EAAC,mBAAmB,EAAC,GAAG,EAAC,YAAY,iBAE/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EAAC,YAAY,EAAC,QAAQ,UAAG,CAChE,CACP,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,gBAAgB,oBAM3B;AACF,wBAAgB,CAAC,SAAS,GAAG,oBAAoB,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ComponentMeta, Story } from '@storybook/react';
|
|
3
|
-
import { IconProps } from './icon';
|
|
4
|
-
declare const _default: ComponentMeta<React.FC<IconProps>>;
|
|
5
|
-
export default _default;
|
|
6
|
-
export declare const Size: Story<IconProps>;
|
|
7
|
-
export declare const ExternalImage: Story<IconProps>;
|
|
8
|
-
export declare const IconList: Story<IconProps>;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.IconList = exports.ExternalImage = exports.Size = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const assets_1 = require("./assets");
|
|
9
|
-
const icon_1 = require("./icon");
|
|
10
|
-
exports.default = {
|
|
11
|
-
title: 'Components/Atoms/Icon'
|
|
12
|
-
};
|
|
13
|
-
const dimensions = ['xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl'];
|
|
14
|
-
const Size = ({ icon }) => {
|
|
15
|
-
return (react_1.default.createElement("div", { className: "bg-neutral-100" }, dimensions.map((size) => (react_1.default.createElement(icon_1.Icon, { className: "p-1", key: size, size: size, icon: icon, ariaHidden: true })))));
|
|
16
|
-
};
|
|
17
|
-
exports.Size = Size;
|
|
18
|
-
exports.Size.storyName = 'Size';
|
|
19
|
-
exports.Size.argTypes = {
|
|
20
|
-
icon: {
|
|
21
|
-
description: 'Icon name or external image url',
|
|
22
|
-
defaultValue: 'no-icon',
|
|
23
|
-
control: {
|
|
24
|
-
type: 'select',
|
|
25
|
-
options: ['no-icon', ...assets_1.allIcons]
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
const ExternalImage = ({ icon, size }) => {
|
|
30
|
-
return react_1.default.createElement(icon_1.Icon, { icon: icon || 'https://picsum.photos/50', size: size || 'm', ariaHidden: true });
|
|
31
|
-
};
|
|
32
|
-
exports.ExternalImage = ExternalImage;
|
|
33
|
-
exports.ExternalImage.storyName = 'External Image';
|
|
34
|
-
exports.ExternalImage.argTypes = {
|
|
35
|
-
icon: {
|
|
36
|
-
description: 'Icon name or external image url',
|
|
37
|
-
control: 'text'
|
|
38
|
-
},
|
|
39
|
-
size: {
|
|
40
|
-
description: 'Icon size to be used',
|
|
41
|
-
defaultValue: 'm',
|
|
42
|
-
control: {
|
|
43
|
-
type: 'select',
|
|
44
|
-
options: dimensions.map((i) => i.toUpperCase())
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
const IconList = ({ size }) => {
|
|
49
|
-
return (react_1.default.createElement("div", { className: "grid md:grid-cols-3 bg-neutral-100" }, assets_1.allIcons.map((icon) => (react_1.default.createElement("div", { className: "flex items-center", key: icon },
|
|
50
|
-
react_1.default.createElement(icon_1.Icon, { icon: icon, size: size || 'm', ariaHidden: true }),
|
|
51
|
-
react_1.default.createElement("span", { className: "pl-8" }, icon))))));
|
|
52
|
-
};
|
|
53
|
-
exports.IconList = IconList;
|
|
54
|
-
exports.IconList.storyName = 'List';
|
|
55
|
-
exports.IconList.argTypes = {
|
|
56
|
-
size: {
|
|
57
|
-
description: 'Icon size to be used',
|
|
58
|
-
defaultValue: 'm',
|
|
59
|
-
control: {
|
|
60
|
-
type: 'select',
|
|
61
|
-
options: dimensions.map((i) => i.toUpperCase())
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
//# sourceMappingURL=icon.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"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