ag-common 0.0.305 → 0.0.306

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.
@@ -1,8 +1,3 @@
1
- import { ReactNode } from 'react';
2
- export declare const FlexColumn: (props: {
3
- noGrow?: boolean;
4
- center?: boolean;
5
- allowOverflow?: boolean;
6
- children: ReactNode;
7
- className?: string;
8
- }) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { IRowOrColumn } from '../RowOrColumn';
3
+ export declare const FlexColumn: (props: IRowOrColumn) => JSX.Element;
@@ -19,13 +19,13 @@ const Base = styled_components_1.default.div `
19
19
  flex-grow: 0;
20
20
  }
21
21
  overflow: visible;
22
- &[data-allowoverflow='false'] {
22
+ &[data-enableoverflow='false'] {
23
23
  overflow: hidden;
24
24
  max-width: 100%;
25
25
  }
26
26
  `;
27
27
  const FlexColumn = (props) => {
28
28
  var _a, _b, _c;
29
- return (react_1.default.createElement(Base, Object.assign({ "data-nogrow": (_a = props.noGrow) !== null && _a !== void 0 ? _a : false, "data-center": (_b = props.center) !== null && _b !== void 0 ? _b : false, "data-allowoverflow": (_c = props.allowOverflow) !== null && _c !== void 0 ? _c : false }, props), props.children));
29
+ return (react_1.default.createElement(Base, Object.assign({ title: props.title, "data-nogrow": (_a = props.noGrow) !== null && _a !== void 0 ? _a : false, "data-center": (_b = props.center) !== null && _b !== void 0 ? _b : false, "data-enableoverflow": (_c = props.enableOverflow) !== null && _c !== void 0 ? _c : false }, props), props.children));
30
30
  };
31
31
  exports.FlexColumn = FlexColumn;
@@ -1,9 +1,3 @@
1
- import { ReactNode } from 'react';
2
- export declare const FlexRow: (props: {
3
- noWrap?: boolean;
4
- noGrow?: boolean;
5
- center?: boolean;
6
- enableOverflow?: boolean;
7
- children: ReactNode;
8
- className?: string;
9
- }) => JSX.Element;
1
+ /// <reference types="react" />
2
+ import { IRowOrColumn } from '../RowOrColumn';
3
+ export declare const FlexRow: (props: IRowOrColumn) => JSX.Element;
@@ -36,6 +36,6 @@ const Base = styled_components_1.default.div `
36
36
  `;
37
37
  const FlexRow = (props) => {
38
38
  var _a, _b, _c, _d;
39
- return (react_1.default.createElement(Base, Object.assign({ "data-nowrap": (_a = props.noWrap) !== null && _a !== void 0 ? _a : false, "data-nogrow": (_b = props.noGrow) !== null && _b !== void 0 ? _b : false, "data-center": (_c = props.center) !== null && _c !== void 0 ? _c : false, "data-enableoverflow": (_d = props.enableOverflow) !== null && _d !== void 0 ? _d : false }, props), props.children));
39
+ return (react_1.default.createElement(Base, Object.assign({ title: props.title, "data-nowrap": (_a = props.noWrap) !== null && _a !== void 0 ? _a : false, "data-nogrow": (_b = props.noGrow) !== null && _b !== void 0 ? _b : false, "data-center": (_c = props.center) !== null && _c !== void 0 ? _c : false, "data-enableoverflow": (_d = props.enableOverflow) !== null && _d !== void 0 ? _d : false }, props), props.children));
40
40
  };
41
41
  exports.FlexRow = FlexRow;
@@ -1,8 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
- export declare const RowOrColumn: (props: {
2
+ export interface IRowOrColumn {
3
3
  noGrow?: boolean;
4
4
  center?: boolean;
5
5
  noWrap?: boolean;
6
6
  children: ReactNode;
7
7
  className?: string;
8
- }) => JSX.Element;
8
+ title?: string;
9
+ enableOverflow?: boolean;
10
+ }
11
+ export declare const RowOrColumn: (props: IRowOrColumn) => JSX.Element;
@@ -31,9 +31,12 @@ const Base = styled_components_1.default.div `
31
31
  flex-grow: 0;
32
32
  width: auto;
33
33
  }
34
+ &[data-enableoverflow='true'] {
35
+ overflow: visible;
36
+ }
34
37
  `;
35
38
  const RowOrColumn = (props) => {
36
- var _a, _b, _c;
37
- return (react_1.default.createElement(Base, Object.assign({ "data-nogrow": (_a = props.noGrow) !== null && _a !== void 0 ? _a : false, "data-center": (_b = props.center) !== null && _b !== void 0 ? _b : false, "data-nowrap": (_c = props.noWrap) !== null && _c !== void 0 ? _c : false }, props), props.children));
39
+ var _a, _b, _c, _d;
40
+ return (react_1.default.createElement(Base, Object.assign({ title: props.title, "data-nogrow": (_a = props.noGrow) !== null && _a !== void 0 ? _a : false, "data-center": (_b = props.center) !== null && _b !== void 0 ? _b : false, "data-nowrap": (_c = props.noWrap) !== null && _c !== void 0 ? _c : false, "data-enableoverflow": (_d = props.enableOverflow) !== null && _d !== void 0 ? _d : false }, props), props.children));
38
41
  };
39
42
  exports.RowOrColumn = RowOrColumn;
@@ -108,7 +108,7 @@ const SearchBase = ({ onSelectItem, onSearchTextChange, placeholderText, renderI
108
108
  const textEditRef = (0, react_1.createRef)();
109
109
  return (react_1.default.createElement(Base, { className: className },
110
110
  react_1.default.createElement(SearchBox, { "data-type": "search" },
111
- react_1.default.createElement(TextEdit_1.TextEdit, { ref: textEditRef, placeholder: placeholderText, defaultValue: "", defaultEditing: { focus: true }, singleLine: true, leftContent: react_1.default.createElement(Icon, null, MagnifyIconSvg), noGrow: true, allowUndo: false, onEscape: () => resWrap(undefined), onClickOutsideWithNoValue: null, onSubmit: (v) => (0, helpers_1.debounce)(() => {
111
+ react_1.default.createElement(TextEdit_1.TextEdit, { ref: textEditRef, placeholder: placeholderText, defaultEditing: { focus: true }, singleLine: true, leftContent: react_1.default.createElement(Icon, null, MagnifyIconSvg), noGrow: true, allowUndo: false, onEscape: () => resWrap(undefined), onClickOutsideWithNoValue: null, onSubmit: (v) => (0, helpers_1.debounce)(() => {
112
112
  setSearchText(v);
113
113
  onSearchTextChange === null || onSearchTextChange === void 0 ? void 0 : onSearchTextChange(v);
114
114
  }, { key: 'pagesearch', time: 200 }) }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ag-common",
3
- "version": "0.0.305",
3
+ "version": "0.0.306",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Andrei Gec <@andreigec> (https://gec.dev/)",