@bodynarf/react.components 1.2.0 → 1.2.3

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.
@@ -15,6 +15,6 @@ const DropdownLabel = ({ caption, selectedItem, onClick, deselectable }) => {
15
15
  "button"
16
16
  ]);
17
17
  return (_jsxs("label", { className: className, onClick: onClick, children: [deselectVisible &&
18
- _jsx(Icon, { className: "plus-lg" }), _jsx("span", { className: deselectVisible ? "mx-2" : "mr-2", title: itemSelected ? text : undefined, children: text }), _jsx(Icon, { className: "arrow-up" })] }));
18
+ _jsx(Icon, { name: "plus-lg" }), _jsx("span", { className: deselectVisible ? "mx-2" : "mr-2", title: itemSelected ? text : undefined, children: text }), _jsx(Icon, { name: "arrow-up" })] }));
19
19
  };
20
20
  export default DropdownLabel;
@@ -10,8 +10,7 @@ export declare type DropdownProps = BaseElementProps & {
10
10
  */
11
11
  value?: SelectableItem;
12
12
  /**
13
- * Action to update selected value,
14
- * which stored outside
13
+ * Action to update selected value, which stored outside
15
14
  */
16
15
  onSelect: (item?: SelectableItem) => void;
17
16
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown/index.tsx"],"names":[],"mappings":"AAIA,OAAO,iBAAiB,CAAC;AAIzB,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAK5C,oBAAY,aAAa,GAAG,gBAAgB,GAAG;IAC3C,kCAAkC;IAClC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAE7B;;;MAGE;IACF,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB;;;OAGG;IACH,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAE1C;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB,gEAAgE;IAChE,gBAAgB,EAAE,OAAO,CAAC;IAE1B,wBAAwB;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAA;AAED,yBAAyB;AACzB,QAAA,MAAM,QAAQ,mFAAoF,aAAa,KAAG,WA2FjH,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown/index.tsx"],"names":[],"mappings":"AAIA,OAAO,iBAAiB,CAAC;AAIzB,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAK5C,oBAAY,aAAa,GAAG,gBAAgB,GAAG;IAC3C,kCAAkC;IAClC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAE7B;;;MAGE;IACF,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB;;OAEG;IACH,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAE1C;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB,gEAAgE;IAChE,gBAAgB,EAAE,OAAO,CAAC;IAE1B,wBAAwB;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAA;AAED,yBAAyB;AACzB,QAAA,MAAM,QAAQ,mFAAoF,aAAa,KAAG,WA2FjH,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -4,15 +4,19 @@ import { ElementSize } from '../types';
4
4
  /** Icon component props */
5
5
  export declare type IconProps = {
6
6
  /**
7
- * Class name for icon.
8
- * Used to display icon from bootstrap-icons
7
+ * Icon name. Must be without `bi-`
8
+ * @example ["Arrow repeat", "arrow-repeat"]
9
+ * // Icon name to icon class name.
10
+ * // For class name check bootstrap icons website
9
11
  */
10
- className: string;
12
+ name: string;
13
+ /** Additional classname */
14
+ className?: string;
11
15
  /** Icon size */
12
16
  size?: ElementSize;
13
17
  };
14
18
  /**
15
19
  * Icon component. Based on bootstrap icons
16
20
  */
17
- export default function Icon(props: IconProps): JSX.Element;
21
+ export default function Icon({ size, name, className }: IconProps): JSX.Element;
18
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/icon/index.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,2BAA2B;AAC3B,oBAAY,SAAS,GAAG;IACpB;;;MAGE;IACF,SAAS,EAAE,MAAM,CAAC;IAElB,gBAAgB;IAChB,IAAI,CAAC,EAAE,WAAW,CAAC;CACtB,CAAA;AAQD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAQ1D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/icon/index.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC,2BAA2B;AAC3B,oBAAY,SAAS,GAAG;IACpB;;;;;MAKE;IACF,IAAI,EAAE,MAAM,CAAC;IAEb,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,gBAAgB;IAChB,IAAI,CAAC,EAAE,WAAW,CAAC;CACtB,CAAA;AAQD;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAAE,IAAe,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAYzF"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import './icon.scss';
3
+ import { getClassName } from '@bodynarf/utils';
3
4
  const sizeToClassMap = new Map([
4
5
  ['small', ' app-icon--smal'],
5
6
  ['medium', ''],
@@ -8,8 +9,13 @@ const sizeToClassMap = new Map([
8
9
  /**
9
10
  * Icon component. Based on bootstrap icons
10
11
  */
11
- export default function Icon(props) {
12
- const size = props.size || 'medium';
13
- const className = `app-icon bi bi-${props.className}${sizeToClassMap.get(size)}`;
12
+ export default function Icon({ size = 'medium', name, className }) {
13
+ const classNames = getClassName([
14
+ "app-icon",
15
+ "bi",
16
+ `bi-${name}`,
17
+ sizeToClassMap.has(size) ? sizeToClassMap.get(size) : "",
18
+ className
19
+ ]);
14
20
  return (_jsx("i", { className: className }));
15
21
  }
@@ -5,11 +5,11 @@ export declare type PaginatorProps = {
5
5
  count: number;
6
6
  /** Page change handler */
7
7
  onPageChange: (page: number) => void;
8
- /** Current page. Starts from 1 */
8
+ /** Current page */
9
9
  currentPage?: number;
10
10
  /**
11
11
  * Page numbers position.
12
- * Usefull with showNextButtons = true
12
+ * Usefull with `showNextButtons = true`
13
13
  */
14
14
  position?: 'left' | 'center' | 'right';
15
15
  /** Buttons should have rounded borders */
@@ -20,10 +20,15 @@ export declare type PaginatorProps = {
20
20
  className?: string;
21
21
  /** Display "Previous" \ "Next" buttons */
22
22
  showNextButtons?: boolean;
23
+ /**
24
+ * Max amount of pages from left & right from current page. `3` by default
25
+ * @description If set to 2 it will show `[1, 2], 3, [4, 5]`
26
+ */
27
+ nearPagesCount?: number;
23
28
  };
24
29
  /**
25
30
  * Paginator component.
26
31
  * Used for visualization of pagging configuration
27
32
  */
28
- export default function Paginator({ count, onPageChange, currentPage, position, rounded, size, className, showNextButtons, }: PaginatorProps): JSX.Element;
33
+ export default function Paginator({ count, onPageChange, currentPage, position, rounded, size, className, showNextButtons, nearPagesCount }: PaginatorProps): JSX.Element;
29
34
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/paginator/index.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAIvC,oBAAY,cAAc,GAAG;IACzB,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;I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;MAGE;IACF,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAA;AAED;;;EAGE;AACF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAC9B,KAAK,EAAE,YAAY,EAAE,WAAW,EAChC,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAClC,eAAe,EAAE,cAAc,EAClC,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CA2G9B"}
@@ -6,7 +6,7 @@ import { generatePageNumbers } from './utils';
6
6
  * Paginator component.
7
7
  * Used for visualization of pagging configuration
8
8
  */
9
- export default function Paginator({ count, onPageChange, currentPage, position, rounded, size, className, showNextButtons, }) {
9
+ export default function Paginator({ count, onPageChange, currentPage, position, rounded, size, className, showNextButtons, nearPagesCount }) {
10
10
  const page = currentPage || 0;
11
11
  const pageChange = useCallback((event) => {
12
12
  const target = event.target;
@@ -15,12 +15,11 @@ export default function Paginator({ count, onPageChange, currentPage, position,
15
15
  return;
16
16
  }
17
17
  const page = +pageRaw;
18
- if (page !== currentPage
19
- && page > 0 && page <= count) {
18
+ if (page !== currentPage && page > 0 && page <= count) {
20
19
  onPageChange(page);
21
20
  }
22
21
  }, [onPageChange, currentPage, count]);
23
- const pageNumbers = useMemo(() => generatePageNumbers(page, count), [page, count]);
22
+ const pageNumbers = useMemo(() => generatePageNumbers(page, count, nearPagesCount), [page, count]);
24
23
  const canGoBack = useMemo(() => page > 1, [page]);
25
24
  const canGoForward = useMemo(() => page < count, [page, count]);
26
25
  if (pageNumbers.length === 0) {
@@ -8,7 +8,7 @@
8
8
  */
9
9
  export const generatePageNumbers = (page, count, size = 3) => {
10
10
  if (page < 0 || count <= 0 || page > count || size > count) {
11
- throw new Error("getPageNumbers has ivalid config");
11
+ return [];
12
12
  }
13
13
  return [
14
14
  ...new Array(size).fill(page).map((_, i) => page - i - 1).filter(x => x > 0 && x < page).reverse(),
@@ -10,7 +10,7 @@ export declare type SearchProps = {
10
10
  /**
11
11
  * Search type: by typing, starts from minimum characters to search
12
12
  * or by clicking on button next to search bar.
13
- * Default is byTyping
13
+ * Default `is byTyping`
14
14
  */
15
15
  searchType?: 'byTyping' | 'byButton';
16
16
  /** Control name. If empty - will be replaced by random guid */
@@ -23,7 +23,7 @@ export declare type SearchProps = {
23
23
  rounded?: boolean;
24
24
  /** Is search bar disabled */
25
25
  disabled?: boolean;
26
- /** Should loading icon be displayed in search bar*/
26
+ /** Should loading icon be displayed in search bar */
27
27
  isLoading?: boolean;
28
28
  };
29
29
  /** Search component */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/search/index.tsx"],"names":[],"mappings":";AAIA,OAAO,eAAe,CAAC;AAIvB,oBAAY,WAAW,GAAG;IACtB,qBAAqB;IACrB,OAAO,EAAE,MAAM,CAAC;IAEhB,qBAAqB;IACrB,QAAQ,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAE1C,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;MAIE;IACF,UAAU,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IAErC,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,6CAA6C;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,yBAAyB;IACzB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IAE/C,mCAAmC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,oDAAoD;IACpD,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,uBAAuB;AACvB,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CA+E9D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/search/index.tsx"],"names":[],"mappings":";AAIA,OAAO,eAAe,CAAC;AAIvB,oBAAY,WAAW,GAAG;IACtB,qBAAqB;IACrB,OAAO,EAAE,MAAM,CAAC;IAEhB,qBAAqB;IACrB,QAAQ,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAE1C,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;MAIE;IACF,UAAU,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;IAErC,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,6CAA6C;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,yBAAyB;IACzB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IAE/C,mCAAmC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,qDAAqD;IACrD,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,uBAAuB;AACvB,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CA+E9D"}
@@ -17,10 +17,14 @@ export declare type IconPosition = 'left' | 'right';
17
17
  /** Icon for component */
18
18
  export declare type ElementIcon = {
19
19
  /**
20
- * Class name for icon.
21
- * Used to display icon from bootstrap-icons
20
+ * Icon name. Must be without `bi-`
21
+ * @example ["Arrow repeat", "arrow-repeat"]
22
+ * // Icon name to icon class name.
23
+ * // For class name check bootstrap icons website
22
24
  */
23
- className: string;
25
+ name: string;
26
+ /** Additional classname */
27
+ className?: string;
24
28
  /** Icon size */
25
29
  size?: ElementSize;
26
30
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oBAAY,gBAAgB,GAAG;IA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IAChB,IAAI,CAAC,EAAE,WAAW,CAAC;IAEnB;;;MAGE;IACF,QAAQ,CAAC,EAAE,YAAY,CAAC;CAC3B,CAAC"}
package/dist ADDED
@@ -0,0 +1,32 @@
1
+ # About
2
+ Small library with react components based on Bulma CSS framework&nbsp; <a href="https://bulma.io" title="Bulma css framework">
3
+ <img
4
+ src="https://bulma.io/images/made-with-bulma.png"
5
+ alt="Made with Bulma"
6
+ width="128"
7
+ height="24"/>
8
+ </a>
9
+
10
+ ## Installation
11
+ 1. Install [React](https://reactjs.org/)
12
+ 2. Install [Bulma](https://bulma.io/)
13
+ 3. Make sure you imported bulma styles in parent container
14
+ 4. *(Optional)* To use **Icon** component - install [Bootstrap Icons](https://icons.getbootstrap.com/) and make sure you imported these styles in parent container
15
+
16
+ ## Description
17
+ ### Simple components
18
+ Simple react components based on html elements.
19
+
20
+ - **Date** - date input;
21
+ - **Multiline** - multiline text input;
22
+ - **Text**- single line text input;
23
+ - **Anchor**
24
+ - **Button**
25
+ - **Icon** - *see p.4 of installation*
26
+ - **Dropdown** - custom dropdown component, based on html div elements & css. Allows to use icon in elements
27
+
28
+ ### Complex components
29
+ Complex components is set of components built via combining simple components or represent complex logical component
30
+ - **Search** - Search bar with optional button to perform search
31
+ - **Paginator** - Pagination elements to navigate through paged list
32
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bodynarf/react.components",
3
- "version": "1.2.0",
3
+ "version": "1.2.3",
4
4
  "author": {
5
5
  "name": "Artem",
6
6
  "email": "bodynar@gmail.com"
@@ -22,7 +22,7 @@
22
22
  ],
23
23
  "scripts": {
24
24
  "build": "npx tsc",
25
- "publish": "npx tsc && copy package.json dist && cd dist && npm publish --access=public"
25
+ "package": "npx tsc && copy package.json dist && copy readme.md dist && cd dist && npm publish --access=public"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/react": "^18.0.11",
package/readme.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # About
2
- Small library with react components based on Bulma
3
-
4
- <a href="https://bulma.io" title="Bulma css framework">
2
+ Small library with react components based on Bulma CSS framework&nbsp; <a href="https://bulma.io" title="Bulma css framework">
5
3
  <img
6
4
  src="https://bulma.io/images/made-with-bulma.png"
7
5
  alt="Made with Bulma"
@@ -9,13 +7,26 @@ Small library with react components based on Bulma
9
7
  height="24"/>
10
8
  </a>
11
9
 
10
+ ## Installation
11
+ 1. Install [React](https://reactjs.org/)
12
+ 2. Install [Bulma](https://bulma.io/)
13
+ 3. Make sure you imported bulma styles in parent container
14
+ 4. *(Optional)* To use **Icon** component - install [Bootstrap Icons](https://icons.getbootstrap.com/) and make sure you imported these styles in parent container
15
+
12
16
  ## Description
13
- Contained components:
17
+ ### Simple components
18
+ Simple react components based on html elements.
19
+
20
+ - **Date** - date input;
21
+ - **Multiline** - multiline text input;
22
+ - **Text**- single line text input;
14
23
  - **Anchor**
15
24
  - **Button**
16
- - **Dropdown**
17
- - **Icon**
18
- - **Search**
19
- - **Date** - primitive date input;
20
- - **Multiline** - primitive multiline text input;
21
- - **Text**- primitive single line text input;
25
+ - **Icon** - *see p.4 of installation*
26
+ - **Dropdown** - custom dropdown component, based on html div elements & css. Allows to use icon in elements
27
+
28
+ ### Complex components
29
+ Complex components is set of components built via combining simple components or represent complex logical component
30
+ - **Search** - Search bar with optional button to perform search
31
+ - **Paginator** - Pagination elements to navigate through paged list
32
+