@dev-crew-berlin/enter-js-utils 0.31.1 → 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/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 +1 -1
|
@@ -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';
|