@pezeshk-book/modules 0.0.16 → 0.0.17
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/modules/calendar/calendar.d.ts +2 -2
- package/dist/modules/calendar/icons/arrow-left-icon.d.ts +2 -2
- package/dist/modules/calendar/icons/arrow-right-icon.d.ts +2 -2
- package/dist/modules/calendar/icons/calendar-icon.d.ts +2 -2
- package/dist/modules/calendar/sub-components/day/day.d.ts +2 -2
- package/dist/modules/calendar/sub-components/days/days.d.ts +2 -2
- package/dist/modules/calendar/sub-components/days-head/days-head.d.ts +2 -2
- package/dist/modules/slider/slider.d.ts +2 -2
- package/dist/modules/slider/slider.js +18 -17
- package/dist/modules/slider/slider.js.map +1 -1
- package/dist/modules/slider/slider.props.d.ts +4 -1
- package/dist/stories/calendar/calendar.d.ts +2 -2
- package/dist/stories/calendar/calendar.stories.d.ts +3 -3
- package/dist/stories/slider/slider.d.ts +2 -2
- package/dist/stories/slider/slider.stories.d.ts +3 -3
- package/dist/stories/wrapper.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { CalendarProps } from "./calendar.props";
|
|
3
|
-
declare const Calender: (props: CalendarProps) => JSX.Element;
|
|
3
|
+
declare const Calender: (props: CalendarProps) => React.JSX.Element;
|
|
4
4
|
export default Calender;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const ArrowLeftIcon: () => JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const ArrowLeftIcon: () => React.JSX.Element;
|
|
3
3
|
export default ArrowLeftIcon;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const ArrowRightIcon: () => JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const ArrowRightIcon: () => React.JSX.Element;
|
|
3
3
|
export default ArrowRightIcon;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const CalendarIcon: () => JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const CalendarIcon: () => React.JSX.Element;
|
|
3
3
|
export default CalendarIcon;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { DayProps } from "./day.props";
|
|
3
|
-
export declare const Day: (props: DayProps) => JSX.Element;
|
|
3
|
+
export declare const Day: (props: DayProps) => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { DaysProps } from './days.props';
|
|
3
3
|
declare const Days: {
|
|
4
|
-
(props: DaysProps): JSX.Element | null;
|
|
4
|
+
(props: DaysProps): React.JSX.Element | null;
|
|
5
5
|
defaultProps: {
|
|
6
6
|
monthName: string;
|
|
7
7
|
disableDays: never[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import { DaysHeadProps } from "./days-head.props";
|
|
3
|
-
declare const DaysHead: (props: DaysHeadProps) => JSX.Element;
|
|
3
|
+
declare const DaysHead: (props: DaysHeadProps) => React.JSX.Element;
|
|
4
4
|
export default DaysHead;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { SliderProps } from './slider.props';
|
|
3
|
-
declare const Slider: ({ children, delay, spaceBetween, slides, infiniteLoop, pauseOnMouseOver, autoMove, indicatorActiveColor, indicator, navigation, prevNavigation, nextNavigation, direction, rows, }: SliderProps) => JSX.Element;
|
|
3
|
+
declare const Slider: ({ children, delay, spaceBetween, slides, infiniteLoop, pauseOnMouseOver, autoMove, indicatorActiveColor, indicator, navigation, prevNavigation, nextNavigation, direction, rows, navigationColor, }: SliderProps) => React.JSX.Element;
|
|
4
4
|
export default Slider;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { __spreadArray } from "tslib";
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import { Button, Div } from '@pezeshk-book/ui-kit';
|
|
3
4
|
var Slider = function (_a) {
|
|
4
|
-
var children = _a.children, _b = _a.delay, delay = _b === void 0 ? 2500 : _b, _c = _a.spaceBetween, spaceBetween = _c === void 0 ? 0 : _c, _d = _a.slides, slides = _d === void 0 ? 1 : _d, _e = _a.infiniteLoop, infiniteLoop = _e === void 0 ? false : _e, _f = _a.pauseOnMouseOver, pauseOnMouseOver = _f === void 0 ? false : _f, _g = _a.autoMove, autoMove = _g === void 0 ? true : _g, _h = _a.indicatorActiveColor, indicatorActiveColor = _h === void 0 ? 'info' : _h, _j = _a.indicator, indicator = _j === void 0 ? true : _j, _k = _a.navigation, navigation = _k === void 0 ? true : _k, prevNavigation = _a.prevNavigation, nextNavigation = _a.nextNavigation, _l = _a.direction, direction = _l === void 0 ? 'rtl' : _l, _m = _a.rows, rows = _m === void 0 ? 1 : _m;
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
5
|
+
var children = _a.children, _b = _a.delay, delay = _b === void 0 ? 2500 : _b, _c = _a.spaceBetween, spaceBetween = _c === void 0 ? 0 : _c, _d = _a.slides, slides = _d === void 0 ? 1 : _d, _e = _a.infiniteLoop, infiniteLoop = _e === void 0 ? false : _e, _f = _a.pauseOnMouseOver, pauseOnMouseOver = _f === void 0 ? false : _f, _g = _a.autoMove, autoMove = _g === void 0 ? true : _g, _h = _a.indicatorActiveColor, indicatorActiveColor = _h === void 0 ? 'info' : _h, _j = _a.indicator, indicator = _j === void 0 ? true : _j, _k = _a.navigation, navigation = _k === void 0 ? true : _k, prevNavigation = _a.prevNavigation, nextNavigation = _a.nextNavigation, _l = _a.direction, direction = _l === void 0 ? 'rtl' : _l, _m = _a.rows, rows = _m === void 0 ? 1 : _m, _o = _a.navigationColor, navigationColor = _o === void 0 ? 'info' : _o;
|
|
6
|
+
var _p = React.useState(infiniteLoop ? slides : 0), currentIndex = _p[0], setCurrentIndex = _p[1];
|
|
7
|
+
var _q = useState(Math.round(children.length / rows)), length = _q[0], setLength = _q[1];
|
|
8
|
+
var _r = useState(infiniteLoop && Math.round(children.length / rows) > slides), isRepeating = _r[0], setIsRepeating = _r[1];
|
|
9
|
+
var _s = useState(true), transitionEnabled = _s[0], setTransitionEnabled = _s[1];
|
|
10
|
+
var _t = useState(null), touchPosition = _t[0], setTouchPosition = _t[1];
|
|
11
|
+
var _u = useState(false), pause = _u[0], setPause = _u[1];
|
|
12
|
+
var _v = useState([]), sliders = _v[0], setSliders = _v[1];
|
|
12
13
|
var timeoutRef = React.useRef(null);
|
|
13
14
|
var ref = React.useRef(null);
|
|
14
15
|
var dir = React.useMemo(function () {
|
|
@@ -130,9 +131,9 @@ var Slider = function (_a) {
|
|
|
130
131
|
setPause(state);
|
|
131
132
|
}
|
|
132
133
|
};
|
|
133
|
-
return (React.createElement(
|
|
134
|
-
React.createElement(
|
|
135
|
-
(isRepeating || currentIndex > 0) && navigation && !prevNavigation ? (React.createElement(
|
|
134
|
+
return (React.createElement(Div, { dir: direction, className: 'w-full flex-col', onMouseOver: function () { return handlePauseAutoMove(true); }, onMouseLeave: function () { return handlePauseAutoMove(false); } },
|
|
135
|
+
React.createElement(Div, { className: 'w-full relative' },
|
|
136
|
+
(isRepeating || currentIndex > 0) && navigation && !prevNavigation ? (React.createElement(Button, { disabled: direction === 'rtl' ? currentIndex === length : currentIndex === slides, onClick: direction === 'rtl' ? next : prev, color: navigationColor, rounded: 'full', className: 'absolute flex self-center items-center justify-center z-10 left-6' }, "<")) : null,
|
|
136
137
|
prevNavigation && (isRepeating || currentIndex > 0) ? (React.createElement(React.Fragment, null, prevNavigation(prev))) : null,
|
|
137
138
|
React.createElement("div", { className: 'overflow-hidden w-full h-full', onTouchStart: handleTouchStart, onTouchMove: handleTouchMove },
|
|
138
139
|
React.createElement("div", { className: "flex transition ease-linear duration-300 shrink-0 grow w-full", style: {
|
|
@@ -140,15 +141,15 @@ var Slider = function (_a) {
|
|
|
140
141
|
transition: !transitionEnabled ? 'none' : undefined
|
|
141
142
|
}, onTransitionEnd: handleTransitionEnd, ref: ref },
|
|
142
143
|
(length > slides && isRepeating) &&
|
|
143
|
-
renderExtraPrev().map(function (nextItem, nextItemIndex) { return (React.createElement(
|
|
144
|
-
sliders.map(function (item, itemIndex) { return (React.createElement(
|
|
144
|
+
renderExtraPrev().map(function (nextItem, nextItemIndex) { return (React.createElement(Div, { className: 'flex-col w-full grow shrink-0', key: nextItemIndex }, nextItem)); }),
|
|
145
|
+
sliders.map(function (item, itemIndex) { return (React.createElement(Div, { className: 'flex-col w-1/2 shrink-0', key: itemIndex }, item)); }),
|
|
145
146
|
(length > slides && isRepeating) &&
|
|
146
|
-
renderExtraNext().map(function (nextItem, nextItemIndex) { return (React.createElement(
|
|
147
|
-
(isRepeating || currentIndex < (length - slides)) && navigation && !nextNavigation ? (React.createElement(
|
|
147
|
+
renderExtraNext().map(function (nextItem, nextItemIndex) { return (React.createElement(Div, { className: 'flex-col w-full grow shrink-0', key: nextItemIndex }, nextItem)); }))),
|
|
148
|
+
(isRepeating || currentIndex < (length - slides)) && navigation && !nextNavigation ? (React.createElement(Button, { color: navigationColor, disabled: direction === 'rtl' ? currentIndex === slides : currentIndex === length, onClick: direction === 'rtl' ? prev : next, rounded: "full", className: "absolute flex self-center items-center justify-center right-6" }, ">")) : null,
|
|
148
149
|
nextNavigation && (isRepeating || currentIndex < (length - slides)) ? (React.createElement(React.Fragment, null, nextNavigation(next))) : null),
|
|
149
|
-
indicator ? (React.createElement(
|
|
150
|
+
indicator ? (React.createElement(Div, { className: 'self-center items-center justify-center' }, __spreadArray([], new Array(length - slides + 1), true).map(function (_, idx) {
|
|
150
151
|
var indicatorClass = "inline-block w-4 h-4 rounded-full cursor-pointer mt-20 mx-2 mb-0 ".concat(infiniteLoop ? currentIndex === idx + slides ? "bg-".concat(indicatorActiveColor) : "bg-grey-100" : currentIndex === idx ? "bg-".concat(indicatorActiveColor) : "bg-grey-100");
|
|
151
|
-
return (React.createElement(
|
|
152
|
+
return (React.createElement(Div, { key: idx, className: indicatorClass, onClick: function () {
|
|
152
153
|
setCurrentIndex(infiniteLoop ? idx + slides : idx);
|
|
153
154
|
} }));
|
|
154
155
|
}))) : null));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.js","sourceRoot":"","sources":["../../../modules/slider/slider.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"slider.js","sourceRoot":"","sources":["../../../modules/slider/slider.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAA;AAEhD,OAAO,EAAC,MAAM,EAAE,GAAG,EAAC,MAAM,sBAAsB,CAAA;AAEhD,IAAM,MAAM,GAAG,UACb,EAgBc;QAfZ,QAAQ,cAAA,EACR,aAAY,EAAZ,KAAK,mBAAG,IAAI,KAAA,EACZ,oBAAgB,EAAhB,YAAY,mBAAG,CAAC,KAAA,EAChB,cAAU,EAAV,MAAM,mBAAG,CAAC,KAAA,EACV,oBAAoB,EAApB,YAAY,mBAAG,KAAK,KAAA,EACpB,wBAAwB,EAAxB,gBAAgB,mBAAG,KAAK,KAAA,EACxB,gBAAe,EAAf,QAAQ,mBAAG,IAAI,KAAA,EACf,4BAA6B,EAA7B,oBAAoB,mBAAG,MAAM,KAAA,EAC7B,iBAAgB,EAAhB,SAAS,mBAAG,IAAI,KAAA,EAChB,kBAAiB,EAAjB,UAAU,mBAAG,IAAI,KAAA,EACjB,cAAc,oBAAA,EACd,cAAc,oBAAA,EACd,iBAAiB,EAAjB,SAAS,mBAAG,KAAK,KAAA,EACjB,YAAQ,EAAR,IAAI,mBAAG,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,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC,GACD,CACH,CAAA;QACH,CAAC,CAAC,CACE,CACP,CAAC,CAAC,CAAC,IAAI,CACJ,CACP,CAAC;AACJ,CAAC,CAAA;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -7,10 +7,13 @@ export interface SliderProps {
|
|
|
7
7
|
pauseOnMouseOver?: boolean;
|
|
8
8
|
autoMove?: boolean;
|
|
9
9
|
indicator?: boolean;
|
|
10
|
-
indicatorActiveColor?:
|
|
10
|
+
indicatorActiveColor?: Color;
|
|
11
11
|
navigation?: boolean;
|
|
12
12
|
nextNavigation?: (onClick: any) => any;
|
|
13
13
|
prevNavigation?: (onClick: any) => any;
|
|
14
14
|
direction?: 'ltr' | 'rtl';
|
|
15
15
|
rows?: number;
|
|
16
|
+
navigationColor?: Color;
|
|
16
17
|
}
|
|
18
|
+
type Color = 'primary' | 'secondary' | 'tertiary' | "info" | 'success' | 'warning' | 'danger' | 'purple' | 'control';
|
|
19
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { CalendarProps } from "../../modules/calendar/calendar.props";
|
|
3
3
|
/**
|
|
4
4
|
* Primary UI component for user interaction
|
|
5
5
|
*/
|
|
6
|
-
export declare const Calendar: ({ ...props }: CalendarProps) => JSX.Element;
|
|
6
|
+
export declare const Calendar: ({ ...props }: CalendarProps) => React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
|
3
3
|
import { CalendarProps } from "../../modules/calendar/calendar.props";
|
|
4
|
-
declare const _default: ComponentMeta<({ ...props }: CalendarProps) => JSX.Element>;
|
|
4
|
+
declare const _default: ComponentMeta<({ ...props }: CalendarProps) => React.JSX.Element>;
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const Default: ComponentStory<({ ...props }: CalendarProps) => JSX.Element>;
|
|
6
|
+
export declare const Default: ComponentStory<({ ...props }: CalendarProps) => React.JSX.Element>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { SliderProps } from "../../modules/slider/slider.props";
|
|
3
3
|
/**
|
|
4
4
|
* Primary UI component for user interaction
|
|
5
5
|
*/
|
|
6
|
-
export declare const Slider: ({ ...props }: SliderProps) => JSX.Element;
|
|
6
|
+
export declare const Slider: ({ ...props }: SliderProps) => React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
|
3
3
|
import { SliderProps } from "../../modules/slider/slider.props";
|
|
4
|
-
declare const _default: ComponentMeta<({ ...props }: SliderProps) => JSX.Element>;
|
|
4
|
+
declare const _default: ComponentMeta<({ ...props }: SliderProps) => React.JSX.Element>;
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const Default: ComponentStory<({ ...props }: SliderProps) => JSX.Element>;
|
|
6
|
+
export declare const Default: ComponentStory<({ ...props }: SliderProps) => React.JSX.Element>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
export declare const Wrapper: ({ title, children, className, titleColor }: {
|
|
3
3
|
title: string;
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
className?: string | undefined;
|
|
6
6
|
titleColor?: string | undefined;
|
|
7
|
-
}) => JSX.Element;
|
|
7
|
+
}) => React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pezeshk-book/modules",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"types": "./dist/index.d.ts",
|
|
5
5
|
"main": "./dist/index.ts",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"autoprefixer": "^10.4.13",
|
|
29
29
|
"postcss": "^8.4.20",
|
|
30
30
|
"tailwindcss": "^3.2.4",
|
|
31
|
-
"@pezeshk-book/ui-kit": "^0.
|
|
31
|
+
"@pezeshk-book/ui-kit": "^0.3.1",
|
|
32
32
|
"react-date-object": "^2.1.7"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|