@pisell/materials 1.10.9 → 1.10.11
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/PisellCards/index.d.ts +0 -1
- package/es/components/PisellFields/index.d.ts +0 -1
- package/es/components/PisellLayouts/index.d.ts +0 -1
- package/es/components/PisellMetrics/index.d.ts +0 -1
- package/es/components/PisellSuperTabs/PisellSuperTabs.js +13 -4
- package/es/components/appVersionControl/types.d.ts +0 -1
- package/es/components/calendar/index.d.ts +0 -1
- package/es/components/checkbox/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Radio/WithMode.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +0 -1
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +0 -1
- package/es/components/date-picker/index.d.ts +0 -1
- package/es/components/drag-sort-tree/types.d.ts +0 -1
- package/es/components/filter/components/FilterButton/types.d.ts +0 -1
- package/es/components/input/index.d.ts +0 -1
- package/es/components/pisell-config-provider/context.d.ts +0 -1
- package/es/components/pisellDatePicker/index.d.ts +0 -1
- package/es/components/pisellGridPro/ToolBar/type.d.ts +0 -1
- package/es/components/pisellMenu/types.d.ts +0 -1
- package/es/components/pisellQuickFilter/type.d.ts +0 -1
- package/es/components/radio/index.d.ts +0 -1
- package/es/components/section-footers/index.d.ts +0 -1
- package/es/components/skeleton/index.d.ts +0 -1
- package/es/components/time-picker/index.d.ts +0 -1
- package/es/components/upload/index.d.ts +0 -1
- package/es/components/virtual-keyboard/Amount/types.d.ts +0 -1
- package/lib/components/PisellCards/index.d.ts +0 -1
- package/lib/components/PisellFields/index.d.ts +0 -1
- package/lib/components/PisellLayouts/index.d.ts +0 -1
- package/lib/components/PisellMetrics/index.d.ts +0 -1
- package/lib/components/PisellSuperTabs/PisellSuperTabs.js +13 -4
- package/lib/components/appVersionControl/types.d.ts +0 -1
- package/lib/components/calendar/index.d.ts +0 -1
- package/lib/components/checkbox/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Radio/WithMode.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +0 -1
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +0 -1
- package/lib/components/date-picker/index.d.ts +0 -1
- package/lib/components/drag-sort-tree/types.d.ts +0 -1
- package/lib/components/filter/components/FilterButton/types.d.ts +0 -1
- package/lib/components/input/index.d.ts +0 -1
- package/lib/components/pisell-config-provider/context.d.ts +0 -1
- package/lib/components/pisellDatePicker/index.d.ts +0 -1
- package/lib/components/pisellGridPro/ToolBar/type.d.ts +0 -1
- package/lib/components/pisellMenu/types.d.ts +0 -1
- package/lib/components/pisellQuickFilter/type.d.ts +0 -1
- package/lib/components/radio/index.d.ts +0 -1
- package/lib/components/section-footers/index.d.ts +0 -1
- package/lib/components/skeleton/index.d.ts +0 -1
- package/lib/components/time-picker/index.d.ts +0 -1
- package/lib/components/upload/index.d.ts +0 -1
- package/lib/components/virtual-keyboard/Amount/types.d.ts +0 -1
- package/package.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PisellBasicCardProps } from "./types.js";
|
|
3
2
|
import { ImageDataSource, ImageFillMode, PisellImageCardProps } from "./components/PisellImageCard/types.js";
|
|
4
3
|
import { GraphicConfig, GraphicTextCardProps, GraphicTextCardSize, GraphicTextCardVariant } from "./components/GraphicTextCard/types.js";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PisellBasicGridProps } from "../PisellBasicGrid/types.js";
|
|
3
2
|
import { PisellScrollViewProps, PisellScrollViewRef } from "../PisellScrollView/types.js";
|
|
4
3
|
import { FloorMapFullscreenMode, FloorMapItemBase, FloorMapLayoutContextValue, PisellFloorMapLayoutProps, PisellFloorMapLayoutRef } from "../pisellFloorMapLayout/types.js";
|
|
@@ -33,14 +33,23 @@ const PisellSuperTabs = (props, ref) => {
|
|
|
33
33
|
if (!item || !scrollContainer) return;
|
|
34
34
|
const containerRect = scrollContainer.getBoundingClientRect();
|
|
35
35
|
const itemRect = item.getBoundingClientRect();
|
|
36
|
+
const containerStyle = window.getComputedStyle(scrollContainer);
|
|
37
|
+
const scrollPaddingLeft = Number.parseFloat(containerStyle.scrollPaddingLeft) || 0;
|
|
38
|
+
const scrollPaddingRight = Number.parseFloat(containerStyle.scrollPaddingRight) || 0;
|
|
39
|
+
const scrollPaddingTop = Number.parseFloat(containerStyle.scrollPaddingTop) || 0;
|
|
40
|
+
const scrollPaddingBottom = Number.parseFloat(containerStyle.scrollPaddingBottom) || 0;
|
|
41
|
+
const visibleLeft = containerRect.left + scrollPaddingLeft;
|
|
42
|
+
const visibleRight = containerRect.right - scrollPaddingRight;
|
|
43
|
+
const visibleTop = containerRect.top + scrollPaddingTop;
|
|
44
|
+
const visibleBottom = containerRect.bottom - scrollPaddingBottom;
|
|
36
45
|
const canScrollX = scrollContainer.scrollWidth > scrollContainer.clientWidth + 1;
|
|
37
46
|
const canScrollY = scrollContainer.scrollHeight > scrollContainer.clientHeight + 1;
|
|
38
47
|
let nextLeft = scrollContainer.scrollLeft;
|
|
39
48
|
let nextTop = scrollContainer.scrollTop;
|
|
40
|
-
if (canScrollX && itemRect.left <
|
|
41
|
-
else if (canScrollX && itemRect.right >
|
|
42
|
-
if (canScrollY && itemRect.top <
|
|
43
|
-
else if (canScrollY && itemRect.bottom >
|
|
49
|
+
if (canScrollX && itemRect.left < visibleLeft) nextLeft -= visibleLeft - itemRect.left;
|
|
50
|
+
else if (canScrollX && itemRect.right > visibleRight) nextLeft += itemRect.right - visibleRight;
|
|
51
|
+
if (canScrollY && itemRect.top < visibleTop) nextTop -= visibleTop - itemRect.top;
|
|
52
|
+
else if (canScrollY && itemRect.bottom > visibleBottom) nextTop += itemRect.bottom - visibleBottom;
|
|
44
53
|
if (nextLeft === scrollContainer.scrollLeft && nextTop === scrollContainer.scrollTop) return;
|
|
45
54
|
scrollContainer.scrollTo({
|
|
46
55
|
left: nextLeft,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PisellBasicCardProps } from "./types.js";
|
|
3
2
|
import { ImageDataSource, ImageFillMode, PisellImageCardProps } from "./components/PisellImageCard/types.js";
|
|
4
3
|
import { GraphicConfig, GraphicTextCardProps, GraphicTextCardSize, GraphicTextCardVariant } from "./components/GraphicTextCard/types.js";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { PisellBasicGridProps } from "../PisellBasicGrid/types.js";
|
|
3
2
|
import { PisellScrollViewProps, PisellScrollViewRef } from "../PisellScrollView/types.js";
|
|
4
3
|
import { FloorMapFullscreenMode, FloorMapItemBase, FloorMapLayoutContextValue, PisellFloorMapLayoutProps, PisellFloorMapLayoutRef } from "../pisellFloorMapLayout/types.js";
|
|
@@ -36,14 +36,23 @@ const PisellSuperTabs = (props, ref) => {
|
|
|
36
36
|
if (!item || !scrollContainer) return;
|
|
37
37
|
const containerRect = scrollContainer.getBoundingClientRect();
|
|
38
38
|
const itemRect = item.getBoundingClientRect();
|
|
39
|
+
const containerStyle = window.getComputedStyle(scrollContainer);
|
|
40
|
+
const scrollPaddingLeft = Number.parseFloat(containerStyle.scrollPaddingLeft) || 0;
|
|
41
|
+
const scrollPaddingRight = Number.parseFloat(containerStyle.scrollPaddingRight) || 0;
|
|
42
|
+
const scrollPaddingTop = Number.parseFloat(containerStyle.scrollPaddingTop) || 0;
|
|
43
|
+
const scrollPaddingBottom = Number.parseFloat(containerStyle.scrollPaddingBottom) || 0;
|
|
44
|
+
const visibleLeft = containerRect.left + scrollPaddingLeft;
|
|
45
|
+
const visibleRight = containerRect.right - scrollPaddingRight;
|
|
46
|
+
const visibleTop = containerRect.top + scrollPaddingTop;
|
|
47
|
+
const visibleBottom = containerRect.bottom - scrollPaddingBottom;
|
|
39
48
|
const canScrollX = scrollContainer.scrollWidth > scrollContainer.clientWidth + 1;
|
|
40
49
|
const canScrollY = scrollContainer.scrollHeight > scrollContainer.clientHeight + 1;
|
|
41
50
|
let nextLeft = scrollContainer.scrollLeft;
|
|
42
51
|
let nextTop = scrollContainer.scrollTop;
|
|
43
|
-
if (canScrollX && itemRect.left <
|
|
44
|
-
else if (canScrollX && itemRect.right >
|
|
45
|
-
if (canScrollY && itemRect.top <
|
|
46
|
-
else if (canScrollY && itemRect.bottom >
|
|
52
|
+
if (canScrollX && itemRect.left < visibleLeft) nextLeft -= visibleLeft - itemRect.left;
|
|
53
|
+
else if (canScrollX && itemRect.right > visibleRight) nextLeft += itemRect.right - visibleRight;
|
|
54
|
+
if (canScrollY && itemRect.top < visibleTop) nextTop -= visibleTop - itemRect.top;
|
|
55
|
+
else if (canScrollY && itemRect.bottom > visibleBottom) nextTop += itemRect.bottom - visibleBottom;
|
|
47
56
|
if (nextLeft === scrollContainer.scrollLeft && nextTop === scrollContainer.scrollTop) return;
|
|
48
57
|
scrollContainer.scrollTo({
|
|
49
58
|
left: nextLeft,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.11",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev:tailwind-css": "tailwindcss -c ./tailwind.materials.config.cjs --postcss ./postcss.materials-tailwind.cjs -i ./src/tailwind-input.css -o ./src/pisell-materials.tw.css --watch",
|
|
6
6
|
"build:tailwind-css:once": "tailwindcss -c ./tailwind.materials.config.cjs --postcss ./postcss.materials-tailwind.cjs -i ./src/tailwind-input.css -o ./src/pisell-materials.tw.css",
|