@dktunited-techoff/techoff-suite-ui 1.3.1 → 1.4.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/esm/components/TsInput/TsInput/TsInput.css +43 -0
- package/esm/components/TsInput/TsInput/TsInput.d.ts +4 -0
- package/esm/components/TsInput/TsInput/TsInput.js +12 -0
- package/esm/components/TsInput/TsInput/TsInput.js.map +1 -0
- package/esm/components/TsInput/TsInput/TsInput.tsx +19 -0
- package/esm/components/TsInput/TsInput/TsInput.types.d.ts +5 -0
- package/esm/components/TsInput/TsInput/TsInput.types.js +2 -0
- package/esm/components/TsInput/TsInput/TsInput.types.js.map +1 -0
- package/esm/components/TsInput/TsInput/TsInput.types.tsx +6 -0
- package/esm/components/TsInput/TsInput/__stories__/TsInput.stories.mdx +34 -0
- package/lib/components/TsInput/TsInput/TsInput.css +43 -0
- package/lib/components/TsInput/TsInput/TsInput.d.ts +4 -0
- package/lib/components/TsInput/TsInput/TsInput.js +16 -0
- package/lib/components/TsInput/TsInput/TsInput.js.map +1 -0
- package/lib/components/TsInput/TsInput/TsInput.tsx +19 -0
- package/lib/components/TsInput/TsInput/TsInput.types.d.ts +5 -0
- package/lib/components/TsInput/TsInput/TsInput.types.js +3 -0
- package/lib/components/TsInput/TsInput/TsInput.types.js.map +1 -0
- package/lib/components/TsInput/TsInput/TsInput.types.tsx +6 -0
- package/lib/components/TsInput/TsInput/__stories__/TsInput.stories.mdx +34 -0
- package/package.json +1 -1
- package/src/components/TsInput/TsInput/TsInput.css +43 -0
- package/src/components/TsInput/TsInput/TsInput.tsx +19 -0
- package/src/components/TsInput/TsInput/TsInput.types.tsx +6 -0
- package/src/components/TsInput/TsInput/__stories__/TsInput.stories.mdx +34 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.ts-input {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 32px;
|
|
5
|
+
}
|
|
6
|
+
input {
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
padding: 0 10px;
|
|
10
|
+
border: 1px solid #949494;
|
|
11
|
+
font-weight: 600;
|
|
12
|
+
}
|
|
13
|
+
input::placeholder {
|
|
14
|
+
font-weight: 400;
|
|
15
|
+
}
|
|
16
|
+
input:focus {
|
|
17
|
+
border: 1.5px solid #3643ba;
|
|
18
|
+
}
|
|
19
|
+
.ts-input--padding-1 input {
|
|
20
|
+
padding: 0 30px 0 10px;
|
|
21
|
+
}
|
|
22
|
+
.ts-input-icon {
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 0;
|
|
25
|
+
right: 0;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
width: 32px;
|
|
30
|
+
min-width: 32px;
|
|
31
|
+
height: 32px;
|
|
32
|
+
color: #949494;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* ######### */
|
|
36
|
+
/* GLOBALS */
|
|
37
|
+
* {
|
|
38
|
+
font-size: 14px;
|
|
39
|
+
outline: none;
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
|
|
42
|
+
'Helvetica Neue', sans-serif;
|
|
43
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TsIcon } from '../../TsIcon/TsIcon';
|
|
3
|
+
import './TsInput.css';
|
|
4
|
+
export const TsInput = ({ icon, value, onChange, ...props }) => {
|
|
5
|
+
// #########
|
|
6
|
+
// Rendering
|
|
7
|
+
return (React.createElement("div", { className: `ts-input ${icon ? 'ts-input--padding-1' : ''}` },
|
|
8
|
+
React.createElement("input", { type: "text", value: value, onChange: e => onChange(e.target.value), ...props }),
|
|
9
|
+
icon && (React.createElement("div", { className: "ts-input-icon" },
|
|
10
|
+
React.createElement(TsIcon, { name: icon, size: "16" })))));
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=TsInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TsInput.js","sourceRoot":"","sources":["../../../../src/components/TsInput/TsInput/TsInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,eAAe,CAAC;AAEvB,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAgB,EAAE,EAAE;IAC3E,YAAY;IACZ,YAAY;IACZ,OAAO,CACL,6BAAK,SAAS,EAAE,YAAY,IAAI,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,EAAE;QAC7D,+BAAO,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAM,KAAK,GAAI;QACtF,IAAI,IAAI,CACP,6BAAK,SAAS,EAAC,eAAe;YAC5B,oBAAC,MAAM,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,GAAG,CAC5B,CACP,CACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TsIcon } from '../../TsIcon/TsIcon';
|
|
3
|
+
import { TsInputProps } from './TsInput.types';
|
|
4
|
+
import './TsInput.css';
|
|
5
|
+
|
|
6
|
+
export const TsInput = ({ icon, value, onChange, ...props }: TsInputProps) => {
|
|
7
|
+
// #########
|
|
8
|
+
// Rendering
|
|
9
|
+
return (
|
|
10
|
+
<div className={`ts-input ${icon ? 'ts-input--padding-1' : ''}`}>
|
|
11
|
+
<input type="text" value={value} onChange={e => onChange(e.target.value)} {...props} />
|
|
12
|
+
{icon && (
|
|
13
|
+
<div className="ts-input-icon">
|
|
14
|
+
<TsIcon name={icon} size="16" />
|
|
15
|
+
</div>
|
|
16
|
+
)}
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TsInput.types.js","sourceRoot":"","sources":["../../../../src/components/TsInput/TsInput/TsInput.types.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
|
|
3
|
+
import { TsInput } from '../TsInput';
|
|
4
|
+
import { icons } from '../../../TsIcon/icons';
|
|
5
|
+
|
|
6
|
+
<Meta title="Components/Input" />
|
|
7
|
+
|
|
8
|
+
export const inputArgTypes = {
|
|
9
|
+
icon: {
|
|
10
|
+
control: 'select',
|
|
11
|
+
options: Object.keys(icons),
|
|
12
|
+
description: 'Icon of the button.',
|
|
13
|
+
},
|
|
14
|
+
placeholder: {
|
|
15
|
+
control: 'text',
|
|
16
|
+
description: 'Placeholder of the button.',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
# Input
|
|
21
|
+
|
|
22
|
+
Input allows the user to enter content and data when the expected user input is a single line of text.
|
|
23
|
+
|
|
24
|
+
## Overview
|
|
25
|
+
|
|
26
|
+
<Canvas>
|
|
27
|
+
<Story name="Overview" args={{ onChange: () => {} }} argTypes={inputArgTypes}>
|
|
28
|
+
{args => <TsInput {...args} />}
|
|
29
|
+
</Story>
|
|
30
|
+
</Canvas>
|
|
31
|
+
|
|
32
|
+
## Props
|
|
33
|
+
|
|
34
|
+
<ArgsTable story="Overview" of={TsInput} />
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.ts-input {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 32px;
|
|
5
|
+
}
|
|
6
|
+
input {
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
padding: 0 10px;
|
|
10
|
+
border: 1px solid #949494;
|
|
11
|
+
font-weight: 600;
|
|
12
|
+
}
|
|
13
|
+
input::placeholder {
|
|
14
|
+
font-weight: 400;
|
|
15
|
+
}
|
|
16
|
+
input:focus {
|
|
17
|
+
border: 1.5px solid #3643ba;
|
|
18
|
+
}
|
|
19
|
+
.ts-input--padding-1 input {
|
|
20
|
+
padding: 0 30px 0 10px;
|
|
21
|
+
}
|
|
22
|
+
.ts-input-icon {
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 0;
|
|
25
|
+
right: 0;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
width: 32px;
|
|
30
|
+
min-width: 32px;
|
|
31
|
+
height: 32px;
|
|
32
|
+
color: #949494;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* ######### */
|
|
36
|
+
/* GLOBALS */
|
|
37
|
+
* {
|
|
38
|
+
font-size: 14px;
|
|
39
|
+
outline: none;
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
|
|
42
|
+
'Helvetica Neue', sans-serif;
|
|
43
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TsInput = void 0;
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const TsIcon_1 = require("../../TsIcon/TsIcon");
|
|
6
|
+
require("./TsInput.css");
|
|
7
|
+
const TsInput = ({ icon, value, onChange, ...props }) => {
|
|
8
|
+
// #########
|
|
9
|
+
// Rendering
|
|
10
|
+
return (React.createElement("div", { className: `ts-input ${icon ? 'ts-input--padding-1' : ''}` },
|
|
11
|
+
React.createElement("input", { type: "text", value: value, onChange: e => onChange(e.target.value), ...props }),
|
|
12
|
+
icon && (React.createElement("div", { className: "ts-input-icon" },
|
|
13
|
+
React.createElement(TsIcon_1.TsIcon, { name: icon, size: "16" })))));
|
|
14
|
+
};
|
|
15
|
+
exports.TsInput = TsInput;
|
|
16
|
+
//# sourceMappingURL=TsInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TsInput.js","sourceRoot":"","sources":["../../../../src/components/TsInput/TsInput/TsInput.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,gDAA6C;AAE7C,yBAAuB;AAEhB,MAAM,OAAO,GAAG,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAgB,EAAE,EAAE;IAC3E,YAAY;IACZ,YAAY;IACZ,OAAO,CACL,6BAAK,SAAS,EAAE,YAAY,IAAI,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,EAAE;QAC7D,+BAAO,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAM,KAAK,GAAI;QACtF,IAAI,IAAI,CACP,6BAAK,SAAS,EAAC,eAAe;YAC5B,oBAAC,eAAM,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,GAAG,CAC5B,CACP,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,OAAO,WAalB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TsIcon } from '../../TsIcon/TsIcon';
|
|
3
|
+
import { TsInputProps } from './TsInput.types';
|
|
4
|
+
import './TsInput.css';
|
|
5
|
+
|
|
6
|
+
export const TsInput = ({ icon, value, onChange, ...props }: TsInputProps) => {
|
|
7
|
+
// #########
|
|
8
|
+
// Rendering
|
|
9
|
+
return (
|
|
10
|
+
<div className={`ts-input ${icon ? 'ts-input--padding-1' : ''}`}>
|
|
11
|
+
<input type="text" value={value} onChange={e => onChange(e.target.value)} {...props} />
|
|
12
|
+
{icon && (
|
|
13
|
+
<div className="ts-input-icon">
|
|
14
|
+
<TsIcon name={icon} size="16" />
|
|
15
|
+
</div>
|
|
16
|
+
)}
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TsInput.types.js","sourceRoot":"","sources":["../../../../src/components/TsInput/TsInput/TsInput.types.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
|
|
3
|
+
import { TsInput } from '../TsInput';
|
|
4
|
+
import { icons } from '../../../TsIcon/icons';
|
|
5
|
+
|
|
6
|
+
<Meta title="Components/Input" />
|
|
7
|
+
|
|
8
|
+
export const inputArgTypes = {
|
|
9
|
+
icon: {
|
|
10
|
+
control: 'select',
|
|
11
|
+
options: Object.keys(icons),
|
|
12
|
+
description: 'Icon of the button.',
|
|
13
|
+
},
|
|
14
|
+
placeholder: {
|
|
15
|
+
control: 'text',
|
|
16
|
+
description: 'Placeholder of the button.',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
# Input
|
|
21
|
+
|
|
22
|
+
Input allows the user to enter content and data when the expected user input is a single line of text.
|
|
23
|
+
|
|
24
|
+
## Overview
|
|
25
|
+
|
|
26
|
+
<Canvas>
|
|
27
|
+
<Story name="Overview" args={{ onChange: () => {} }} argTypes={inputArgTypes}>
|
|
28
|
+
{args => <TsInput {...args} />}
|
|
29
|
+
</Story>
|
|
30
|
+
</Canvas>
|
|
31
|
+
|
|
32
|
+
## Props
|
|
33
|
+
|
|
34
|
+
<ArgsTable story="Overview" of={TsInput} />
|
package/package.json
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.ts-input {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 32px;
|
|
5
|
+
}
|
|
6
|
+
input {
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
padding: 0 10px;
|
|
10
|
+
border: 1px solid #949494;
|
|
11
|
+
font-weight: 600;
|
|
12
|
+
}
|
|
13
|
+
input::placeholder {
|
|
14
|
+
font-weight: 400;
|
|
15
|
+
}
|
|
16
|
+
input:focus {
|
|
17
|
+
border: 1.5px solid #3643ba;
|
|
18
|
+
}
|
|
19
|
+
.ts-input--padding-1 input {
|
|
20
|
+
padding: 0 30px 0 10px;
|
|
21
|
+
}
|
|
22
|
+
.ts-input-icon {
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 0;
|
|
25
|
+
right: 0;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
width: 32px;
|
|
30
|
+
min-width: 32px;
|
|
31
|
+
height: 32px;
|
|
32
|
+
color: #949494;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* ######### */
|
|
36
|
+
/* GLOBALS */
|
|
37
|
+
* {
|
|
38
|
+
font-size: 14px;
|
|
39
|
+
outline: none;
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',
|
|
42
|
+
'Helvetica Neue', sans-serif;
|
|
43
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TsIcon } from '../../TsIcon/TsIcon';
|
|
3
|
+
import { TsInputProps } from './TsInput.types';
|
|
4
|
+
import './TsInput.css';
|
|
5
|
+
|
|
6
|
+
export const TsInput = ({ icon, value, onChange, ...props }: TsInputProps) => {
|
|
7
|
+
// #########
|
|
8
|
+
// Rendering
|
|
9
|
+
return (
|
|
10
|
+
<div className={`ts-input ${icon ? 'ts-input--padding-1' : ''}`}>
|
|
11
|
+
<input type="text" value={value} onChange={e => onChange(e.target.value)} {...props} />
|
|
12
|
+
{icon && (
|
|
13
|
+
<div className="ts-input-icon">
|
|
14
|
+
<TsIcon name={icon} size="16" />
|
|
15
|
+
</div>
|
|
16
|
+
)}
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ArgsTable, Canvas, Meta, Story } from '@storybook/blocks';
|
|
3
|
+
import { TsInput } from '../TsInput';
|
|
4
|
+
import { icons } from '../../../TsIcon/icons';
|
|
5
|
+
|
|
6
|
+
<Meta title="Components/Input" />
|
|
7
|
+
|
|
8
|
+
export const inputArgTypes = {
|
|
9
|
+
icon: {
|
|
10
|
+
control: 'select',
|
|
11
|
+
options: Object.keys(icons),
|
|
12
|
+
description: 'Icon of the button.',
|
|
13
|
+
},
|
|
14
|
+
placeholder: {
|
|
15
|
+
control: 'text',
|
|
16
|
+
description: 'Placeholder of the button.',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
# Input
|
|
21
|
+
|
|
22
|
+
Input allows the user to enter content and data when the expected user input is a single line of text.
|
|
23
|
+
|
|
24
|
+
## Overview
|
|
25
|
+
|
|
26
|
+
<Canvas>
|
|
27
|
+
<Story name="Overview" args={{ onChange: () => {} }} argTypes={inputArgTypes}>
|
|
28
|
+
{args => <TsInput {...args} />}
|
|
29
|
+
</Story>
|
|
30
|
+
</Canvas>
|
|
31
|
+
|
|
32
|
+
## Props
|
|
33
|
+
|
|
34
|
+
<ArgsTable story="Overview" of={TsInput} />
|