@pisell/private-materials 3.4.16 → 3.4.18
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/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/appointmentBooking/components/Content/index.js +1 -1
- package/es/components/appointmentBooking/components/Content/index.less +3 -3
- package/es/components/appointmentBooking/components/Services/index.js +2 -2
- package/es/components/appointmentBooking/index.js +8 -2
- package/es/components/booking/info2/service/addTimeModal/index.js +0 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eventBooking/index.js +8 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +3 -3
- package/es/hooks/useWindowSize.js +8 -1
- package/es/index.d.ts +3 -0
- package/es/index.js +4 -1
- package/es/plus/productSelect/CategoryTabs/CategorySkeleton.d.ts +10 -0
- package/es/plus/productSelect/CategoryTabs/CategorySkeleton.js +29 -0
- package/es/plus/productSelect/CategoryTabs/CategorySkeleton.less +30 -0
- package/es/plus/productSelect/CategoryTabs/index.d.ts +18 -0
- package/es/plus/productSelect/CategoryTabs/index.js +171 -0
- package/es/plus/productSelect/ProductCard/ProductCardSkeleton.d.ts +10 -0
- package/es/plus/productSelect/ProductCard/ProductCardSkeleton.js +37 -0
- package/es/plus/productSelect/ProductCard/ProductCardSkeleton.less +81 -0
- package/es/plus/productSelect/ProductCard/index.d.ts +45 -0
- package/es/plus/productSelect/ProductCard/index.js +170 -0
- package/es/plus/productSelect/ProductCard/index.less +253 -0
- package/es/plus/productSelect/ProductList/gridComponents.d.ts +44 -0
- package/es/plus/productSelect/ProductList/gridComponents.js +149 -0
- package/es/plus/productSelect/ProductList/index.d.ts +22 -0
- package/es/plus/productSelect/ProductList/index.js +72 -0
- package/es/plus/productSelect/ProductList/index.less +0 -0
- package/es/plus/productSelect/components/IntersectionObserver.d.ts +42 -0
- package/es/plus/productSelect/components/IntersectionObserver.js +276 -0
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.js +357 -0
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.less +224 -0
- package/es/plus/productSelect/components/TabsStructure/hooks.d.ts +22 -0
- package/es/plus/productSelect/components/TabsStructure/hooks.js +243 -0
- package/es/plus/productSelect/components/TabsStructure/index.d.ts +5 -0
- package/es/plus/productSelect/components/TabsStructure/index.js +13 -0
- package/es/plus/productSelect/components/TabsStructure/styles.d.ts +47 -0
- package/es/plus/productSelect/components/TabsStructure/styles.js +87 -0
- package/es/plus/productSelect/components/TabsStructure/types.d.ts +105 -0
- package/es/plus/productSelect/components/TabsStructure/types.js +1 -0
- package/es/plus/productSelect/components/TabsStructure/utils.d.ts +12 -0
- package/es/plus/productSelect/components/TabsStructure/utils.js +56 -0
- package/es/plus/productSelect/components/pisellPriceText/index.d.ts +12 -0
- package/es/plus/productSelect/components/pisellPriceText/index.js +44 -0
- package/es/plus/productSelect/components/pisellPriceText/index.less +4 -0
- package/es/plus/productSelect/hooks/useToken.d.ts +18 -0
- package/es/plus/productSelect/hooks/useToken.js +34 -0
- package/es/plus/productSelect/index.d.ts +31 -0
- package/es/plus/productSelect/index.js +270 -0
- package/es/plus/productSelect/index.less +56 -0
- package/es/plus/productSelect/locales.d.ts +18 -0
- package/es/plus/productSelect/locales.js +17 -0
- package/es/plus/productSelect/theme/token.d.ts +17 -0
- package/es/plus/productSelect/theme/token.js +19 -0
- package/es/plus/productSelect/utils.d.ts +39 -0
- package/es/plus/productSelect/utils.js +162 -0
- package/es/plus/saasCreateOrganization/components/Header.d.ts +3 -0
- package/es/plus/saasCreateOrganization/components/Header.js +62 -0
- package/es/plus/saasCreateOrganization/index.d.ts +4 -0
- package/es/plus/saasCreateOrganization/index.js +15 -0
- package/es/plus/saasCreateOrganization/index.less +55 -0
- package/es/plus/saasCreateOrganization/locales.d.ts +15 -0
- package/es/plus/saasCreateOrganization/locales.js +14 -0
- package/es/plus/saasCreateOrganization/types.d.ts +69 -0
- package/es/plus/saasCreateOrganization/types.js +1 -0
- package/es/plus/saasLogin/index.d.ts +5 -0
- package/es/plus/saasLogin/index.js +165 -0
- package/es/plus/saasLogin/index.less +136 -0
- package/es/plus/saasLogin/locales.d.ts +51 -0
- package/es/plus/saasLogin/locales.js +50 -0
- package/es/plus/saasLogin/types.d.ts +62 -0
- package/es/plus/saasLogin/types.js +1 -0
- package/es/plus/saasLogin/utils.d.ts +35 -0
- package/es/plus/saasLogin/utils.js +31 -0
- package/es/plus/saasRegister/components/EntryEmail.d.ts +9 -0
- package/es/plus/saasRegister/components/EntryEmail.js +92 -0
- package/es/plus/saasRegister/components/EntryInfo.d.ts +9 -0
- package/es/plus/saasRegister/components/EntryInfo.js +145 -0
- package/es/plus/saasRegister/components/GoLogin.d.ts +4 -0
- package/es/plus/saasRegister/components/GoLogin.js +27 -0
- package/es/plus/saasRegister/components/Header.d.ts +3 -0
- package/es/plus/saasRegister/components/Header.js +62 -0
- package/es/plus/saasRegister/components/VerifyError.d.ts +8 -0
- package/es/plus/saasRegister/components/VerifyError.js +68 -0
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +5 -0
- package/es/plus/saasRegister/components/VerifyingLink.js +16 -0
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +7 -0
- package/es/plus/saasRegister/components/VertifyEmail.js +121 -0
- package/es/plus/saasRegister/index.d.ts +5 -0
- package/es/plus/saasRegister/index.js +246 -0
- package/es/plus/saasRegister/index.less +218 -0
- package/es/plus/saasRegister/locales.d.ts +117 -0
- package/es/plus/saasRegister/locales.js +116 -0
- package/es/plus/saasRegister/types.d.ts +114 -0
- package/es/plus/saasRegister/types.js +24 -0
- package/lib/components/appointmentBooking/components/Content/index.js +1 -1
- package/lib/components/appointmentBooking/components/Content/index.less +3 -3
- package/lib/components/appointmentBooking/components/Services/index.js +2 -2
- package/lib/components/appointmentBooking/index.js +6 -1
- package/lib/components/booking/info2/service/addTimeModal/index.js +0 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eventBooking/index.js +6 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +3 -3
- package/lib/hooks/useWindowSize.js +6 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +9 -0
- package/lib/plus/productSelect/CategoryTabs/CategorySkeleton.d.ts +10 -0
- package/lib/plus/productSelect/CategoryTabs/CategorySkeleton.js +62 -0
- package/lib/plus/productSelect/CategoryTabs/CategorySkeleton.less +30 -0
- package/lib/plus/productSelect/CategoryTabs/index.d.ts +18 -0
- package/lib/plus/productSelect/CategoryTabs/index.js +183 -0
- package/lib/plus/productSelect/ProductCard/ProductCardSkeleton.d.ts +10 -0
- package/lib/plus/productSelect/ProductCard/ProductCardSkeleton.js +58 -0
- package/lib/plus/productSelect/ProductCard/ProductCardSkeleton.less +81 -0
- package/lib/plus/productSelect/ProductCard/index.d.ts +45 -0
- package/lib/plus/productSelect/ProductCard/index.js +184 -0
- package/lib/plus/productSelect/ProductCard/index.less +253 -0
- package/lib/plus/productSelect/ProductList/gridComponents.d.ts +44 -0
- package/lib/plus/productSelect/ProductList/gridComponents.js +148 -0
- package/lib/plus/productSelect/ProductList/index.d.ts +22 -0
- package/lib/plus/productSelect/ProductList/index.js +86 -0
- package/lib/plus/productSelect/ProductList/index.less +0 -0
- package/lib/plus/productSelect/components/IntersectionObserver.d.ts +42 -0
- package/lib/plus/productSelect/components/IntersectionObserver.js +269 -0
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.js +393 -0
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.less +224 -0
- package/lib/plus/productSelect/components/TabsStructure/hooks.d.ts +22 -0
- package/lib/plus/productSelect/components/TabsStructure/hooks.js +209 -0
- package/lib/plus/productSelect/components/TabsStructure/index.d.ts +5 -0
- package/lib/plus/productSelect/components/TabsStructure/index.js +92 -0
- package/lib/plus/productSelect/components/TabsStructure/styles.d.ts +47 -0
- package/lib/plus/productSelect/components/TabsStructure/styles.js +122 -0
- package/lib/plus/productSelect/components/TabsStructure/types.d.ts +105 -0
- package/lib/plus/productSelect/components/TabsStructure/types.js +17 -0
- package/lib/plus/productSelect/components/TabsStructure/utils.d.ts +12 -0
- package/lib/plus/productSelect/components/TabsStructure/utils.js +72 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.d.ts +12 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.js +73 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.less +4 -0
- package/lib/plus/productSelect/hooks/useToken.d.ts +18 -0
- package/lib/plus/productSelect/hooks/useToken.js +50 -0
- package/lib/plus/productSelect/index.d.ts +31 -0
- package/lib/plus/productSelect/index.js +299 -0
- package/lib/plus/productSelect/index.less +56 -0
- package/lib/plus/productSelect/locales.d.ts +18 -0
- package/lib/plus/productSelect/locales.js +41 -0
- package/lib/plus/productSelect/theme/token.d.ts +17 -0
- package/lib/plus/productSelect/theme/token.js +47 -0
- package/lib/plus/productSelect/utils.d.ts +39 -0
- package/lib/plus/productSelect/utils.js +138 -0
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +3 -0
- package/lib/plus/saasCreateOrganization/components/Header.js +99 -0
- package/lib/plus/saasCreateOrganization/index.d.ts +4 -0
- package/lib/plus/saasCreateOrganization/index.js +47 -0
- package/lib/plus/saasCreateOrganization/index.less +55 -0
- package/lib/plus/saasCreateOrganization/locales.d.ts +15 -0
- package/lib/plus/saasCreateOrganization/locales.js +38 -0
- package/lib/plus/saasCreateOrganization/types.d.ts +69 -0
- package/lib/plus/saasCreateOrganization/types.js +17 -0
- package/lib/plus/saasLogin/index.d.ts +5 -0
- package/lib/plus/saasLogin/index.js +171 -0
- package/lib/plus/saasLogin/index.less +136 -0
- package/lib/plus/saasLogin/locales.d.ts +51 -0
- package/lib/plus/saasLogin/locales.js +74 -0
- package/lib/plus/saasLogin/types.d.ts +62 -0
- package/lib/plus/saasLogin/types.js +17 -0
- package/lib/plus/saasLogin/utils.d.ts +35 -0
- package/lib/plus/saasLogin/utils.js +50 -0
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +9 -0
- package/lib/plus/saasRegister/components/EntryEmail.js +92 -0
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +9 -0
- package/lib/plus/saasRegister/components/EntryInfo.js +128 -0
- package/lib/plus/saasRegister/components/GoLogin.d.ts +4 -0
- package/lib/plus/saasRegister/components/GoLogin.js +58 -0
- package/lib/plus/saasRegister/components/Header.d.ts +3 -0
- package/lib/plus/saasRegister/components/Header.js +99 -0
- package/lib/plus/saasRegister/components/VerifyError.d.ts +8 -0
- package/lib/plus/saasRegister/components/VerifyError.js +123 -0
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +5 -0
- package/lib/plus/saasRegister/components/VerifyingLink.js +44 -0
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +7 -0
- package/lib/plus/saasRegister/components/VertifyEmail.js +110 -0
- package/lib/plus/saasRegister/index.d.ts +5 -0
- package/lib/plus/saasRegister/index.js +205 -0
- package/lib/plus/saasRegister/index.less +218 -0
- package/lib/plus/saasRegister/locales.d.ts +117 -0
- package/lib/plus/saasRegister/locales.js +140 -0
- package/lib/plus/saasRegister/types.d.ts +114 -0
- package/lib/plus/saasRegister/types.js +54 -0
- package/lowcode/saas-create-organization/meta.ts +214 -0
- package/lowcode/saas-create-organization/snippets.ts +25 -0
- package/lowcode/saas-login/meta.ts +370 -0
- package/lowcode/saas-login/snippets.ts +38 -0
- package/lowcode/saas-register/meta.ts +386 -0
- package/lowcode/saas-register/snippets.ts +31 -0
- package/package.json +2 -2
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/plus/productSelect/components/TabsStructure/styles.ts
|
|
20
|
+
var styles_exports = {};
|
|
21
|
+
__export(styles_exports, {
|
|
22
|
+
chevronButtonClasses: () => chevronButtonClasses,
|
|
23
|
+
chevronClassNames: () => chevronClassNames,
|
|
24
|
+
chevronClasses: () => chevronClasses,
|
|
25
|
+
railClassNames: () => railClassNames,
|
|
26
|
+
railClasses: () => railClasses,
|
|
27
|
+
selectionClassNames: () => selectionClassNames,
|
|
28
|
+
selectionClasses: () => selectionClasses,
|
|
29
|
+
shadowClassNames: () => shadowClassNames,
|
|
30
|
+
shadowClasses: () => shadowClasses,
|
|
31
|
+
tabItemClassNames: () => tabItemClassNames,
|
|
32
|
+
tabItemClasses: () => tabItemClasses,
|
|
33
|
+
tabListClassNames: () => tabListClassNames,
|
|
34
|
+
tabListClasses: () => tabListClasses,
|
|
35
|
+
tabWrapperClassNames: () => tabWrapperClassNames,
|
|
36
|
+
tabWrapperClasses: () => tabWrapperClasses
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(styles_exports);
|
|
39
|
+
var tabWrapperClasses = {
|
|
40
|
+
wrapper: "pisell-tabstruct-wrapper"
|
|
41
|
+
};
|
|
42
|
+
var tabListClasses = {
|
|
43
|
+
list: "pisell-tabstruct-list"
|
|
44
|
+
};
|
|
45
|
+
var tabItemClasses = {
|
|
46
|
+
item: "pisell-tabstruct-item",
|
|
47
|
+
selected: "pisell-tabstruct-item--selected",
|
|
48
|
+
disabled: "pisell-tabstruct-item--disabled"
|
|
49
|
+
};
|
|
50
|
+
var railClasses = {
|
|
51
|
+
rail: "pisell-tabstruct-rail"
|
|
52
|
+
};
|
|
53
|
+
var selectionClasses = {
|
|
54
|
+
selection: "pisell-tabstruct-selection",
|
|
55
|
+
position: "pisell-tabstruct-selection--positioned",
|
|
56
|
+
focused: "pisell-tabstruct-selection--focused"
|
|
57
|
+
};
|
|
58
|
+
var shadowClasses = {
|
|
59
|
+
shadow: "pisell-tabstruct-shadow",
|
|
60
|
+
isVisible: "pisell-tabstruct-shadow--visible",
|
|
61
|
+
locationStart: "pisell-tabstruct-shadow--start",
|
|
62
|
+
locationEnd: "pisell-tabstruct-shadow--end"
|
|
63
|
+
};
|
|
64
|
+
var chevronClasses = {
|
|
65
|
+
controls: "pisell-tabstruct-chevron-controls",
|
|
66
|
+
button: "pisell-tabstruct-chevron-button",
|
|
67
|
+
disabled: "pisell-tabstruct-chevron-button--disabled"
|
|
68
|
+
};
|
|
69
|
+
var chevronButtonClasses = {
|
|
70
|
+
button: "pisell-tabstruct-chevron-button",
|
|
71
|
+
disabled: "pisell-tabstruct-chevron-button--disabled",
|
|
72
|
+
prev: "pisell-tabstruct-chevron-button--prev",
|
|
73
|
+
next: "pisell-tabstruct-chevron-button--next"
|
|
74
|
+
};
|
|
75
|
+
var tabWrapperClassNames = {
|
|
76
|
+
wrapper: tabWrapperClasses.wrapper
|
|
77
|
+
};
|
|
78
|
+
var tabListClassNames = {
|
|
79
|
+
list: tabListClasses.list
|
|
80
|
+
};
|
|
81
|
+
var tabItemClassNames = {
|
|
82
|
+
item: tabItemClasses.item,
|
|
83
|
+
selected: tabItemClasses.selected,
|
|
84
|
+
disabled: tabItemClasses.disabled
|
|
85
|
+
};
|
|
86
|
+
var railClassNames = {
|
|
87
|
+
rail: railClasses.rail
|
|
88
|
+
};
|
|
89
|
+
var selectionClassNames = {
|
|
90
|
+
selection: selectionClasses.selection,
|
|
91
|
+
position: selectionClasses.position,
|
|
92
|
+
focused: selectionClasses.focused
|
|
93
|
+
};
|
|
94
|
+
var shadowClassNames = {
|
|
95
|
+
shadow: shadowClasses.shadow,
|
|
96
|
+
isVisible: shadowClasses.isVisible,
|
|
97
|
+
locationStart: shadowClasses.locationStart,
|
|
98
|
+
locationEnd: shadowClasses.locationEnd
|
|
99
|
+
};
|
|
100
|
+
var chevronClassNames = {
|
|
101
|
+
controls: chevronClasses.controls,
|
|
102
|
+
button: chevronClasses.button,
|
|
103
|
+
disabled: chevronClasses.disabled
|
|
104
|
+
};
|
|
105
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
106
|
+
0 && (module.exports = {
|
|
107
|
+
chevronButtonClasses,
|
|
108
|
+
chevronClassNames,
|
|
109
|
+
chevronClasses,
|
|
110
|
+
railClassNames,
|
|
111
|
+
railClasses,
|
|
112
|
+
selectionClassNames,
|
|
113
|
+
selectionClasses,
|
|
114
|
+
shadowClassNames,
|
|
115
|
+
shadowClasses,
|
|
116
|
+
tabItemClassNames,
|
|
117
|
+
tabItemClasses,
|
|
118
|
+
tabListClassNames,
|
|
119
|
+
tabListClasses,
|
|
120
|
+
tabWrapperClassNames,
|
|
121
|
+
tabWrapperClasses
|
|
122
|
+
});
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type ScrollLocation = 'start' | 'end';
|
|
3
|
+
export interface TabContextValue {
|
|
4
|
+
selectedTab?: string;
|
|
5
|
+
onTabChange?: (tabId: string) => void;
|
|
6
|
+
registerTab?: (tabId: string, element: HTMLElement) => void;
|
|
7
|
+
unregisterTab?: (tabId: string) => void;
|
|
8
|
+
railRef?: React.RefObject<HTMLDivElement>;
|
|
9
|
+
}
|
|
10
|
+
export interface TabsStructureProps {
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
/** 当前选中的tab */
|
|
14
|
+
selectedTab?: string;
|
|
15
|
+
/** tab变更回调 */
|
|
16
|
+
onTabChange?: (tabId: string) => void;
|
|
17
|
+
/** 是否启用自动滚动到选中tab */
|
|
18
|
+
autoScrollToSelected?: boolean;
|
|
19
|
+
/** Rail组件的ref,用于手动控制滚动等操作 */
|
|
20
|
+
railRef?: React.RefObject<HTMLDivElement>;
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
23
|
+
export interface TabListContainerProps {
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
className?: string;
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
}
|
|
28
|
+
export interface TabItemProps {
|
|
29
|
+
children?: React.ReactNode;
|
|
30
|
+
isSelected?: boolean;
|
|
31
|
+
isDisabled?: boolean;
|
|
32
|
+
className?: string;
|
|
33
|
+
onClick?: (key?: string) => void;
|
|
34
|
+
/** Tab的唯一标识符 */
|
|
35
|
+
tabId?: string;
|
|
36
|
+
/** 是否自动注册到上下文 */
|
|
37
|
+
autoRegister?: boolean;
|
|
38
|
+
[key: string]: any;
|
|
39
|
+
}
|
|
40
|
+
export interface RailProps {
|
|
41
|
+
children?: React.ReactNode;
|
|
42
|
+
className?: string;
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
}
|
|
45
|
+
export interface SelectionIndicatorProps {
|
|
46
|
+
focusRingClasses?: string;
|
|
47
|
+
isFocusVisible?: boolean;
|
|
48
|
+
style?: React.CSSProperties;
|
|
49
|
+
className?: string;
|
|
50
|
+
[key: string]: any;
|
|
51
|
+
}
|
|
52
|
+
export interface ScrollShadowProps {
|
|
53
|
+
location: ScrollLocation;
|
|
54
|
+
visible: boolean;
|
|
55
|
+
className?: string;
|
|
56
|
+
[key: string]: any;
|
|
57
|
+
}
|
|
58
|
+
export interface ChevronButtonProps {
|
|
59
|
+
direction: 'prev' | 'next';
|
|
60
|
+
disabled?: boolean;
|
|
61
|
+
onClick?: () => void;
|
|
62
|
+
className?: string;
|
|
63
|
+
'aria-label'?: string;
|
|
64
|
+
[key: string]: any;
|
|
65
|
+
}
|
|
66
|
+
export interface ChevronControlsProps {
|
|
67
|
+
isPrevDisabled?: boolean;
|
|
68
|
+
isNextDisabled?: boolean;
|
|
69
|
+
onPrevClick?: () => void;
|
|
70
|
+
onNextClick?: () => void;
|
|
71
|
+
className?: string;
|
|
72
|
+
prevAction?: () => void;
|
|
73
|
+
nextAction?: () => void;
|
|
74
|
+
[key: string]: any;
|
|
75
|
+
}
|
|
76
|
+
export interface TabWrapperClasses {
|
|
77
|
+
wrapper: string;
|
|
78
|
+
}
|
|
79
|
+
export interface TabListClasses {
|
|
80
|
+
list: string;
|
|
81
|
+
}
|
|
82
|
+
export interface TabItemClasses {
|
|
83
|
+
item: string;
|
|
84
|
+
selected: string;
|
|
85
|
+
disabled: string;
|
|
86
|
+
}
|
|
87
|
+
export interface RailClasses {
|
|
88
|
+
rail: string;
|
|
89
|
+
}
|
|
90
|
+
export interface SelectionClasses {
|
|
91
|
+
selection: string;
|
|
92
|
+
position: string;
|
|
93
|
+
focused: string;
|
|
94
|
+
}
|
|
95
|
+
export interface ShadowClasses {
|
|
96
|
+
shadow: string;
|
|
97
|
+
isVisible: string;
|
|
98
|
+
locationStart: string;
|
|
99
|
+
locationEnd: string;
|
|
100
|
+
}
|
|
101
|
+
export interface ChevronClasses {
|
|
102
|
+
controls: string;
|
|
103
|
+
button: string;
|
|
104
|
+
disabled: string;
|
|
105
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/plus/productSelect/components/TabsStructure/types.ts
|
|
16
|
+
var types_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(types_exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare function debounce<T extends (...args: any[]) => any>(func: T, wait: number): (...args: Parameters<T>) => void;
|
|
3
|
+
export declare function mergeRefs<T>(...refs: (React.Ref<T> | undefined)[]): React.RefCallback<T>;
|
|
4
|
+
/**
|
|
5
|
+
* 安全的滚动函数,包含错误处理和边界检查
|
|
6
|
+
* @param element - 要滚动的元素
|
|
7
|
+
* @param options - 滚动选项
|
|
8
|
+
*/
|
|
9
|
+
export declare function safeScrollTo(element: HTMLElement | null, options: {
|
|
10
|
+
left?: number;
|
|
11
|
+
behavior?: ScrollBehavior;
|
|
12
|
+
}): boolean;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/plus/productSelect/components/TabsStructure/utils.ts
|
|
20
|
+
var utils_exports = {};
|
|
21
|
+
__export(utils_exports, {
|
|
22
|
+
debounce: () => debounce,
|
|
23
|
+
mergeRefs: () => mergeRefs,
|
|
24
|
+
safeScrollTo: () => safeScrollTo
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(utils_exports);
|
|
27
|
+
function debounce(func, wait) {
|
|
28
|
+
let timeout = null;
|
|
29
|
+
return (...args) => {
|
|
30
|
+
if (timeout) {
|
|
31
|
+
clearTimeout(timeout);
|
|
32
|
+
}
|
|
33
|
+
timeout = setTimeout(() => {
|
|
34
|
+
func(...args);
|
|
35
|
+
}, wait);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function mergeRefs(...refs) {
|
|
39
|
+
return (value) => {
|
|
40
|
+
refs.forEach((ref) => {
|
|
41
|
+
if (typeof ref === "function") {
|
|
42
|
+
ref(value);
|
|
43
|
+
} else if (ref && typeof ref === "object") {
|
|
44
|
+
ref.current = value;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function safeScrollTo(element, options) {
|
|
50
|
+
try {
|
|
51
|
+
if (!element || !element.scrollTo) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
const { left = 0, behavior = "smooth" } = options;
|
|
55
|
+
const maxScrollLeft = Math.max(0, element.scrollWidth - element.clientWidth);
|
|
56
|
+
const safeLeft = Math.max(0, Math.min(left, maxScrollLeft));
|
|
57
|
+
element.scrollTo({
|
|
58
|
+
left: safeLeft,
|
|
59
|
+
behavior
|
|
60
|
+
});
|
|
61
|
+
return true;
|
|
62
|
+
} catch (error) {
|
|
63
|
+
console.warn("Failed to scroll element:", error);
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
68
|
+
0 && (module.exports = {
|
|
69
|
+
debounce,
|
|
70
|
+
mergeRefs,
|
|
71
|
+
safeScrollTo
|
|
72
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface IProps {
|
|
4
|
+
value: string | number;
|
|
5
|
+
isMini?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
prefix?: React.ReactElement;
|
|
9
|
+
suffix?: React.ReactElement;
|
|
10
|
+
}
|
|
11
|
+
declare const index: (props: IProps) => JSX.Element;
|
|
12
|
+
export default index;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/plus/productSelect/components/pisellPriceText/index.tsx
|
|
30
|
+
var pisellPriceText_exports = {};
|
|
31
|
+
__export(pisellPriceText_exports, {
|
|
32
|
+
default: () => pisellPriceText_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellPriceText_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_materials = require("@pisell/materials");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
|
39
|
+
var import_index = require("./index.less");
|
|
40
|
+
var index = (props) => {
|
|
41
|
+
var _a, _b;
|
|
42
|
+
const context = (0, import_useEngineContext.default)();
|
|
43
|
+
const { value } = props;
|
|
44
|
+
const locale = ((_b = (_a = context.appHelper.utils) == null ? void 0 : _a.storage) == null ? void 0 : _b.get("umi_locale")) || "en";
|
|
45
|
+
const [_prefix, _suffix] = (0, import_react.useMemo)(() => {
|
|
46
|
+
if (!props.isMini) return ["", ""];
|
|
47
|
+
if (!locale) return ["From", ""];
|
|
48
|
+
if (locale.toLowerCase().includes("zh")) return ["", "起"];
|
|
49
|
+
return ["From", ""];
|
|
50
|
+
}, [locale, props.isMini]);
|
|
51
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-price-text", props.className) }, props.prefix, _prefix ? /* @__PURE__ */ import_react.default.createElement(
|
|
52
|
+
"span",
|
|
53
|
+
{
|
|
54
|
+
className: "pisell-price-text-prefix-text",
|
|
55
|
+
style: {
|
|
56
|
+
fontSize: "0.65em",
|
|
57
|
+
marginRight: 4
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
_prefix
|
|
61
|
+
) : null, /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value }), _suffix ? /* @__PURE__ */ import_react.default.createElement(
|
|
62
|
+
"span",
|
|
63
|
+
{
|
|
64
|
+
style: {
|
|
65
|
+
fontSize: "0.65em",
|
|
66
|
+
marginLeft: 4
|
|
67
|
+
},
|
|
68
|
+
className: "pisell-price-text-suffix-text"
|
|
69
|
+
},
|
|
70
|
+
_suffix
|
|
71
|
+
) : null, props.suffix);
|
|
72
|
+
};
|
|
73
|
+
var pisellPriceText_default = index;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ProductSelectToken } from '../theme/token';
|
|
2
|
+
export declare function useToken(customToken?: Partial<ProductSelectToken>): {
|
|
3
|
+
colorPrimary: string;
|
|
4
|
+
colorText: string;
|
|
5
|
+
colorTextSecondary: string;
|
|
6
|
+
searchInputColor: string;
|
|
7
|
+
containerBg: string;
|
|
8
|
+
tabItemBg: string;
|
|
9
|
+
tabItemHoverBg: string;
|
|
10
|
+
tabItemActiveBg: string;
|
|
11
|
+
categoryTextColor: string;
|
|
12
|
+
cardBg: string;
|
|
13
|
+
cardHoverBg: string;
|
|
14
|
+
cardSelectedBg: string;
|
|
15
|
+
cardSelectedTextColor: string;
|
|
16
|
+
cardSelectedSecondaryTextColor: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function genCSSVars(token: ProductSelectToken): Record<string, string>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/plus/productSelect/hooks/useToken.ts
|
|
20
|
+
var useToken_exports = {};
|
|
21
|
+
__export(useToken_exports, {
|
|
22
|
+
genCSSVars: () => genCSSVars,
|
|
23
|
+
useToken: () => useToken
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(useToken_exports);
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var import_token = require("../theme/token");
|
|
28
|
+
function useToken(customToken) {
|
|
29
|
+
return (0, import_react.useMemo)(() => {
|
|
30
|
+
let contextToken = null;
|
|
31
|
+
return {
|
|
32
|
+
...import_token.defaultToken,
|
|
33
|
+
...contextToken || {},
|
|
34
|
+
...customToken || {}
|
|
35
|
+
};
|
|
36
|
+
}, [customToken]);
|
|
37
|
+
}
|
|
38
|
+
function genCSSVars(token) {
|
|
39
|
+
const cssVars = {};
|
|
40
|
+
Object.entries(token).forEach(([key, value]) => {
|
|
41
|
+
const cssKey = `--ps-${key.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`)}`;
|
|
42
|
+
cssVars[cssKey] = value;
|
|
43
|
+
});
|
|
44
|
+
return cssVars;
|
|
45
|
+
}
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
genCSSVars,
|
|
49
|
+
useToken
|
|
50
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface ProductSelectProps {
|
|
4
|
+
dataSource: any[];
|
|
5
|
+
showSearch?: boolean;
|
|
6
|
+
showTab?: boolean;
|
|
7
|
+
layout?: {
|
|
8
|
+
grid: boolean;
|
|
9
|
+
config: string;
|
|
10
|
+
};
|
|
11
|
+
onChange: (value: any) => void;
|
|
12
|
+
value?: number;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
emptyDescription?: string;
|
|
16
|
+
/** 当前滚动元素 */
|
|
17
|
+
scrollDom?: string;
|
|
18
|
+
/** 商品列表上方的其它组件 */
|
|
19
|
+
offsetDom?: any;
|
|
20
|
+
/** 样式变量 */
|
|
21
|
+
token?: Partial<any>;
|
|
22
|
+
/** 后台装修单选模式下的已选中项 */
|
|
23
|
+
selectedItems?: Array<any>;
|
|
24
|
+
/** 后台装修配置 */
|
|
25
|
+
productListSetting?: Partial<any>;
|
|
26
|
+
/** 兼容scrollDom */
|
|
27
|
+
customScrollParent?: HTMLElement | string;
|
|
28
|
+
}
|
|
29
|
+
export declare const PREFIX = "pisell-product-select";
|
|
30
|
+
declare const index: ({ dataSource, emptyDescription, showSearch, scrollDom, offsetDom, style, token: customToken, onChange, value, selectedItems, productListSetting, customScrollParent, loading, layout, ...rest }: ProductSelectProps) => JSX.Element;
|
|
31
|
+
export default index;
|