@tecsinapse/react-web-kit 3.3.0 → 3.3.2
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/cjs/components/molecules/DateTimePickerSelector/components/ScrollableDigit.js +2 -4
- package/dist/cjs/components/molecules/DateTimePickerSelector/styled.js +1 -0
- package/dist/cjs/components/molecules/ScrollableMonthYearPicker/ScrollableMonthYearPicker.js +1 -4
- package/dist/esm/components/molecules/DateTimePickerSelector/components/ScrollableDigit.js +1 -3
- package/dist/esm/components/molecules/DateTimePickerSelector/styled.js +1 -0
- package/dist/esm/components/molecules/ScrollableMonthYearPicker/ScrollableMonthYearPicker.js +1 -4
- package/dist/types/components/molecules/DateTimePickerSelector/components/ScrollableDigit.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var Text = require('@tecsinapse/react-core/src/components/atoms/Text');
|
|
5
4
|
var reactCore = require('@tecsinapse/react-core');
|
|
6
|
-
var ResponsiveFontSize = require('@tecsinapse/react-core/src/utils/ResponsiveFontSize');
|
|
7
5
|
var styled = require('../styled.js');
|
|
8
6
|
var MemoizedTimeCard = require('./MemoizedTimeCard.js');
|
|
9
7
|
|
|
@@ -27,7 +25,7 @@ function _interopNamespaceDefault(e) {
|
|
|
27
25
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
28
26
|
|
|
29
27
|
const ScrollableDigit = ({
|
|
30
|
-
TextComponent =
|
|
28
|
+
TextComponent = reactCore.Text,
|
|
31
29
|
data,
|
|
32
30
|
currentTime,
|
|
33
31
|
updateType,
|
|
@@ -36,7 +34,7 @@ const ScrollableDigit = ({
|
|
|
36
34
|
initialScrollIndex
|
|
37
35
|
}) => {
|
|
38
36
|
const theme = reactCore.useTheme();
|
|
39
|
-
const digitCardHeight =
|
|
37
|
+
const digitCardHeight = reactCore.RFValue(Number(theme.typography.base.fontSize.slice(0, -2))) + 2 * reactCore.RFValue(Number(theme.spacing.deca.slice(0, -2)));
|
|
40
38
|
const getDisplayedValue = (value) => {
|
|
41
39
|
const isNumericValue = parseInt(value, 10);
|
|
42
40
|
if (!isNaN(isNumericValue)) {
|
package/dist/cjs/components/molecules/ScrollableMonthYearPicker/ScrollableMonthYearPicker.js
CHANGED
|
@@ -48,10 +48,7 @@ const ScrollableMonthYearPicker = ({
|
|
|
48
48
|
[yearsToShow, firstYear]
|
|
49
49
|
);
|
|
50
50
|
const months = [...Array(12)].map(
|
|
51
|
-
(_, index) => dateFns.format((/* @__PURE__ */ new Date()).setMonth(index), "MMM", { locale })
|
|
52
|
-
0,
|
|
53
|
-
3
|
|
54
|
-
)
|
|
51
|
+
(_, index) => dateFns.format((/* @__PURE__ */ new Date()).setMonth(index), "MMM", { locale })
|
|
55
52
|
);
|
|
56
53
|
const getInitialScrollIndex = (value, data) => {
|
|
57
54
|
const selectedIndex = data.findIndex((item) => item === value);
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Text } from '@tecsinapse/react-core
|
|
3
|
-
import { useTheme } from '@tecsinapse/react-core';
|
|
4
|
-
import { RFValue } from '@tecsinapse/react-core/src/utils/ResponsiveFontSize';
|
|
2
|
+
import { useTheme, RFValue, Text } from '@tecsinapse/react-core';
|
|
5
3
|
import { StyledTextLabel, TimeDigitContainer } from '../styled.js';
|
|
6
4
|
import MemoizedTimeCard from './MemoizedTimeCard.js';
|
|
7
5
|
|
package/dist/esm/components/molecules/ScrollableMonthYearPicker/ScrollableMonthYearPicker.js
CHANGED
|
@@ -27,10 +27,7 @@ const ScrollableMonthYearPicker = ({
|
|
|
27
27
|
[yearsToShow, firstYear]
|
|
28
28
|
);
|
|
29
29
|
const months = [...Array(12)].map(
|
|
30
|
-
(_, index) => format((/* @__PURE__ */ new Date()).setMonth(index), "MMM", { locale })
|
|
31
|
-
0,
|
|
32
|
-
3
|
|
33
|
-
)
|
|
30
|
+
(_, index) => format((/* @__PURE__ */ new Date()).setMonth(index), "MMM", { locale })
|
|
34
31
|
);
|
|
35
32
|
const getInitialScrollIndex = (value, data) => {
|
|
36
33
|
const selectedIndex = data.findIndex((item) => item === value);
|
package/dist/types/components/molecules/DateTimePickerSelector/components/ScrollableDigit.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { TextProps } from '@tecsinapse/react-core
|
|
2
|
+
import { TextProps } from '@tecsinapse/react-core';
|
|
3
3
|
export interface ScrollableDigitProps {
|
|
4
4
|
TextComponent?: React.FC<TextProps>;
|
|
5
5
|
updateType: 'hour' | 'minute' | 'year' | 'month';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tecsinapse/react-web-kit",
|
|
3
3
|
"description": "TecSinapse React components",
|
|
4
|
-
"version": "3.3.
|
|
4
|
+
"version": "3.3.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"module": "dist/esm/index.js",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"react-dom": "^18.0.0",
|
|
41
41
|
"react-native-web": ">=0.18.0 <1"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "4f439e0184fb2a5083b68bc82706df6dbec0f0db"
|
|
44
44
|
}
|