@pisell/private-materials 6.2.36 → 6.2.37
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 +13 -29
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
- 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/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Services/index.js +2 -2
- package/es/components/appointmentBooking/index.d.ts +0 -1
- package/es/components/appointmentBooking/index.js +8 -2
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/es/components/booking/deposit/index.d.ts +0 -1
- package/es/components/booking/forms/single/RenderValueById.d.ts +1 -0
- package/es/components/booking/forms/single/RenderValueById.js +68 -17
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/forms/single/index.less +67 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/header/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/addTimeModal/index.js +0 -1
- package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +6 -3
- package/es/components/booking/materiels/contacts/index.d.ts +0 -1
- package/es/components/booking/materiels/duration/index.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/es/components/booking/notes/addNote/index.d.ts +0 -1
- package/es/components/eftpos/index.d.ts +0 -1
- package/es/components/eftpos/pos.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -2
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/fail/index.d.ts +0 -1
- package/es/components/eftposPay/component/fail/network.d.ts +0 -1
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/es/components/eftposPay/component/manual/index.d.ts +0 -1
- package/es/components/eftposPay/component/signature/index.d.ts +0 -1
- package/es/components/eftposPay/device.d.ts +1 -2
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +0 -1
- package/es/components/eftposPay/linkly/index.d.ts +0 -1
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/payo/config.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eftposPay/tip.d.ts +0 -1
- package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +0 -1
- package/es/components/eventBooking/index.js +8 -1
- package/es/components/login/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/es/components/productExtension/index.d.ts +0 -1
- package/es/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/es/components/ruleSetting/index.d.ts +0 -1
- package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/es/components/schedules/calendar/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/es/components/schedules/products/list/index.d.ts +0 -1
- package/es/components/schedules/resources/index.d.ts +0 -1
- package/es/components/schedules/resources/list/index.d.ts +0 -1
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/schedules/index.d.ts +0 -1
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/shoppingCart/components/Cart/Product.js +1 -0
- package/es/components/shoppingCart/index.d.ts +0 -1
- package/es/components/taxSelect/index.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +2 -2
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/es/hooks/useWindowSize.js +8 -1
- package/es/plus/clientName/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -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 +270 -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 +11 -0
- package/es/plus/productSelect/components/pisellPriceText/index.js +43 -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/utils/index.d.ts +1 -1
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
- 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/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Services/index.js +2 -2
- package/lib/components/appointmentBooking/index.d.ts +0 -1
- package/lib/components/appointmentBooking/index.js +6 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/lib/components/booking/deposit/index.d.ts +0 -1
- package/lib/components/booking/forms/single/RenderValueById.d.ts +1 -0
- package/lib/components/booking/forms/single/RenderValueById.js +37 -9
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/forms/single/index.less +67 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/header/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addTimeModal/index.js +0 -1
- package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +6 -3
- package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
- package/lib/components/booking/materiels/duration/index.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/lib/components/booking/notes/addNote/index.d.ts +0 -1
- package/lib/components/eftpos/index.d.ts +0 -1
- package/lib/components/eftpos/pos.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -2
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
- package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
- package/lib/components/eftposPay/device.d.ts +1 -2
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +0 -1
- package/lib/components/eftposPay/linkly/index.d.ts +0 -1
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/payo/config.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eftposPay/tip.d.ts +0 -1
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +0 -1
- package/lib/components/eventBooking/index.js +6 -1
- package/lib/components/login/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/lib/components/productExtension/index.d.ts +0 -1
- package/lib/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/lib/components/ruleSetting/index.d.ts +0 -1
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/lib/components/schedules/calendar/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/lib/components/schedules/products/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/index.d.ts +0 -1
- package/lib/components/schedules/resources/list/index.d.ts +0 -1
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/schedules/index.d.ts +0 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +1 -0
- package/lib/components/shoppingCart/index.d.ts +0 -1
- package/lib/components/taxSelect/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +2 -2
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lib/hooks/useWindowSize.js +6 -1
- package/lib/plus/clientName/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
- 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 +270 -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 +11 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.js +72 -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/utils/index.d.ts +1 -1
- package/package.json +4 -4
@@ -0,0 +1,393 @@
|
|
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/TabsStructure/TabsStructure.tsx
|
30
|
+
var TabsStructure_exports = {};
|
31
|
+
__export(TabsStructure_exports, {
|
32
|
+
ChevronButton: () => ChevronButton,
|
33
|
+
ChevronControls: () => ChevronControls,
|
34
|
+
Rail: () => Rail,
|
35
|
+
ScrollShadow: () => ScrollShadow,
|
36
|
+
SelectionIndicator: () => SelectionIndicator,
|
37
|
+
TabItem: () => TabItem,
|
38
|
+
TabListContainer: () => TabListContainer,
|
39
|
+
default: () => TabsStructure_default
|
40
|
+
});
|
41
|
+
module.exports = __toCommonJS(TabsStructure_exports);
|
42
|
+
var import_react = __toESM(require("react"));
|
43
|
+
var import_classnames = __toESM(require("classnames"));
|
44
|
+
var import_styles = require("./styles");
|
45
|
+
var import_utils = require("./utils");
|
46
|
+
var import_ChevronLeft = __toESM(require("@pisell/icon/es/ChevronLeft"));
|
47
|
+
var import_ChevronRight = __toESM(require("@pisell/icon/es/ChevronRight"));
|
48
|
+
var TabContext = (0, import_react.createContext)({});
|
49
|
+
var useTabContext = () => {
|
50
|
+
const context = (0, import_react.useContext)(TabContext);
|
51
|
+
if (!context) {
|
52
|
+
throw new Error("useTabContext must be used within a TabContext.Provider");
|
53
|
+
}
|
54
|
+
return context;
|
55
|
+
};
|
56
|
+
var TabListContainer = (0, import_react.forwardRef)(
|
57
|
+
({ children, className, ...props }, ref) => {
|
58
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
59
|
+
"ul",
|
60
|
+
{
|
61
|
+
ref,
|
62
|
+
className: (0, import_classnames.default)(import_styles.tabListClasses.list, className),
|
63
|
+
role: "tablist",
|
64
|
+
...props
|
65
|
+
},
|
66
|
+
children
|
67
|
+
);
|
68
|
+
}
|
69
|
+
);
|
70
|
+
var TabItem = (0, import_react.forwardRef)(
|
71
|
+
({
|
72
|
+
children,
|
73
|
+
isSelected = false,
|
74
|
+
isDisabled = false,
|
75
|
+
className,
|
76
|
+
onClick,
|
77
|
+
tabId,
|
78
|
+
autoRegister = true,
|
79
|
+
...props
|
80
|
+
}, ref) => {
|
81
|
+
const { selectedTab, onTabChange, registerTab, unregisterTab } = useTabContext();
|
82
|
+
const elementRef = (0, import_react.useRef)(null);
|
83
|
+
const combinedRef = (0, import_react.useCallback)(
|
84
|
+
(element) => {
|
85
|
+
elementRef.current = element;
|
86
|
+
if (typeof ref === "function") {
|
87
|
+
ref(element);
|
88
|
+
} else if (ref && "current" in ref) {
|
89
|
+
ref.current = element;
|
90
|
+
}
|
91
|
+
},
|
92
|
+
[ref]
|
93
|
+
);
|
94
|
+
(0, import_react.useEffect)(() => {
|
95
|
+
if (autoRegister && tabId && elementRef.current && registerTab) {
|
96
|
+
registerTab(tabId, elementRef.current);
|
97
|
+
return () => {
|
98
|
+
if (unregisterTab) {
|
99
|
+
unregisterTab(tabId);
|
100
|
+
}
|
101
|
+
};
|
102
|
+
}
|
103
|
+
}, [tabId, autoRegister, registerTab, unregisterTab]);
|
104
|
+
const handleClick = (0, import_react.useCallback)(() => {
|
105
|
+
if (!isDisabled) {
|
106
|
+
if (tabId && onTabChange) {
|
107
|
+
onTabChange(tabId);
|
108
|
+
}
|
109
|
+
onClick == null ? void 0 : onClick(tabId);
|
110
|
+
}
|
111
|
+
}, [isDisabled, tabId, onTabChange, onClick]);
|
112
|
+
const isTabSelected = tabId ? selectedTab === tabId : isSelected;
|
113
|
+
return /* @__PURE__ */ import_react.default.createElement("li", { role: "presentation", style: { lineHeight: 0 } }, /* @__PURE__ */ import_react.default.createElement(
|
114
|
+
"button",
|
115
|
+
{
|
116
|
+
id: tabId,
|
117
|
+
ref: combinedRef,
|
118
|
+
className: (0, import_classnames.default)(
|
119
|
+
import_styles.tabItemClasses.item,
|
120
|
+
isTabSelected && import_styles.tabItemClasses.selected,
|
121
|
+
isDisabled && import_styles.tabItemClasses.disabled,
|
122
|
+
className
|
123
|
+
),
|
124
|
+
role: "tab",
|
125
|
+
"aria-selected": isTabSelected,
|
126
|
+
"aria-disabled": isDisabled,
|
127
|
+
disabled: isDisabled,
|
128
|
+
onClick: handleClick,
|
129
|
+
tabIndex: isTabSelected ? 0 : -1,
|
130
|
+
...props
|
131
|
+
},
|
132
|
+
children
|
133
|
+
));
|
134
|
+
}
|
135
|
+
);
|
136
|
+
var Rail = (0, import_react.forwardRef)(
|
137
|
+
({ children, className, ...props }, ref) => {
|
138
|
+
const { railRef: contextRailRef } = useTabContext();
|
139
|
+
const mergedRef = (0, import_react.useCallback)(
|
140
|
+
(element) => {
|
141
|
+
if (contextRailRef && "current" in contextRailRef) {
|
142
|
+
contextRailRef.current = element;
|
143
|
+
}
|
144
|
+
if (typeof ref === "function") {
|
145
|
+
ref(element);
|
146
|
+
} else if (ref && "current" in ref) {
|
147
|
+
ref.current = element;
|
148
|
+
}
|
149
|
+
},
|
150
|
+
[ref, contextRailRef]
|
151
|
+
);
|
152
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
153
|
+
"div",
|
154
|
+
{
|
155
|
+
ref: mergedRef,
|
156
|
+
className: (0, import_classnames.default)(import_styles.railClasses.rail, className),
|
157
|
+
...props
|
158
|
+
},
|
159
|
+
children
|
160
|
+
);
|
161
|
+
}
|
162
|
+
);
|
163
|
+
var SelectionIndicator = (0, import_react.forwardRef)(
|
164
|
+
({ focusRingClasses, isFocusVisible = false, style, className, ...props }, ref) => {
|
165
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
166
|
+
"div",
|
167
|
+
{
|
168
|
+
ref,
|
169
|
+
className: (0, import_classnames.default)(
|
170
|
+
import_styles.selectionClasses.selection,
|
171
|
+
import_styles.selectionClasses.position,
|
172
|
+
{
|
173
|
+
[import_styles.selectionClasses.focused]: isFocusVisible && focusRingClasses
|
174
|
+
},
|
175
|
+
className
|
176
|
+
),
|
177
|
+
style,
|
178
|
+
"aria-hidden": "true",
|
179
|
+
...props
|
180
|
+
}
|
181
|
+
);
|
182
|
+
}
|
183
|
+
);
|
184
|
+
var ScrollShadow = (0, import_react.forwardRef)(
|
185
|
+
({ visible, location, className, ...props }, ref) => {
|
186
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
187
|
+
"div",
|
188
|
+
{
|
189
|
+
ref,
|
190
|
+
className: (0, import_classnames.default)(
|
191
|
+
import_styles.shadowClasses.shadow,
|
192
|
+
{
|
193
|
+
[import_styles.shadowClasses.isVisible]: visible,
|
194
|
+
[import_styles.shadowClasses.locationStart]: location === "start",
|
195
|
+
[import_styles.shadowClasses.locationEnd]: location === "end"
|
196
|
+
},
|
197
|
+
className
|
198
|
+
),
|
199
|
+
...props
|
200
|
+
}
|
201
|
+
);
|
202
|
+
}
|
203
|
+
);
|
204
|
+
var ChevronButton = (0, import_react.forwardRef)(
|
205
|
+
({
|
206
|
+
direction,
|
207
|
+
disabled = false,
|
208
|
+
onClick,
|
209
|
+
className,
|
210
|
+
"aria-label": ariaLabel,
|
211
|
+
...props
|
212
|
+
}, ref) => {
|
213
|
+
const defaultAriaLabel = direction === "prev" ? "prev" : "next";
|
214
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
215
|
+
"button",
|
216
|
+
{
|
217
|
+
ref,
|
218
|
+
className: (0, import_classnames.default)(
|
219
|
+
import_styles.chevronButtonClasses.button,
|
220
|
+
{
|
221
|
+
[import_styles.chevronButtonClasses.disabled]: disabled,
|
222
|
+
[import_styles.chevronButtonClasses.prev]: direction === "prev",
|
223
|
+
[import_styles.chevronButtonClasses.next]: direction === "next"
|
224
|
+
},
|
225
|
+
className
|
226
|
+
),
|
227
|
+
disabled,
|
228
|
+
onClick,
|
229
|
+
"aria-label": ariaLabel || defaultAriaLabel,
|
230
|
+
type: "button",
|
231
|
+
...props
|
232
|
+
},
|
233
|
+
direction === "prev" ? /* @__PURE__ */ import_react.default.createElement(import_ChevronLeft.default, null) : /* @__PURE__ */ import_react.default.createElement(import_ChevronRight.default, null)
|
234
|
+
);
|
235
|
+
}
|
236
|
+
);
|
237
|
+
var ChevronControls = ({
|
238
|
+
isPrevDisabled = false,
|
239
|
+
isNextDisabled = false,
|
240
|
+
onPrevClick,
|
241
|
+
onNextClick,
|
242
|
+
prevAction,
|
243
|
+
nextAction,
|
244
|
+
className,
|
245
|
+
...props
|
246
|
+
}) => {
|
247
|
+
const handlePrevClick = onPrevClick || prevAction;
|
248
|
+
const handleNextClick = onNextClick || nextAction;
|
249
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(import_styles.chevronClasses.controls, className), ...props }, /* @__PURE__ */ import_react.default.createElement(
|
250
|
+
ChevronButton,
|
251
|
+
{
|
252
|
+
direction: "prev",
|
253
|
+
disabled: isPrevDisabled,
|
254
|
+
onClick: handlePrevClick
|
255
|
+
}
|
256
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
257
|
+
ChevronButton,
|
258
|
+
{
|
259
|
+
direction: "next",
|
260
|
+
disabled: isNextDisabled,
|
261
|
+
onClick: handleNextClick
|
262
|
+
}
|
263
|
+
));
|
264
|
+
};
|
265
|
+
var TabsStructure = ({
|
266
|
+
selectedTab,
|
267
|
+
onTabChange,
|
268
|
+
autoScrollToSelected = true,
|
269
|
+
children,
|
270
|
+
className,
|
271
|
+
railRef: externalRailRef,
|
272
|
+
...props
|
273
|
+
}) => {
|
274
|
+
const tabElementsRef = (0, import_react.useRef)(/* @__PURE__ */ new Map());
|
275
|
+
const internalRailRef = (0, import_react.useRef)(null);
|
276
|
+
const railRef = externalRailRef || internalRailRef;
|
277
|
+
if (!selectedTab && children) {
|
278
|
+
console.warn("TabsStructure: No selectedTab provided, consider setting a default value");
|
279
|
+
}
|
280
|
+
const registerTab = (0, import_react.useCallback)((tabId, element) => {
|
281
|
+
if (!tabId || !element) {
|
282
|
+
console.warn("TabsStructure: Invalid tabId or element provided to registerTab");
|
283
|
+
return;
|
284
|
+
}
|
285
|
+
if (typeof WeakRef !== "undefined") {
|
286
|
+
tabElementsRef.current.set(tabId, new WeakRef(element));
|
287
|
+
} else {
|
288
|
+
tabElementsRef.current.set(tabId, element);
|
289
|
+
}
|
290
|
+
}, []);
|
291
|
+
const unregisterTab = (0, import_react.useCallback)((tabId) => {
|
292
|
+
if (tabId) {
|
293
|
+
tabElementsRef.current.delete(tabId);
|
294
|
+
}
|
295
|
+
}, []);
|
296
|
+
const clearAllTabs = (0, import_react.useCallback)(() => {
|
297
|
+
tabElementsRef.current.clear();
|
298
|
+
}, []);
|
299
|
+
(0, import_react.useEffect)(() => {
|
300
|
+
return () => {
|
301
|
+
if (typeof WeakRef === "undefined") {
|
302
|
+
clearAllTabs();
|
303
|
+
}
|
304
|
+
};
|
305
|
+
}, [clearAllTabs]);
|
306
|
+
const getTabElement = (0, import_react.useCallback)((tabId) => {
|
307
|
+
const ref = tabElementsRef.current.get(tabId);
|
308
|
+
if (!ref) return null;
|
309
|
+
if (typeof WeakRef !== "undefined" && ref instanceof WeakRef) {
|
310
|
+
const element = ref.deref();
|
311
|
+
if (!element) {
|
312
|
+
tabElementsRef.current.delete(tabId);
|
313
|
+
return null;
|
314
|
+
}
|
315
|
+
return element;
|
316
|
+
} else {
|
317
|
+
return ref;
|
318
|
+
}
|
319
|
+
}, []);
|
320
|
+
const scrollToTab = (0, import_react.useCallback)((tabId) => {
|
321
|
+
if (!tabId || !railRef.current) {
|
322
|
+
return;
|
323
|
+
}
|
324
|
+
const targetElement = getTabElement(tabId);
|
325
|
+
if (!targetElement) {
|
326
|
+
console.warn(`TabsStructure: Tab element with id "${tabId}" not found`);
|
327
|
+
return;
|
328
|
+
}
|
329
|
+
if (!targetElement.offsetParent) {
|
330
|
+
console.warn(`TabsStructure: Tab element "${tabId}" is not visible or not in DOM`);
|
331
|
+
return;
|
332
|
+
}
|
333
|
+
const rail = railRef.current;
|
334
|
+
const targetLeft = targetElement.offsetLeft;
|
335
|
+
const currentScrollLeft = rail.scrollLeft;
|
336
|
+
if (Math.abs(targetLeft - currentScrollLeft) > 1) {
|
337
|
+
(0, import_utils.safeScrollTo)(rail, {
|
338
|
+
left: targetLeft,
|
339
|
+
behavior: "smooth"
|
340
|
+
});
|
341
|
+
}
|
342
|
+
}, [getTabElement]);
|
343
|
+
(0, import_react.useEffect)(() => {
|
344
|
+
if (autoScrollToSelected && selectedTab) {
|
345
|
+
scrollToTab(selectedTab);
|
346
|
+
}
|
347
|
+
}, [selectedTab, autoScrollToSelected, scrollToTab]);
|
348
|
+
const contextValue = (0, import_react.useMemo)(
|
349
|
+
() => ({
|
350
|
+
selectedTab,
|
351
|
+
onTabChange,
|
352
|
+
registerTab,
|
353
|
+
unregisterTab,
|
354
|
+
railRef
|
355
|
+
}),
|
356
|
+
[selectedTab, onTabChange, registerTab, unregisterTab, railRef]
|
357
|
+
);
|
358
|
+
return /* @__PURE__ */ import_react.default.createElement(TabContext.Provider, { value: contextValue }, /* @__PURE__ */ import_react.default.createElement(
|
359
|
+
"div",
|
360
|
+
{
|
361
|
+
...props,
|
362
|
+
className: (0, import_classnames.default)(import_styles.tabWrapperClasses.wrapper, className)
|
363
|
+
},
|
364
|
+
children
|
365
|
+
));
|
366
|
+
};
|
367
|
+
var TabsStructureWithSubComponents = TabsStructure;
|
368
|
+
TabsStructureWithSubComponents.Rail = Rail;
|
369
|
+
TabsStructureWithSubComponents.ListContainer = TabListContainer;
|
370
|
+
TabsStructureWithSubComponents.Item = TabItem;
|
371
|
+
TabsStructureWithSubComponents.SelectionIndicator = SelectionIndicator;
|
372
|
+
TabsStructureWithSubComponents.ScrollShadow = ScrollShadow;
|
373
|
+
TabsStructureWithSubComponents.ChevronControls = ChevronControls;
|
374
|
+
TabsStructureWithSubComponents.ChevronButton = ChevronButton;
|
375
|
+
TabsStructure.displayName = "TabsStructure";
|
376
|
+
Rail.displayName = "TabsStructure.Rail";
|
377
|
+
TabListContainer.displayName = "TabsStructure.ListContainer";
|
378
|
+
TabItem.displayName = "TabsStructure.Item";
|
379
|
+
SelectionIndicator.displayName = "TabsStructure.SelectionIndicator";
|
380
|
+
ScrollShadow.displayName = "TabsStructure.ScrollShadow";
|
381
|
+
ChevronControls.displayName = "TabsStructure.ChevronControls";
|
382
|
+
ChevronButton.displayName = "TabsStructure.ChevronButton";
|
383
|
+
var TabsStructure_default = TabsStructureWithSubComponents;
|
384
|
+
// Annotate the CommonJS export names for ESM import in node:
|
385
|
+
0 && (module.exports = {
|
386
|
+
ChevronButton,
|
387
|
+
ChevronControls,
|
388
|
+
Rail,
|
389
|
+
ScrollShadow,
|
390
|
+
SelectionIndicator,
|
391
|
+
TabItem,
|
392
|
+
TabListContainer
|
393
|
+
});
|
@@ -0,0 +1,224 @@
|
|
1
|
+
// ===== Mixins =====
|
2
|
+
.pisell-tabstruct-focus-ring() {
|
3
|
+
outline: 2px solid var(--ps-color-primary, #7f56d9);
|
4
|
+
outline-offset: 2px;
|
5
|
+
}
|
6
|
+
|
7
|
+
.pisell-tabstruct-disabled() {
|
8
|
+
opacity: 0.6;
|
9
|
+
cursor: not-allowed;
|
10
|
+
pointer-events: none;
|
11
|
+
}
|
12
|
+
|
13
|
+
.pisell-tabstruct-smooth-scroll() {
|
14
|
+
scroll-behavior: smooth;
|
15
|
+
-webkit-overflow-scrolling: touch;
|
16
|
+
}
|
17
|
+
|
18
|
+
.pisell-tabstruct-hide-scrollbar() {
|
19
|
+
scrollbar-width: none;
|
20
|
+
/* Firefox */
|
21
|
+
-ms-overflow-style: none;
|
22
|
+
/* IE and Edge */
|
23
|
+
|
24
|
+
&::-webkit-scrollbar {
|
25
|
+
display: none;
|
26
|
+
/* Chrome, Safari, Opera */
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
// ===== Tab Wrapper =====
|
31
|
+
.pisell-tabstruct-wrapper {
|
32
|
+
position: relative;
|
33
|
+
display: flex;
|
34
|
+
align-items: center;
|
35
|
+
inline-size: 100%;
|
36
|
+
box-sizing: border-box;
|
37
|
+
}
|
38
|
+
|
39
|
+
// ===== Tab List =====
|
40
|
+
.pisell-tabstruct-list {
|
41
|
+
padding: 0;
|
42
|
+
margin: 0;
|
43
|
+
display: inline-flex;
|
44
|
+
align-items: center;
|
45
|
+
list-style: none;
|
46
|
+
gap: 8px;
|
47
|
+
border-radius: 20px;
|
48
|
+
}
|
49
|
+
|
50
|
+
// ===== Tab Item =====
|
51
|
+
.pisell-tabstruct-item {
|
52
|
+
position: relative;
|
53
|
+
display: inline-flex;
|
54
|
+
align-items: center;
|
55
|
+
justify-content: center;
|
56
|
+
padding: 0 16px;
|
57
|
+
height: 40px;
|
58
|
+
border: none;
|
59
|
+
background: var(--ps-tab-item-bg, #fff);
|
60
|
+
color: #1b1b1b;
|
61
|
+
font-size: 14px;
|
62
|
+
font-weight: 600;
|
63
|
+
line-height: 1.4;
|
64
|
+
text-decoration: none;
|
65
|
+
cursor: pointer;
|
66
|
+
transition: all 0.2s ease-in-out;
|
67
|
+
white-space: nowrap;
|
68
|
+
user-select: none;
|
69
|
+
// 基础样式采用原pill样式
|
70
|
+
border-radius: 20px;
|
71
|
+
|
72
|
+
// Focus state
|
73
|
+
&:focus-visible {
|
74
|
+
.pisell-tabstruct-focus-ring();
|
75
|
+
}
|
76
|
+
|
77
|
+
&--selected {
|
78
|
+
color: #ffffff;
|
79
|
+
border-radius: 20px;
|
80
|
+
background-color: var(--ps-color-primary, #7f56d9);;
|
81
|
+
}
|
82
|
+
|
83
|
+
&[aria-selected='true'] {
|
84
|
+
color: #ffffff;
|
85
|
+
border-radius: 20px;
|
86
|
+
background-color: var(--ps-color-primary, #7f56d9);;
|
87
|
+
}
|
88
|
+
|
89
|
+
// Disabled state
|
90
|
+
&--disabled {
|
91
|
+
.pisell-tabstruct-disabled();
|
92
|
+
color: #adb5bd;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
// ===== Tab Rail =====
|
97
|
+
.pisell-tabstruct-rail {
|
98
|
+
position: relative;
|
99
|
+
display: inline-flex;
|
100
|
+
inline-size: 100%;
|
101
|
+
overflow: auto;
|
102
|
+
scroll-snap-type: x mandatory;
|
103
|
+
.pisell-tabstruct-smooth-scroll();
|
104
|
+
.pisell-tabstruct-hide-scrollbar();
|
105
|
+
}
|
106
|
+
|
107
|
+
// ===== Selection Indicator =====
|
108
|
+
.pisell-tabstruct-selection {
|
109
|
+
position: absolute;
|
110
|
+
z-index: 10;
|
111
|
+
transition: all 0.2s ease-in-out;
|
112
|
+
pointer-events: none;
|
113
|
+
z-index: 0;
|
114
|
+
block-size: 100%;
|
115
|
+
background-color: var(--ps-color-primary, #7f56d9);
|
116
|
+
border-radius: 20px;
|
117
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
118
|
+
|
119
|
+
&--positioned {
|
120
|
+
inset-block-start: auto;
|
121
|
+
inset-block-end: 0;
|
122
|
+
inset-inline-start: 0;
|
123
|
+
}
|
124
|
+
|
125
|
+
&::before {
|
126
|
+
content: '';
|
127
|
+
position: absolute;
|
128
|
+
inset: 2px;
|
129
|
+
border-radius: calc(20px - 2px);
|
130
|
+
}
|
131
|
+
|
132
|
+
&::after {
|
133
|
+
content: '';
|
134
|
+
position: absolute;
|
135
|
+
inset-block-start: 1px;
|
136
|
+
inset-inline-start: 1px;
|
137
|
+
inset-inline-end: 1px;
|
138
|
+
block-size: 50%;
|
139
|
+
background-color: var(--ps-color-primary, #7f56d9);
|
140
|
+
border-radius: 20px 20px 0 0;
|
141
|
+
}
|
142
|
+
|
143
|
+
&--focused {
|
144
|
+
.pisell-tabstruct-focus-ring();
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
// ===== Scroll Shadow =====
|
149
|
+
.pisell-tabstruct-shadow {
|
150
|
+
position: absolute;
|
151
|
+
z-index: 5;
|
152
|
+
pointer-events: none;
|
153
|
+
opacity: 0;
|
154
|
+
transition: opacity all 0.2s ease-in-out;
|
155
|
+
|
156
|
+
&--visible {
|
157
|
+
opacity: 1;
|
158
|
+
}
|
159
|
+
|
160
|
+
&--start {
|
161
|
+
inset-block-start: 0;
|
162
|
+
inset-block-end: 0;
|
163
|
+
inset-inline-start: 0;
|
164
|
+
inline-size: 20px;
|
165
|
+
background: linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0%, transparent 100%);
|
166
|
+
}
|
167
|
+
|
168
|
+
&--end {
|
169
|
+
inset-block-start: 0;
|
170
|
+
inset-block-end: 0;
|
171
|
+
inset-inline-end: 0;
|
172
|
+
inline-size: 20px;
|
173
|
+
background: linear-gradient(
|
174
|
+
270deg,
|
175
|
+
rgba(0, 0, 0, 0.1) 0%,
|
176
|
+
transparent 100%
|
177
|
+
);
|
178
|
+
}
|
179
|
+
}
|
180
|
+
|
181
|
+
// ===== Chevron Controls =====
|
182
|
+
.pisell-tabstruct-chevron-controls {
|
183
|
+
display: flex;
|
184
|
+
align-items: center;
|
185
|
+
gap: 8px;
|
186
|
+
z-index: 15;
|
187
|
+
}
|
188
|
+
|
189
|
+
.pisell-tabstruct-chevron-button {
|
190
|
+
display: inline-flex;
|
191
|
+
align-items: center;
|
192
|
+
justify-content: center;
|
193
|
+
width: 24px;
|
194
|
+
height: 24px;
|
195
|
+
padding: 0;
|
196
|
+
border: 1px solid transparent;
|
197
|
+
border-radius: 12px;
|
198
|
+
background-color: #f8f9fa;
|
199
|
+
color: #262626;
|
200
|
+
cursor: pointer;
|
201
|
+
transition: all 0.2s ease-in-out;
|
202
|
+
flex-shrink: 0;
|
203
|
+
|
204
|
+
&:hover:not(.pisell-tabstruct-chevron-button--disabled) {
|
205
|
+
background-color: #e9ecef;
|
206
|
+
color: #495057;
|
207
|
+
}
|
208
|
+
|
209
|
+
&:focus-visible {
|
210
|
+
.pisell-tabstruct-focus-ring();
|
211
|
+
}
|
212
|
+
|
213
|
+
&--disabled {
|
214
|
+
.pisell-tabstruct-disabled();
|
215
|
+
color: #adb5bd;
|
216
|
+
background-color: #f2f4f7;
|
217
|
+
}
|
218
|
+
|
219
|
+
svg {
|
220
|
+
font-size: 20px;
|
221
|
+
font-weight: bold;
|
222
|
+
flex-shrink: 0;
|
223
|
+
}
|
224
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
interface UseSelectionIndicatorReturn {
|
3
|
+
selectionIndicatorProps: {
|
4
|
+
focusRingClasses: string;
|
5
|
+
isFocusVisible: boolean;
|
6
|
+
style: React.CSSProperties;
|
7
|
+
};
|
8
|
+
listContainerProps: {
|
9
|
+
onFocus: (event: React.FocusEvent) => void;
|
10
|
+
onBlur: () => void;
|
11
|
+
onMouseDown: () => void;
|
12
|
+
};
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* Hook for managing selection indicator position with enhanced features
|
16
|
+
* @param containerRef - Ref to the tab container
|
17
|
+
* @param selectedTabId - ID of the currently selected tab (optional)
|
18
|
+
* @param transition - Custom transition string (optional)
|
19
|
+
* @returns Selection indicator props and list container props
|
20
|
+
*/
|
21
|
+
export declare function useSelectionIndicator(containerRef: React.RefObject<HTMLElement>, selectedTabId?: string, transition?: string): UseSelectionIndicatorReturn;
|
22
|
+
export {};
|