@dev-crew-berlin/enter-js-utils 0.31.0 → 0.32.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/api-client/api-base.js +1 -1
- package/dist/ui/form-elements/search-input.d.ts +8 -0
- package/dist/ui/form-elements/search-input.js +29 -0
- package/dist/ui/form-elements/search-input.stories.d.ts +13 -0
- package/dist/ui/form-elements/search-input.stories.js +16 -0
- package/dist/ui/icons/{caret.d.ts → caret-icon.d.ts} +1 -1
- package/dist/ui/icons/{caret.js → caret-icon.js} +1 -1
- package/dist/ui/icons/{caret.stories.d.ts → caret-icon.stories.d.ts} +0 -0
- package/dist/ui/icons/{caret.stories.js → caret-icon.stories.js} +3 -3
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.js +6 -0
- package/package.json +9 -9
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FunctionComponent, InputHTMLAttributes } from 'react';
|
|
2
|
+
declare type Props = InputHTMLAttributes<HTMLInputElement> & {
|
|
3
|
+
textColor: string;
|
|
4
|
+
borderColor: string;
|
|
5
|
+
placeholder: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const SearchInput: FunctionComponent<Props>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import _JSXStyle from "styled-jsx/style";
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
import React, { useId } from 'react';
|
|
6
|
+
import { theme } from '../../lib';
|
|
7
|
+
import { SearchIcon } from '../icons/search-icon';
|
|
8
|
+
export const SearchInput = ({
|
|
9
|
+
textColor = theme.colors.enterDarkGrey,
|
|
10
|
+
borderColor = theme.colors.enterMediumGrey,
|
|
11
|
+
placeholder = 'Search',
|
|
12
|
+
...props
|
|
13
|
+
}) => {
|
|
14
|
+
const id = useId();
|
|
15
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: _JSXStyle.dynamic([["1366111563", [theme.fonts.primary, textColor, borderColor, theme.colors.enterRed]]]) + " " + 'search-input'
|
|
17
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
className: _JSXStyle.dynamic([["1366111563", [theme.fonts.primary, textColor, borderColor, theme.colors.enterRed]]]) + " " + 'icon'
|
|
19
|
+
}, /*#__PURE__*/React.createElement(SearchIcon, {
|
|
20
|
+
color: textColor
|
|
21
|
+
})), /*#__PURE__*/React.createElement("input", _extends({}, props, {
|
|
22
|
+
placeholder: placeholder,
|
|
23
|
+
id: id,
|
|
24
|
+
className: _JSXStyle.dynamic([["1366111563", [theme.fonts.primary, textColor, borderColor, theme.colors.enterRed]]]) + " " + (props && props.className != null && props.className || "")
|
|
25
|
+
})), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
26
|
+
id: "1366111563",
|
|
27
|
+
dynamic: [theme.fonts.primary, textColor, borderColor, theme.colors.enterRed]
|
|
28
|
+
}, `.search-input.__jsx-style-dynamic-selector{display:grid;grid-template-areas:'icon-input';-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:1.1em;}.icon.__jsx-style-dynamic-selector{grid-area:icon-input;width:12px;height:14px;margin:0 0 0 0.2em;}input.__jsx-style-dynamic-selector{grid-area:icon-input;font-family:${theme.fonts.primary};font-size:1.1em;display:block;width:calc(100% - 20px);padding:0.2em 0 0.2em 20px;border:none;outline:none;background-color:transparent;color:${textColor};border-bottom:1px solid ${borderColor};border-radius:0;-webkit-transition:border-color 0.2s;transition:border-color 0.2s;}input.__jsx-style-dynamic-selector:focus{border-color:${theme.colors.enterRed};}`));
|
|
29
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const _default: ComponentMeta<React.FunctionComponent<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
4
|
+
textColor: string;
|
|
5
|
+
borderColor: string;
|
|
6
|
+
placeholder: string;
|
|
7
|
+
}>>;
|
|
8
|
+
export default _default;
|
|
9
|
+
export declare const Basic: ComponentStory<React.FunctionComponent<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
10
|
+
textColor: string;
|
|
11
|
+
borderColor: string;
|
|
12
|
+
placeholder: string;
|
|
13
|
+
}>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SearchInput } from './search-input';
|
|
3
|
+
import { theme } from '../../lib';
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Form Elements/SearchInput',
|
|
6
|
+
component: SearchInput
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = args => /*#__PURE__*/React.createElement(SearchInput, args);
|
|
10
|
+
|
|
11
|
+
export const Basic = Template.bind({});
|
|
12
|
+
Basic.args = {
|
|
13
|
+
textColor: theme.colors.enterDarkGrey,
|
|
14
|
+
borderColor: theme.colors.enterMediumGrey,
|
|
15
|
+
placeholder: 'Search'
|
|
16
|
+
};
|
|
File without changes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { CaretIcon } from './caret-icon';
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Icons/Caret',
|
|
5
|
-
component:
|
|
5
|
+
component: CaretIcon
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
-
const Template = args => /*#__PURE__*/React.createElement(
|
|
8
|
+
const Template = args => /*#__PURE__*/React.createElement(CaretIcon, args);
|
|
9
9
|
|
|
10
10
|
export const Basic = Template.bind({});
|
|
11
11
|
Basic.args = {};
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
export { Input } from './form-elements/input';
|
|
2
2
|
export { Label } from './form-elements/label';
|
|
3
|
+
export { SearchInput } from './form-elements/search-input';
|
|
3
4
|
export { SegmentedControl } from './form-elements/segmented-control';
|
|
5
|
+
export { AddGuestIcon } from './icons/add-guest-icon';
|
|
6
|
+
export { CaretIcon } from './icons/caret-icon';
|
|
7
|
+
export { FilterIcon } from './icons/filter-icon';
|
|
8
|
+
export { SearchIcon } from './icons/search-icon';
|
|
4
9
|
export { SettingsIcon } from './icons/settings-icon';
|
|
10
|
+
export { SortListIcon } from './icons/sort-list-icon';
|
|
5
11
|
export { Button } from './button';
|
|
6
12
|
export { CheckinCountIndicator } from './checkin-count-indicator';
|
|
7
13
|
export { CheckinProgressBar } from './checkin-progress-bar';
|
package/dist/ui/index.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
export { Input } from './form-elements/input';
|
|
2
2
|
export { Label } from './form-elements/label';
|
|
3
|
+
export { SearchInput } from './form-elements/search-input';
|
|
3
4
|
export { SegmentedControl } from './form-elements/segmented-control';
|
|
5
|
+
export { AddGuestIcon } from './icons/add-guest-icon';
|
|
6
|
+
export { CaretIcon } from './icons/caret-icon';
|
|
7
|
+
export { FilterIcon } from './icons/filter-icon';
|
|
8
|
+
export { SearchIcon } from './icons/search-icon';
|
|
4
9
|
export { SettingsIcon } from './icons/settings-icon';
|
|
10
|
+
export { SortListIcon } from './icons/sort-list-icon';
|
|
5
11
|
export { Button } from './button';
|
|
6
12
|
export { CheckinCountIndicator } from './checkin-count-indicator';
|
|
7
13
|
export { CheckinProgressBar } from './checkin-progress-bar';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dev-crew-berlin/enter-js-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "utils such as vaildation and other helpers to work with data from the enter app",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
"@babel/preset-react": "^7.17.12",
|
|
45
45
|
"@babel/preset-typescript": "^7.17.12",
|
|
46
46
|
"@liangskyli/openapi-typescript": "^5.4.1",
|
|
47
|
-
"@storybook/addon-actions": "^6.5.
|
|
48
|
-
"@storybook/addon-essentials": "^6.5.
|
|
49
|
-
"@storybook/addon-interactions": "^6.5.
|
|
50
|
-
"@storybook/addon-links": "^6.5.
|
|
51
|
-
"@storybook/builder-webpack4": "^6.5.
|
|
52
|
-
"@storybook/manager-webpack4": "^6.5.
|
|
53
|
-
"@storybook/react": "^6.5.
|
|
54
|
-
"@storybook/testing-library": "^0.0.
|
|
47
|
+
"@storybook/addon-actions": "^6.5.15",
|
|
48
|
+
"@storybook/addon-essentials": "^6.5.15",
|
|
49
|
+
"@storybook/addon-interactions": "^6.5.15",
|
|
50
|
+
"@storybook/addon-links": "^6.5.15",
|
|
51
|
+
"@storybook/builder-webpack4": "^6.5.15",
|
|
52
|
+
"@storybook/manager-webpack4": "^6.5.15",
|
|
53
|
+
"@storybook/react": "^6.5.15",
|
|
54
|
+
"@storybook/testing-library": "^0.0.13",
|
|
55
55
|
"@types/node": "^17.0.38",
|
|
56
56
|
"@types/react": "^18.0.10",
|
|
57
57
|
"@types/react-dom": "^18.0.5",
|