@ikas/code-components-mcp 0.105.0 → 0.106.0
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/data/section-templates/account-info-section/_meta.json +4 -0
- package/data/section-templates/account-info-section/children/AccountAddresses/components/AddressCard/index.tsx +55 -0
- package/data/section-templates/account-info-section/children/AccountAddresses/components/AddressCard/styles.css +46 -0
- package/data/section-templates/account-info-section/children/AccountAddresses/components/AddressModal/index.tsx +301 -0
- package/data/section-templates/account-info-section/children/AccountAddresses/components/AddressModal/styles.css +22 -0
- package/data/section-templates/account-info-section/children/AccountAddresses/ikas-config-snippet.json +122 -0
- package/data/section-templates/account-info-section/children/AccountAddresses/index.tsx +127 -0
- package/data/section-templates/account-info-section/children/AccountAddresses/styles.css +41 -0
- package/data/section-templates/account-info-section/children/AccountAddresses/types.ts +14 -0
- package/data/section-templates/account-info-section/children/AccountFavorites/ikas-config-snippet.json +57 -0
- package/data/section-templates/account-info-section/children/AccountFavorites/index.tsx +82 -0
- package/data/section-templates/account-info-section/children/AccountFavorites/styles.css +52 -0
- package/data/section-templates/account-info-section/children/AccountFavorites/types.ts +6 -0
- package/data/section-templates/account-info-section/children/AccountInfoContent/ikas-config-snippet.json +66 -0
- package/data/section-templates/account-info-section/children/AccountInfoContent/index.tsx +134 -0
- package/data/section-templates/account-info-section/children/AccountInfoContent/styles.css +57 -0
- package/data/section-templates/account-info-section/children/AccountInfoContent/types.ts +7 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/components/OrderHeader/index.tsx +78 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/components/OrderHeader/styles.css +46 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/components/OrderItemRow/index.tsx +20 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/components/OrderItemRow/styles.css +16 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/components/OrderLineItemDisplay/index.tsx +112 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/components/OrderLineItemDisplay/styles.css +86 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/components/OrderSidebar/index.tsx +195 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/components/OrderSidebar/styles.css +93 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/components/PackageGroup/index.tsx +156 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/components/PackageGroup/styles.css +100 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/components/ReturnItemRow/index.tsx +56 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/components/ReturnItemRow/styles.css +57 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/components/ReturnView/index.tsx +159 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/components/ReturnView/styles.css +29 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/ikas-config-snippet.json +283 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/index.tsx +244 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/styles.css +125 -0
- package/data/section-templates/account-info-section/children/AccountOrderDetail/types.ts +31 -0
- package/data/section-templates/account-info-section/children/AccountOrders/components/OrderCard/index.tsx +122 -0
- package/data/section-templates/account-info-section/children/AccountOrders/components/OrderCard/styles.css +114 -0
- package/data/section-templates/account-info-section/children/AccountOrders/ikas-config-snippet.json +85 -0
- package/data/section-templates/account-info-section/children/AccountOrders/index.tsx +105 -0
- package/data/section-templates/account-info-section/children/AccountOrders/styles.css +36 -0
- package/data/section-templates/account-info-section/children/AccountOrders/types.ts +10 -0
- package/data/section-templates/account-info-section/components/AccountSidebar/index.tsx +171 -0
- package/data/section-templates/account-info-section/components/AccountSidebar/styles.css +144 -0
- package/data/section-templates/account-info-section/global-types.ts +13 -0
- package/data/section-templates/account-info-section/hooks/useScrollLock.ts +20 -0
- package/data/section-templates/account-info-section/ikas-config-snippet.json +69 -0
- package/data/section-templates/account-info-section/index.tsx +91 -0
- package/data/section-templates/account-info-section/styles.css +35 -0
- package/data/section-templates/account-info-section/sub-components/Breadcrumb/index.tsx +57 -0
- package/data/section-templates/account-info-section/sub-components/Breadcrumb/styles.css +49 -0
- package/data/section-templates/account-info-section/sub-components/Button/index.tsx +52 -0
- package/data/section-templates/account-info-section/sub-components/Button/styles.css +114 -0
- package/data/section-templates/account-info-section/sub-components/Checkbox/index.tsx +42 -0
- package/data/section-templates/account-info-section/sub-components/Checkbox/styles.css +65 -0
- package/data/section-templates/account-info-section/sub-components/ConfirmModal/index.tsx +60 -0
- package/data/section-templates/account-info-section/sub-components/ConfirmModal/styles.css +20 -0
- package/data/section-templates/account-info-section/sub-components/FormItem/index.tsx +66 -0
- package/data/section-templates/account-info-section/sub-components/FormItem/styles.css +38 -0
- package/data/section-templates/account-info-section/sub-components/Input/index.tsx +69 -0
- package/data/section-templates/account-info-section/sub-components/Input/styles.css +162 -0
- package/data/section-templates/account-info-section/sub-components/Modal/index.tsx +118 -0
- package/data/section-templates/account-info-section/sub-components/Modal/styles.css +70 -0
- package/data/section-templates/account-info-section/sub-components/PageLoader/index.tsx +14 -0
- package/data/section-templates/account-info-section/sub-components/PageLoader/styles.css +12 -0
- package/data/section-templates/account-info-section/sub-components/ProductCard/index.tsx +276 -0
- package/data/section-templates/account-info-section/sub-components/ProductCard/styles.css +99 -0
- package/data/section-templates/account-info-section/sub-components/Select/index.tsx +86 -0
- package/data/section-templates/account-info-section/sub-components/Select/styles.css +110 -0
- package/data/section-templates/account-info-section/sub-components/SkeletonField/index.tsx +12 -0
- package/data/section-templates/account-info-section/sub-components/SkeletonField/styles.css +29 -0
- package/data/section-templates/account-info-section/sub-components/SpinnerIcon/index.tsx +10 -0
- package/data/section-templates/account-info-section/sub-components/SpinnerIcon/styles.css +8 -0
- package/data/section-templates/account-info-section/sub-components/Tag/index.tsx +21 -0
- package/data/section-templates/account-info-section/sub-components/Tag/styles.css +30 -0
- package/data/section-templates/account-info-section/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/account-info-section/types.ts +8 -0
- package/data/section-templates/account-info-section/utils/cx.ts +4 -0
- package/data/section-templates/account-info-section/utils/fullName.ts +6 -0
- package/data/section-templates/account-info-section/utils/media.ts +36 -0
- package/data/section-templates/account-info-section/utils/orderStatus.ts +28 -0
- package/data/section-templates/account-info-section/utils/toast.ts +5 -0
- package/data/section-templates/add-to-cart/_meta.json +4 -0
- package/data/section-templates/add-to-cart/components/PayWithIkas/index.tsx +34 -0
- package/data/section-templates/add-to-cart/components/PayWithIkas/styles.css +4 -0
- package/data/section-templates/add-to-cart/hooks/usePayWithIkas.ts +114 -0
- package/data/section-templates/add-to-cart/ikas-config-snippet.json +139 -0
- package/data/section-templates/add-to-cart/index.tsx +146 -0
- package/data/section-templates/add-to-cart/styles.css +27 -0
- package/data/section-templates/add-to-cart/sub-components/Button/index.tsx +52 -0
- package/data/section-templates/add-to-cart/sub-components/Button/styles.css +114 -0
- package/data/section-templates/add-to-cart/sub-components/QuantitySelector/index.tsx +41 -0
- package/data/section-templates/add-to-cart/sub-components/QuantitySelector/styles.css +51 -0
- package/data/section-templates/add-to-cart/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/add-to-cart/types.ts +17 -0
- package/data/section-templates/add-to-cart/utils/bundle.ts +70 -0
- package/data/section-templates/add-to-cart/utils/cx.ts +4 -0
- package/data/section-templates/add-to-cart/utils/optionSet.ts +17 -0
- package/data/section-templates/add-to-cart/utils/toast.ts +5 -0
- package/data/section-templates/blog-home-section/_meta.json +4 -0
- package/data/section-templates/blog-home-section/components/BlogCard/index.tsx +89 -0
- package/data/section-templates/blog-home-section/components/BlogCard/styles.css +121 -0
- package/data/section-templates/blog-home-section/global-types.ts +13 -0
- package/data/section-templates/blog-home-section/ikas-config-snippet.json +95 -0
- package/data/section-templates/blog-home-section/index.tsx +124 -0
- package/data/section-templates/blog-home-section/styles.css +118 -0
- package/data/section-templates/blog-home-section/sub-components/Pagination/index.tsx +107 -0
- package/data/section-templates/blog-home-section/sub-components/Pagination/styles.css +88 -0
- package/data/section-templates/blog-home-section/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/blog-home-section/types.ts +14 -0
- package/data/section-templates/blog-home-section/utils/cx.ts +4 -0
- package/data/section-templates/blog-home-section/utils/fullName.ts +6 -0
- package/data/section-templates/blog-home-section/utils/media.ts +36 -0
- package/data/section-templates/blog-home-section/utils/pagination.ts +29 -0
- package/data/section-templates/blog-post-section/_meta.json +4 -0
- package/data/section-templates/blog-post-section/global-types.ts +13 -0
- package/data/section-templates/blog-post-section/ikas-config-snippet.json +75 -0
- package/data/section-templates/blog-post-section/index.tsx +128 -0
- package/data/section-templates/blog-post-section/styles.css +120 -0
- package/data/section-templates/blog-post-section/sub-components/Breadcrumb/index.tsx +57 -0
- package/data/section-templates/blog-post-section/sub-components/Breadcrumb/styles.css +49 -0
- package/data/section-templates/blog-post-section/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/blog-post-section/types.ts +11 -0
- package/data/section-templates/blog-post-section/utils/cx.ts +4 -0
- package/data/section-templates/blog-post-section/utils/fullName.ts +6 -0
- package/data/section-templates/blog-post-section/utils/media.ts +36 -0
- package/data/section-templates/bundle-products/_meta.json +4 -0
- package/data/section-templates/bundle-products/components/BundleProductItem/index.tsx +169 -0
- package/data/section-templates/bundle-products/components/BundleProductItem/styles.css +141 -0
- package/data/section-templates/bundle-products/components/BundleSkeletonLoading/index.tsx +35 -0
- package/data/section-templates/bundle-products/components/BundleSkeletonLoading/styles.css +85 -0
- package/data/section-templates/bundle-products/components/FurnitureRow/index.tsx +51 -0
- package/data/section-templates/bundle-products/components/FurnitureRow/styles.css +30 -0
- package/data/section-templates/bundle-products/components/FurnitureView/index.tsx +54 -0
- package/data/section-templates/bundle-products/components/FurnitureView/styles.css +22 -0
- package/data/section-templates/bundle-products/global-types.ts +13 -0
- package/data/section-templates/bundle-products/hooks/useBundleProducts.ts +75 -0
- package/data/section-templates/bundle-products/ikas-config-snippet.json +130 -0
- package/data/section-templates/bundle-products/index.tsx +101 -0
- package/data/section-templates/bundle-products/styles.css +20 -0
- package/data/section-templates/bundle-products/sub-components/Badge/index.tsx +208 -0
- package/data/section-templates/bundle-products/sub-components/Badge/styles.css +129 -0
- package/data/section-templates/bundle-products/sub-components/BundleMedia/index.tsx +72 -0
- package/data/section-templates/bundle-products/sub-components/BundleQuantityBox/index.tsx +73 -0
- package/data/section-templates/bundle-products/sub-components/BundleQuantityBox/styles.css +43 -0
- package/data/section-templates/bundle-products/sub-components/VariantBadge/index.tsx +153 -0
- package/data/section-templates/bundle-products/sub-components/VariantBadge/styles.css +47 -0
- package/data/section-templates/bundle-products/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/bundle-products/types.ts +17 -0
- package/data/section-templates/bundle-products/utils/bundle.ts +70 -0
- package/data/section-templates/bundle-products/utils/cx.ts +4 -0
- package/data/section-templates/bundle-products/utils/media.ts +36 -0
- package/data/section-templates/cart-section/_meta.json +4 -0
- package/data/section-templates/cart-section/components/CouponCode/index.tsx +108 -0
- package/data/section-templates/cart-section/components/CouponCode/styles.css +68 -0
- package/data/section-templates/cart-section/components/EmptyState/index.tsx +31 -0
- package/data/section-templates/cart-section/components/EmptyState/styles.css +18 -0
- package/data/section-templates/cart-section/components/OrderSummary/index.tsx +106 -0
- package/data/section-templates/cart-section/components/OrderSummary/styles.css +70 -0
- package/data/section-templates/cart-section/global-types.ts +13 -0
- package/data/section-templates/cart-section/ikas-config-snippet.json +130 -0
- package/data/section-templates/cart-section/index.tsx +107 -0
- package/data/section-templates/cart-section/styles.css +54 -0
- package/data/section-templates/cart-section/sub-components/Button/index.tsx +52 -0
- package/data/section-templates/cart-section/sub-components/Button/styles.css +114 -0
- package/data/section-templates/cart-section/sub-components/CartItem/components/BundleProductItem/index.tsx +59 -0
- package/data/section-templates/cart-section/sub-components/CartItem/components/BundleProductItem/styles.css +24 -0
- package/data/section-templates/cart-section/sub-components/CartItem/components/BundleProducts/index.tsx +55 -0
- package/data/section-templates/cart-section/sub-components/CartItem/components/BundleProducts/styles.css +30 -0
- package/data/section-templates/cart-section/sub-components/CartItem/components/ItemOptions/index.tsx +31 -0
- package/data/section-templates/cart-section/sub-components/CartItem/components/ItemOptions/styles.css +6 -0
- package/data/section-templates/cart-section/sub-components/CartItem/components/OptionValueDisplay/index.tsx +79 -0
- package/data/section-templates/cart-section/sub-components/CartItem/components/OptionValueDisplay/styles.css +28 -0
- package/data/section-templates/cart-section/sub-components/CartItem/index.tsx +216 -0
- package/data/section-templates/cart-section/sub-components/CartItem/styles.css +170 -0
- package/data/section-templates/cart-section/sub-components/Input/index.tsx +69 -0
- package/data/section-templates/cart-section/sub-components/Input/styles.css +162 -0
- package/data/section-templates/cart-section/sub-components/PageLoader/index.tsx +14 -0
- package/data/section-templates/cart-section/sub-components/PageLoader/styles.css +12 -0
- package/data/section-templates/cart-section/sub-components/QuantitySelector/index.tsx +41 -0
- package/data/section-templates/cart-section/sub-components/QuantitySelector/styles.css +51 -0
- package/data/section-templates/cart-section/sub-components/SpinnerIcon/index.tsx +10 -0
- package/data/section-templates/cart-section/sub-components/SpinnerIcon/styles.css +8 -0
- package/data/section-templates/cart-section/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/cart-section/types.ts +15 -0
- package/data/section-templates/cart-section/utils/cx.ts +4 -0
- package/data/section-templates/cart-section/utils/media.ts +36 -0
- package/data/section-templates/category-images-section/_meta.json +4 -0
- package/data/section-templates/category-images-section/children/CategoryImageItem/components/Card/index.tsx +64 -0
- package/data/section-templates/category-images-section/children/CategoryImageItem/components/Card/styles.css +56 -0
- package/data/section-templates/category-images-section/children/CategoryImageItem/ikas-config-snippet.json +93 -0
- package/data/section-templates/category-images-section/children/CategoryImageItem/index.tsx +64 -0
- package/data/section-templates/category-images-section/children/CategoryImageItem/styles.css +10 -0
- package/data/section-templates/category-images-section/children/CategoryImageItem/types.ts +15 -0
- package/data/section-templates/category-images-section/global-types.ts +13 -0
- package/data/section-templates/category-images-section/ikas-config-snippet.json +69 -0
- package/data/section-templates/category-images-section/index.tsx +62 -0
- package/data/section-templates/category-images-section/styles.css +38 -0
- package/data/section-templates/category-images-section/types.ts +10 -0
- package/data/section-templates/category-images-section/utils/cx.ts +4 -0
- package/data/section-templates/category-images-section/utils/media.ts +36 -0
- package/data/section-templates/category-list-section/_meta.json +4 -0
- package/data/section-templates/category-list-section/children/CardProductName/ikas-config-snippet.json +21 -0
- package/data/section-templates/category-list-section/children/CardProductName/index.tsx +25 -0
- package/data/section-templates/category-list-section/children/CardProductName/styles.css +22 -0
- package/data/section-templates/category-list-section/children/CardProductName/types.ts +6 -0
- package/data/section-templates/category-list-section/children/CardProductPrice/ikas-config-snippet.json +15 -0
- package/data/section-templates/category-list-section/children/CardProductPrice/index.tsx +30 -0
- package/data/section-templates/category-list-section/children/CardProductPrice/styles.css +13 -0
- package/data/section-templates/category-list-section/children/CardProductPrice/types.ts +5 -0
- package/data/section-templates/category-list-section/children/CardProductVariants/ikas-config-snippet.json +15 -0
- package/data/section-templates/category-list-section/children/CardProductVariants/index.tsx +10 -0
- package/data/section-templates/category-list-section/children/CardProductVariants/styles.css +1 -0
- package/data/section-templates/category-list-section/children/CardProductVariants/types.ts +5 -0
- package/data/section-templates/category-list-section/components/CategoryListControls/index.tsx +129 -0
- package/data/section-templates/category-list-section/components/CategoryListControls/styles.css +99 -0
- package/data/section-templates/category-list-section/components/FilterBoxValues/index.tsx +42 -0
- package/data/section-templates/category-list-section/components/FilterBoxValues/styles.css +27 -0
- package/data/section-templates/category-list-section/components/FilterCategoryList/index.tsx +43 -0
- package/data/section-templates/category-list-section/components/FilterCategoryList/styles.css +20 -0
- package/data/section-templates/category-list-section/components/FilterGroupValues/index.tsx +114 -0
- package/data/section-templates/category-list-section/components/FilterGroupValues/styles.css +1 -0
- package/data/section-templates/category-list-section/components/FilterListValues/index.tsx +54 -0
- package/data/section-templates/category-list-section/components/FilterListValues/styles.css +22 -0
- package/data/section-templates/category-list-section/components/FilterRangeListValues/index.tsx +50 -0
- package/data/section-templates/category-list-section/components/FilterRangeListValues/styles.css +25 -0
- package/data/section-templates/category-list-section/components/FilterRangeValues/index.tsx +189 -0
- package/data/section-templates/category-list-section/components/FilterRangeValues/styles.css +89 -0
- package/data/section-templates/category-list-section/components/FilterSidebar/index.tsx +92 -0
- package/data/section-templates/category-list-section/components/FilterSidebar/styles.css +27 -0
- package/data/section-templates/category-list-section/components/FilterSwatchValues/index.tsx +63 -0
- package/data/section-templates/category-list-section/components/FilterSwatchValues/styles.css +48 -0
- package/data/section-templates/category-list-section/components/MobileFilterModal/index.tsx +146 -0
- package/data/section-templates/category-list-section/components/MobileFilterModal/styles.css +133 -0
- package/data/section-templates/category-list-section/global-types.ts +13 -0
- package/data/section-templates/category-list-section/hooks/useColumnPreference.ts +26 -0
- package/data/section-templates/category-list-section/hooks/useInfiniteScroll.ts +49 -0
- package/data/section-templates/category-list-section/hooks/usePageTracking.ts +56 -0
- package/data/section-templates/category-list-section/hooks/useScrollLock.ts +20 -0
- package/data/section-templates/category-list-section/ikas-config-snippet.json +240 -0
- package/data/section-templates/category-list-section/index.tsx +333 -0
- package/data/section-templates/category-list-section/styles.css +110 -0
- package/data/section-templates/category-list-section/sub-components/Badge/index.tsx +208 -0
- package/data/section-templates/category-list-section/sub-components/Badge/styles.css +129 -0
- package/data/section-templates/category-list-section/sub-components/Breadcrumb/index.tsx +57 -0
- package/data/section-templates/category-list-section/sub-components/Breadcrumb/styles.css +49 -0
- package/data/section-templates/category-list-section/sub-components/Button/index.tsx +52 -0
- package/data/section-templates/category-list-section/sub-components/Button/styles.css +114 -0
- package/data/section-templates/category-list-section/sub-components/Checkbox/index.tsx +42 -0
- package/data/section-templates/category-list-section/sub-components/Checkbox/styles.css +65 -0
- package/data/section-templates/category-list-section/sub-components/CollapsibleGroup/index.tsx +52 -0
- package/data/section-templates/category-list-section/sub-components/CollapsibleGroup/styles.css +51 -0
- package/data/section-templates/category-list-section/sub-components/Input/index.tsx +69 -0
- package/data/section-templates/category-list-section/sub-components/Input/styles.css +162 -0
- package/data/section-templates/category-list-section/sub-components/Pagination/index.tsx +107 -0
- package/data/section-templates/category-list-section/sub-components/Pagination/styles.css +88 -0
- package/data/section-templates/category-list-section/sub-components/ProductCard/index.tsx +276 -0
- package/data/section-templates/category-list-section/sub-components/ProductCard/styles.css +99 -0
- package/data/section-templates/category-list-section/sub-components/Select/index.tsx +86 -0
- package/data/section-templates/category-list-section/sub-components/Select/styles.css +110 -0
- package/data/section-templates/category-list-section/sub-components/SpinnerIcon/index.tsx +10 -0
- package/data/section-templates/category-list-section/sub-components/SpinnerIcon/styles.css +8 -0
- package/data/section-templates/category-list-section/sub-components/Tag/index.tsx +21 -0
- package/data/section-templates/category-list-section/sub-components/Tag/styles.css +30 -0
- package/data/section-templates/category-list-section/sub-components/VariantBadge/index.tsx +153 -0
- package/data/section-templates/category-list-section/sub-components/VariantBadge/styles.css +47 -0
- package/data/section-templates/category-list-section/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/category-list-section/types.ts +29 -0
- package/data/section-templates/category-list-section/utils/cx.ts +4 -0
- package/data/section-templates/category-list-section/utils/media.ts +36 -0
- package/data/section-templates/category-list-section/utils/pagination.ts +29 -0
- package/data/section-templates/category-list-section/utils/toast.ts +5 -0
- package/data/section-templates/component-renderer/_meta.json +4 -0
- package/data/section-templates/component-renderer/additional/Features/index.tsx +25 -0
- package/data/section-templates/component-renderer/additional/Features/styles.css +39 -0
- package/data/section-templates/component-renderer/additional/Features/types.ts +4 -0
- package/data/section-templates/component-renderer/additional/ProductDetail/index.tsx +92 -0
- package/data/section-templates/component-renderer/additional/ProductDetail/styles.css +58 -0
- package/data/section-templates/component-renderer/additional/ProductDetail/types.ts +11 -0
- package/data/section-templates/component-renderer/global-types.ts +13 -0
- package/data/section-templates/component-renderer/hooks/useToast.ts +27 -0
- package/data/section-templates/component-renderer/ikas-config-snippet.json +44 -0
- package/data/section-templates/component-renderer/index.tsx +53 -0
- package/data/section-templates/component-renderer/styles.css +6 -0
- package/data/section-templates/component-renderer/sub-components/Breadcrumb/index.tsx +57 -0
- package/data/section-templates/component-renderer/sub-components/Breadcrumb/styles.css +49 -0
- package/data/section-templates/component-renderer/sub-components/Toast/index.tsx +257 -0
- package/data/section-templates/component-renderer/sub-components/Toast/styles.css +3 -0
- package/data/section-templates/component-renderer/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/component-renderer/types.ts +5 -0
- package/data/section-templates/component-renderer/utils/cx.ts +4 -0
- package/data/section-templates/email-verification-section/_meta.json +4 -0
- package/data/section-templates/email-verification-section/ikas-config-snippet.json +143 -0
- package/data/section-templates/email-verification-section/index.tsx +168 -0
- package/data/section-templates/email-verification-section/styles.css +118 -0
- package/data/section-templates/email-verification-section/sub-components/Button/index.tsx +52 -0
- package/data/section-templates/email-verification-section/sub-components/Button/styles.css +114 -0
- package/data/section-templates/email-verification-section/sub-components/FormItem/index.tsx +66 -0
- package/data/section-templates/email-verification-section/sub-components/FormItem/styles.css +38 -0
- package/data/section-templates/email-verification-section/sub-components/Input/index.tsx +69 -0
- package/data/section-templates/email-verification-section/sub-components/Input/styles.css +162 -0
- package/data/section-templates/email-verification-section/sub-components/SpinnerIcon/index.tsx +10 -0
- package/data/section-templates/email-verification-section/sub-components/SpinnerIcon/styles.css +8 -0
- package/data/section-templates/email-verification-section/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/email-verification-section/types.ts +16 -0
- package/data/section-templates/email-verification-section/utils/cx.ts +4 -0
- package/data/section-templates/favorites/_meta.json +4 -0
- package/data/section-templates/favorites/ikas-config-snippet.json +72 -0
- package/data/section-templates/favorites/index.tsx +66 -0
- package/data/section-templates/favorites/styles.css +45 -0
- package/data/section-templates/favorites/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/favorites/types.ts +10 -0
- package/data/section-templates/favorites/utils/cx.ts +4 -0
- package/data/section-templates/features-section/_meta.json +4 -0
- package/data/section-templates/features-section/children/FeatureItem/ikas-config-snippet.json +21 -0
- package/data/section-templates/features-section/children/FeatureItem/index.tsx +27 -0
- package/data/section-templates/features-section/children/FeatureItem/styles.css +19 -0
- package/data/section-templates/features-section/children/FeatureItem/types.ts +6 -0
- package/data/section-templates/features-section/ikas-config-snippet.json +25 -0
- package/data/section-templates/features-section/index.tsx +25 -0
- package/data/section-templates/features-section/styles.css +39 -0
- package/data/section-templates/features-section/types.ts +4 -0
- package/data/section-templates/footer-section/_meta.json +4 -0
- package/data/section-templates/footer-section/children/SocialMediaIcon/ikas-config-snippet.json +21 -0
- package/data/section-templates/footer-section/children/SocialMediaIcon/index.tsx +26 -0
- package/data/section-templates/footer-section/children/SocialMediaIcon/styles.css +17 -0
- package/data/section-templates/footer-section/children/SocialMediaIcon/types.ts +6 -0
- package/data/section-templates/footer-section/ikas-config-snippet.json +108 -0
- package/data/section-templates/footer-section/index.tsx +154 -0
- package/data/section-templates/footer-section/styles.css +175 -0
- package/data/section-templates/footer-section/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/footer-section/types.ts +14 -0
- package/data/section-templates/footer-section/utils/cx.ts +4 -0
- package/data/section-templates/forgot-password-section/_meta.json +4 -0
- package/data/section-templates/forgot-password-section/components/ForgotPasswordForm/index.tsx +129 -0
- package/data/section-templates/forgot-password-section/components/ForgotPasswordForm/styles.css +0 -0
- package/data/section-templates/forgot-password-section/hooks/useRedirectIfLoggedIn.ts +35 -0
- package/data/section-templates/forgot-password-section/ikas-config-snippet.json +117 -0
- package/data/section-templates/forgot-password-section/index.tsx +30 -0
- package/data/section-templates/forgot-password-section/styles.css +85 -0
- package/data/section-templates/forgot-password-section/sub-components/Button/index.tsx +52 -0
- package/data/section-templates/forgot-password-section/sub-components/Button/styles.css +114 -0
- package/data/section-templates/forgot-password-section/sub-components/FormItem/index.tsx +66 -0
- package/data/section-templates/forgot-password-section/sub-components/FormItem/styles.css +38 -0
- package/data/section-templates/forgot-password-section/sub-components/Input/index.tsx +69 -0
- package/data/section-templates/forgot-password-section/sub-components/Input/styles.css +162 -0
- package/data/section-templates/forgot-password-section/sub-components/PageLoader/index.tsx +14 -0
- package/data/section-templates/forgot-password-section/sub-components/PageLoader/styles.css +12 -0
- package/data/section-templates/forgot-password-section/sub-components/SpinnerIcon/index.tsx +10 -0
- package/data/section-templates/forgot-password-section/sub-components/SpinnerIcon/styles.css +8 -0
- package/data/section-templates/forgot-password-section/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/forgot-password-section/types.ts +12 -0
- package/data/section-templates/forgot-password-section/utils/cx.ts +4 -0
- package/data/section-templates/header-section/_meta.json +4 -0
- package/data/section-templates/header-section/children/Announcements/ikas-config-snippet.json +62 -0
- package/data/section-templates/header-section/children/Announcements/index.tsx +91 -0
- package/data/section-templates/header-section/children/Announcements/styles.css +45 -0
- package/data/section-templates/header-section/children/Announcements/types.ts +7 -0
- package/data/section-templates/header-section/children/CookieBar/ikas-config-snippet.json +79 -0
- package/data/section-templates/header-section/children/CookieBar/index.tsx +78 -0
- package/data/section-templates/header-section/children/CookieBar/styles.css +111 -0
- package/data/section-templates/header-section/children/CookieBar/types.ts +9 -0
- package/data/section-templates/header-section/children/Navbar/components/CartSidebar/index.tsx +203 -0
- package/data/section-templates/header-section/children/Navbar/components/CartSidebar/styles.css +175 -0
- package/data/section-templates/header-section/children/Navbar/components/MobileMenu/index.tsx +198 -0
- package/data/section-templates/header-section/children/Navbar/components/MobileMenu/styles.css +122 -0
- package/data/section-templates/header-section/children/Navbar/components/NavItem/index.tsx +65 -0
- package/data/section-templates/header-section/children/Navbar/components/SearchModal/index.tsx +267 -0
- package/data/section-templates/header-section/children/Navbar/components/SearchModal/styles.css +182 -0
- package/data/section-templates/header-section/children/Navbar/ikas-config-snippet.json +315 -0
- package/data/section-templates/header-section/children/Navbar/index.tsx +250 -0
- package/data/section-templates/header-section/children/Navbar/styles.css +243 -0
- package/data/section-templates/header-section/children/Navbar/types.ts +36 -0
- package/data/section-templates/header-section/global-types.ts +13 -0
- package/data/section-templates/header-section/hooks/useScrollLock.ts +20 -0
- package/data/section-templates/header-section/hooks/useToast.ts +27 -0
- package/data/section-templates/header-section/ikas-config-snippet.json +44 -0
- package/data/section-templates/header-section/index.tsx +53 -0
- package/data/section-templates/header-section/styles.css +6 -0
- package/data/section-templates/header-section/sub-components/Button/index.tsx +52 -0
- package/data/section-templates/header-section/sub-components/Button/styles.css +114 -0
- package/data/section-templates/header-section/sub-components/CartItem/components/BundleProductItem/index.tsx +59 -0
- package/data/section-templates/header-section/sub-components/CartItem/components/BundleProductItem/styles.css +24 -0
- package/data/section-templates/header-section/sub-components/CartItem/components/BundleProducts/index.tsx +55 -0
- package/data/section-templates/header-section/sub-components/CartItem/components/BundleProducts/styles.css +30 -0
- package/data/section-templates/header-section/sub-components/CartItem/components/ItemOptions/index.tsx +31 -0
- package/data/section-templates/header-section/sub-components/CartItem/components/ItemOptions/styles.css +6 -0
- package/data/section-templates/header-section/sub-components/CartItem/components/OptionValueDisplay/index.tsx +79 -0
- package/data/section-templates/header-section/sub-components/CartItem/components/OptionValueDisplay/styles.css +28 -0
- package/data/section-templates/header-section/sub-components/CartItem/index.tsx +216 -0
- package/data/section-templates/header-section/sub-components/CartItem/styles.css +170 -0
- package/data/section-templates/header-section/sub-components/Input/index.tsx +69 -0
- package/data/section-templates/header-section/sub-components/Input/styles.css +162 -0
- package/data/section-templates/header-section/sub-components/ProductCard/index.tsx +276 -0
- package/data/section-templates/header-section/sub-components/ProductCard/styles.css +99 -0
- package/data/section-templates/header-section/sub-components/QuantitySelector/index.tsx +41 -0
- package/data/section-templates/header-section/sub-components/QuantitySelector/styles.css +51 -0
- package/data/section-templates/header-section/sub-components/SpinnerIcon/index.tsx +10 -0
- package/data/section-templates/header-section/sub-components/SpinnerIcon/styles.css +8 -0
- package/data/section-templates/header-section/sub-components/Tag/index.tsx +21 -0
- package/data/section-templates/header-section/sub-components/Tag/styles.css +30 -0
- package/data/section-templates/header-section/sub-components/Toast/index.tsx +257 -0
- package/data/section-templates/header-section/sub-components/Toast/styles.css +3 -0
- package/data/section-templates/header-section/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/header-section/types.ts +5 -0
- package/data/section-templates/header-section/utils/cx.ts +4 -0
- package/data/section-templates/header-section/utils/media.ts +36 -0
- package/data/section-templates/header-section/utils/toast.ts +5 -0
- package/data/section-templates/hero-slider-section/_meta.json +4 -0
- package/data/section-templates/hero-slider-section/children/HeroSliderItem/ikas-config-snippet.json +239 -0
- package/data/section-templates/hero-slider-section/children/HeroSliderItem/index.tsx +231 -0
- package/data/section-templates/hero-slider-section/children/HeroSliderItem/styles.css +152 -0
- package/data/section-templates/hero-slider-section/children/HeroSliderItem/types.ts +33 -0
- package/data/section-templates/hero-slider-section/global-types.ts +13 -0
- package/data/section-templates/hero-slider-section/ikas-config-snippet.json +67 -0
- package/data/section-templates/hero-slider-section/index.tsx +110 -0
- package/data/section-templates/hero-slider-section/styles.css +129 -0
- package/data/section-templates/hero-slider-section/sub-components/SliderArrow/index.tsx +26 -0
- package/data/section-templates/hero-slider-section/sub-components/SliderArrow/styles.css +24 -0
- package/data/section-templates/hero-slider-section/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/hero-slider-section/types.ts +8 -0
- package/data/section-templates/hero-slider-section/utils/cx.ts +4 -0
- package/data/section-templates/hero-slider-section/utils/media.ts +36 -0
- package/data/section-templates/image-handling/_meta.json +4 -0
- package/data/section-templates/image-handling/components/ProductGallery/index.tsx +316 -0
- package/data/section-templates/image-handling/components/ProductGallery/styles.css +213 -0
- package/data/section-templates/image-handling/global-types.ts +13 -0
- package/data/section-templates/image-handling/ikas-config-snippet.json +80 -0
- package/data/section-templates/image-handling/index.tsx +92 -0
- package/data/section-templates/image-handling/styles.css +58 -0
- package/data/section-templates/image-handling/sub-components/Breadcrumb/index.tsx +57 -0
- package/data/section-templates/image-handling/sub-components/Breadcrumb/styles.css +49 -0
- package/data/section-templates/image-handling/sub-components/SliderArrow/index.tsx +26 -0
- package/data/section-templates/image-handling/sub-components/SliderArrow/styles.css +24 -0
- package/data/section-templates/image-handling/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/image-handling/types.ts +11 -0
- package/data/section-templates/image-handling/utils/cx.ts +4 -0
- package/data/section-templates/image-handling/utils/media.ts +36 -0
- package/data/section-templates/login-section/_meta.json +4 -0
- package/data/section-templates/login-section/components/LoginForm/index.tsx +181 -0
- package/data/section-templates/login-section/components/LoginForm/styles.css +0 -0
- package/data/section-templates/login-section/hooks/useRedirectIfLoggedIn.ts +35 -0
- package/data/section-templates/login-section/ikas-config-snippet.json +169 -0
- package/data/section-templates/login-section/index.tsx +37 -0
- package/data/section-templates/login-section/styles.css +129 -0
- package/data/section-templates/login-section/sub-components/Button/index.tsx +52 -0
- package/data/section-templates/login-section/sub-components/Button/styles.css +114 -0
- package/data/section-templates/login-section/sub-components/FormItem/index.tsx +66 -0
- package/data/section-templates/login-section/sub-components/FormItem/styles.css +38 -0
- package/data/section-templates/login-section/sub-components/Input/index.tsx +69 -0
- package/data/section-templates/login-section/sub-components/Input/styles.css +162 -0
- package/data/section-templates/login-section/sub-components/PageLoader/index.tsx +14 -0
- package/data/section-templates/login-section/sub-components/PageLoader/styles.css +12 -0
- package/data/section-templates/login-section/sub-components/SocialLoginButton/index.tsx +24 -0
- package/data/section-templates/login-section/sub-components/SocialLoginButton/styles.css +19 -0
- package/data/section-templates/login-section/sub-components/SpinnerIcon/index.tsx +10 -0
- package/data/section-templates/login-section/sub-components/SpinnerIcon/styles.css +8 -0
- package/data/section-templates/login-section/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/login-section/types.ts +17 -0
- package/data/section-templates/login-section/utils/cx.ts +4 -0
- package/data/section-templates/navigation/_meta.json +4 -0
- package/data/section-templates/navigation/components/CartSidebar/index.tsx +203 -0
- package/data/section-templates/navigation/components/CartSidebar/styles.css +175 -0
- package/data/section-templates/navigation/components/MobileMenu/index.tsx +198 -0
- package/data/section-templates/navigation/components/MobileMenu/styles.css +122 -0
- package/data/section-templates/navigation/components/NavItem/index.tsx +65 -0
- package/data/section-templates/navigation/components/SearchModal/index.tsx +267 -0
- package/data/section-templates/navigation/components/SearchModal/styles.css +182 -0
- package/data/section-templates/navigation/global-types.ts +13 -0
- package/data/section-templates/navigation/hooks/useScrollLock.ts +20 -0
- package/data/section-templates/navigation/ikas-config-snippet.json +315 -0
- package/data/section-templates/navigation/index.tsx +250 -0
- package/data/section-templates/navigation/styles.css +243 -0
- package/data/section-templates/navigation/sub-components/Button/index.tsx +52 -0
- package/data/section-templates/navigation/sub-components/Button/styles.css +114 -0
- package/data/section-templates/navigation/sub-components/CartItem/components/BundleProductItem/index.tsx +59 -0
- package/data/section-templates/navigation/sub-components/CartItem/components/BundleProductItem/styles.css +24 -0
- package/data/section-templates/navigation/sub-components/CartItem/components/BundleProducts/index.tsx +55 -0
- package/data/section-templates/navigation/sub-components/CartItem/components/BundleProducts/styles.css +30 -0
- package/data/section-templates/navigation/sub-components/CartItem/components/ItemOptions/index.tsx +31 -0
- package/data/section-templates/navigation/sub-components/CartItem/components/ItemOptions/styles.css +6 -0
- package/data/section-templates/navigation/sub-components/CartItem/components/OptionValueDisplay/index.tsx +79 -0
- package/data/section-templates/navigation/sub-components/CartItem/components/OptionValueDisplay/styles.css +28 -0
- package/data/section-templates/navigation/sub-components/CartItem/index.tsx +216 -0
- package/data/section-templates/navigation/sub-components/CartItem/styles.css +170 -0
- package/data/section-templates/navigation/sub-components/Input/index.tsx +69 -0
- package/data/section-templates/navigation/sub-components/Input/styles.css +162 -0
- package/data/section-templates/navigation/sub-components/ProductCard/index.tsx +276 -0
- package/data/section-templates/navigation/sub-components/ProductCard/styles.css +99 -0
- package/data/section-templates/navigation/sub-components/QuantitySelector/index.tsx +41 -0
- package/data/section-templates/navigation/sub-components/QuantitySelector/styles.css +51 -0
- package/data/section-templates/navigation/sub-components/SpinnerIcon/index.tsx +10 -0
- package/data/section-templates/navigation/sub-components/SpinnerIcon/styles.css +8 -0
- package/data/section-templates/navigation/sub-components/Tag/index.tsx +21 -0
- package/data/section-templates/navigation/sub-components/Tag/styles.css +30 -0
- package/data/section-templates/navigation/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/navigation/types.ts +36 -0
- package/data/section-templates/navigation/utils/cx.ts +4 -0
- package/data/section-templates/navigation/utils/media.ts +36 -0
- package/data/section-templates/navigation/utils/toast.ts +5 -0
- package/data/section-templates/not-found-section/_meta.json +4 -0
- package/data/section-templates/not-found-section/ikas-config-snippet.json +44 -0
- package/data/section-templates/not-found-section/index.tsx +39 -0
- package/data/section-templates/not-found-section/styles.css +46 -0
- package/data/section-templates/not-found-section/sub-components/Button/index.tsx +52 -0
- package/data/section-templates/not-found-section/sub-components/Button/styles.css +114 -0
- package/data/section-templates/not-found-section/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/not-found-section/types.ts +7 -0
- package/data/section-templates/not-found-section/utils/cx.ts +4 -0
- package/data/section-templates/product-detail-section/_meta.json +4 -0
- package/data/section-templates/product-detail-section/children/ProductDetailAddToCart/components/PayWithIkas/index.tsx +34 -0
- package/data/section-templates/product-detail-section/children/ProductDetailAddToCart/components/PayWithIkas/styles.css +4 -0
- package/data/section-templates/product-detail-section/children/ProductDetailAddToCart/ikas-config-snippet.json +139 -0
- package/data/section-templates/product-detail-section/children/ProductDetailAddToCart/index.tsx +146 -0
- package/data/section-templates/product-detail-section/children/ProductDetailAddToCart/styles.css +27 -0
- package/data/section-templates/product-detail-section/children/ProductDetailAddToCart/types.ts +17 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleFurniture/components/BundleFurnitureRow/index.tsx +164 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleFurniture/components/BundleFurnitureSection/index.tsx +134 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleFurniture/components/BundleFurnitureSection/styles.css +188 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleFurniture/ikas-config-snippet.json +156 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleFurniture/index.tsx +61 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleFurniture/styles.css +12 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleFurniture/types.ts +20 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleProduct/components/BundleProductItem/index.tsx +169 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleProduct/components/BundleProductItem/styles.css +141 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleProduct/components/BundleSkeletonLoading/index.tsx +35 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleProduct/components/BundleSkeletonLoading/styles.css +85 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleProduct/components/FurnitureRow/index.tsx +51 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleProduct/components/FurnitureRow/styles.css +30 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleProduct/components/FurnitureView/index.tsx +54 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleProduct/components/FurnitureView/styles.css +22 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleProduct/ikas-config-snippet.json +130 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleProduct/index.tsx +101 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleProduct/styles.css +20 -0
- package/data/section-templates/product-detail-section/children/ProductDetailBundleProduct/types.ts +17 -0
- package/data/section-templates/product-detail-section/children/ProductDetailDescription/ikas-config-snippet.json +100 -0
- package/data/section-templates/product-detail-section/children/ProductDetailDescription/index.tsx +56 -0
- package/data/section-templates/product-detail-section/children/ProductDetailDescription/styles.css +21 -0
- package/data/section-templates/product-detail-section/children/ProductDetailDescription/types.ts +12 -0
- package/data/section-templates/product-detail-section/children/ProductDetailFeatures/ikas-config-snippet.json +69 -0
- package/data/section-templates/product-detail-section/children/ProductDetailFeatures/index.tsx +40 -0
- package/data/section-templates/product-detail-section/children/ProductDetailFeatures/styles.css +17 -0
- package/data/section-templates/product-detail-section/children/ProductDetailFeatures/types.ts +9 -0
- package/data/section-templates/product-detail-section/children/ProductDetailNameFavorite/ikas-config-snippet.json +72 -0
- package/data/section-templates/product-detail-section/children/ProductDetailNameFavorite/index.tsx +66 -0
- package/data/section-templates/product-detail-section/children/ProductDetailNameFavorite/styles.css +45 -0
- package/data/section-templates/product-detail-section/children/ProductDetailNameFavorite/types.ts +10 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOffer/components/OfferCard/index.tsx +209 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOffer/components/OfferCard/styles.css +146 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOffer/components/OfferSummary/index.tsx +175 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOffer/ikas-config-snippet.json +183 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOffer/index.tsx +199 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOffer/styles.css +211 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOffer/types.ts +23 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionCheckbox/index.tsx +52 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionCheckbox/styles.css +19 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionChoice/components/ChoiceBox/index.tsx +60 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionChoice/components/ChoiceBox/styles.css +38 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSelect/index.tsx +102 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSelect/styles.css +34 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSwatch/index.tsx +121 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionChoice/components/ChoiceSwatch/styles.css +87 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionChoice/index.tsx +57 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionColorPicker/index.tsx +54 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionColorPicker/styles.css +0 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionDatePicker/index.tsx +124 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionDatePicker/styles.css +1 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionFile/index.tsx +217 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionFile/styles.css +87 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionRenderer/index.tsx +133 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionText/index.tsx +60 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionText/styles.css +1 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionTextarea/index.tsx +74 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/components/OptionTextarea/styles.css +10 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/ikas-config-snippet.json +159 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/index.tsx +99 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/styles.css +30 -0
- package/data/section-templates/product-detail-section/children/ProductDetailOptionSet/types.ts +20 -0
- package/data/section-templates/product-detail-section/children/ProductDetailPrices/ikas-config-snippet.json +66 -0
- package/data/section-templates/product-detail-section/children/ProductDetailPrices/index.tsx +62 -0
- package/data/section-templates/product-detail-section/children/ProductDetailPrices/styles.css +32 -0
- package/data/section-templates/product-detail-section/children/ProductDetailPrices/types.ts +9 -0
- package/data/section-templates/product-detail-section/children/ProductDetailProductGroup/ikas-config-snippet.json +66 -0
- package/data/section-templates/product-detail-section/children/ProductDetailProductGroup/index.tsx +74 -0
- package/data/section-templates/product-detail-section/children/ProductDetailProductGroup/styles.css +33 -0
- package/data/section-templates/product-detail-section/children/ProductDetailProductGroup/types.ts +9 -0
- package/data/section-templates/product-detail-section/children/ProductDetailSku/ikas-config-snippet.json +79 -0
- package/data/section-templates/product-detail-section/children/ProductDetailSku/index.tsx +38 -0
- package/data/section-templates/product-detail-section/children/ProductDetailSku/styles.css +16 -0
- package/data/section-templates/product-detail-section/children/ProductDetailSku/types.ts +10 -0
- package/data/section-templates/product-detail-section/children/ProductDetailVariant/ikas-config-snippet.json +73 -0
- package/data/section-templates/product-detail-section/children/ProductDetailVariant/index.tsx +38 -0
- package/data/section-templates/product-detail-section/children/ProductDetailVariant/styles.css +14 -0
- package/data/section-templates/product-detail-section/children/ProductDetailVariant/types.ts +11 -0
- package/data/section-templates/product-detail-section/components/ProductGallery/index.tsx +316 -0
- package/data/section-templates/product-detail-section/components/ProductGallery/styles.css +213 -0
- package/data/section-templates/product-detail-section/global-types.ts +13 -0
- package/data/section-templates/product-detail-section/hooks/useBundleProducts.ts +75 -0
- package/data/section-templates/product-detail-section/hooks/usePayWithIkas.ts +114 -0
- package/data/section-templates/product-detail-section/hooks/useScrollLock.ts +20 -0
- package/data/section-templates/product-detail-section/ikas-config-snippet.json +80 -0
- package/data/section-templates/product-detail-section/index.tsx +92 -0
- package/data/section-templates/product-detail-section/styles.css +58 -0
- package/data/section-templates/product-detail-section/sub-components/Badge/index.tsx +208 -0
- package/data/section-templates/product-detail-section/sub-components/Badge/styles.css +129 -0
- package/data/section-templates/product-detail-section/sub-components/Breadcrumb/index.tsx +57 -0
- package/data/section-templates/product-detail-section/sub-components/Breadcrumb/styles.css +49 -0
- package/data/section-templates/product-detail-section/sub-components/BundleMedia/index.tsx +72 -0
- package/data/section-templates/product-detail-section/sub-components/BundleQuantityBox/index.tsx +73 -0
- package/data/section-templates/product-detail-section/sub-components/BundleQuantityBox/styles.css +43 -0
- package/data/section-templates/product-detail-section/sub-components/Button/index.tsx +52 -0
- package/data/section-templates/product-detail-section/sub-components/Button/styles.css +114 -0
- package/data/section-templates/product-detail-section/sub-components/Checkbox/index.tsx +42 -0
- package/data/section-templates/product-detail-section/sub-components/Checkbox/styles.css +65 -0
- package/data/section-templates/product-detail-section/sub-components/CollapsibleGroup/index.tsx +52 -0
- package/data/section-templates/product-detail-section/sub-components/CollapsibleGroup/styles.css +51 -0
- package/data/section-templates/product-detail-section/sub-components/ColorInput/index.tsx +33 -0
- package/data/section-templates/product-detail-section/sub-components/ColorInput/styles.css +53 -0
- package/data/section-templates/product-detail-section/sub-components/FormItem/index.tsx +66 -0
- package/data/section-templates/product-detail-section/sub-components/FormItem/styles.css +38 -0
- package/data/section-templates/product-detail-section/sub-components/ImagePreviewModal/index.tsx +55 -0
- package/data/section-templates/product-detail-section/sub-components/ImagePreviewModal/styles.css +50 -0
- package/data/section-templates/product-detail-section/sub-components/Input/index.tsx +69 -0
- package/data/section-templates/product-detail-section/sub-components/Input/styles.css +162 -0
- package/data/section-templates/product-detail-section/sub-components/QuantitySelector/index.tsx +41 -0
- package/data/section-templates/product-detail-section/sub-components/QuantitySelector/styles.css +51 -0
- package/data/section-templates/product-detail-section/sub-components/Select/index.tsx +86 -0
- package/data/section-templates/product-detail-section/sub-components/Select/styles.css +110 -0
- package/data/section-templates/product-detail-section/sub-components/SliderArrow/index.tsx +26 -0
- package/data/section-templates/product-detail-section/sub-components/SliderArrow/styles.css +24 -0
- package/data/section-templates/product-detail-section/sub-components/Tag/index.tsx +21 -0
- package/data/section-templates/product-detail-section/sub-components/Tag/styles.css +30 -0
- package/data/section-templates/product-detail-section/sub-components/Textarea/index.tsx +45 -0
- package/data/section-templates/product-detail-section/sub-components/Textarea/styles.css +82 -0
- package/data/section-templates/product-detail-section/sub-components/Toggle/index.tsx +46 -0
- package/data/section-templates/product-detail-section/sub-components/Toggle/styles.css +86 -0
- package/data/section-templates/product-detail-section/sub-components/VariantBadge/index.tsx +153 -0
- package/data/section-templates/product-detail-section/sub-components/VariantBadge/styles.css +47 -0
- package/data/section-templates/product-detail-section/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/product-detail-section/types.ts +11 -0
- package/data/section-templates/product-detail-section/utils/bundle.ts +70 -0
- package/data/section-templates/product-detail-section/utils/cx.ts +4 -0
- package/data/section-templates/product-detail-section/utils/media.ts +36 -0
- package/data/section-templates/product-detail-section/utils/optionPrice.ts +19 -0
- package/data/section-templates/product-detail-section/utils/optionSet.ts +17 -0
- package/data/section-templates/product-detail-section/utils/toast.ts +5 -0
- package/data/section-templates/product-pricing/_meta.json +4 -0
- package/data/section-templates/product-pricing/ikas-config-snippet.json +66 -0
- package/data/section-templates/product-pricing/index.tsx +62 -0
- package/data/section-templates/product-pricing/styles.css +32 -0
- package/data/section-templates/product-pricing/sub-components/Tag/index.tsx +21 -0
- package/data/section-templates/product-pricing/sub-components/Tag/styles.css +30 -0
- package/data/section-templates/product-pricing/types.ts +9 -0
- package/data/section-templates/product-reviews-section/_meta.json +4 -0
- package/data/section-templates/product-reviews-section/hooks/useScrollLock.ts +20 -0
- package/data/section-templates/product-reviews-section/ikas-config-snippet.json +136 -0
- package/data/section-templates/product-reviews-section/index.tsx +205 -0
- package/data/section-templates/product-reviews-section/styles.css +43 -0
- package/data/section-templates/product-reviews-section/sub-components/Button/index.tsx +52 -0
- package/data/section-templates/product-reviews-section/sub-components/Button/styles.css +114 -0
- package/data/section-templates/product-reviews-section/sub-components/FormItem/index.tsx +66 -0
- package/data/section-templates/product-reviews-section/sub-components/FormItem/styles.css +38 -0
- package/data/section-templates/product-reviews-section/sub-components/ImagePreviewModal/index.tsx +55 -0
- package/data/section-templates/product-reviews-section/sub-components/ImagePreviewModal/styles.css +50 -0
- package/data/section-templates/product-reviews-section/sub-components/Input/index.tsx +69 -0
- package/data/section-templates/product-reviews-section/sub-components/Input/styles.css +162 -0
- package/data/section-templates/product-reviews-section/sub-components/Modal/index.tsx +118 -0
- package/data/section-templates/product-reviews-section/sub-components/Modal/styles.css +70 -0
- package/data/section-templates/product-reviews-section/sub-components/PageLoader/index.tsx +14 -0
- package/data/section-templates/product-reviews-section/sub-components/PageLoader/styles.css +12 -0
- package/data/section-templates/product-reviews-section/sub-components/Pagination/index.tsx +107 -0
- package/data/section-templates/product-reviews-section/sub-components/Pagination/styles.css +88 -0
- package/data/section-templates/product-reviews-section/sub-components/ReviewCard/index.tsx +103 -0
- package/data/section-templates/product-reviews-section/sub-components/ReviewCard/styles.css +95 -0
- package/data/section-templates/product-reviews-section/sub-components/ReviewForm/index.tsx +115 -0
- package/data/section-templates/product-reviews-section/sub-components/ReviewForm/styles.css +11 -0
- package/data/section-templates/product-reviews-section/sub-components/ReviewSummary/index.tsx +65 -0
- package/data/section-templates/product-reviews-section/sub-components/ReviewSummary/styles.css +86 -0
- package/data/section-templates/product-reviews-section/sub-components/SpinnerIcon/index.tsx +10 -0
- package/data/section-templates/product-reviews-section/sub-components/SpinnerIcon/styles.css +8 -0
- package/data/section-templates/product-reviews-section/sub-components/StarRating/index.tsx +76 -0
- package/data/section-templates/product-reviews-section/sub-components/StarRating/styles.css +40 -0
- package/data/section-templates/product-reviews-section/sub-components/Textarea/index.tsx +45 -0
- package/data/section-templates/product-reviews-section/sub-components/Textarea/styles.css +82 -0
- package/data/section-templates/product-reviews-section/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/product-reviews-section/types.ts +18 -0
- package/data/section-templates/product-reviews-section/utils/cx.ts +4 -0
- package/data/section-templates/product-reviews-section/utils/fullName.ts +6 -0
- package/data/section-templates/product-reviews-section/utils/pagination.ts +29 -0
- package/data/section-templates/product-reviews-section/utils/toast.ts +5 -0
- package/data/section-templates/product-slider-section/_meta.json +4 -0
- package/data/section-templates/product-slider-section/children/CardProductName/ikas-config-snippet.json +21 -0
- package/data/section-templates/product-slider-section/children/CardProductName/index.tsx +25 -0
- package/data/section-templates/product-slider-section/children/CardProductName/styles.css +22 -0
- package/data/section-templates/product-slider-section/children/CardProductName/types.ts +6 -0
- package/data/section-templates/product-slider-section/children/CardProductPrice/ikas-config-snippet.json +15 -0
- package/data/section-templates/product-slider-section/children/CardProductPrice/index.tsx +30 -0
- package/data/section-templates/product-slider-section/children/CardProductPrice/styles.css +13 -0
- package/data/section-templates/product-slider-section/children/CardProductPrice/types.ts +5 -0
- package/data/section-templates/product-slider-section/children/CardProductVariants/ikas-config-snippet.json +15 -0
- package/data/section-templates/product-slider-section/children/CardProductVariants/index.tsx +10 -0
- package/data/section-templates/product-slider-section/children/CardProductVariants/styles.css +1 -0
- package/data/section-templates/product-slider-section/children/CardProductVariants/types.ts +5 -0
- package/data/section-templates/product-slider-section/global-types.ts +13 -0
- package/data/section-templates/product-slider-section/ikas-config-snippet.json +121 -0
- package/data/section-templates/product-slider-section/index.tsx +151 -0
- package/data/section-templates/product-slider-section/styles.css +105 -0
- package/data/section-templates/product-slider-section/sub-components/Badge/index.tsx +208 -0
- package/data/section-templates/product-slider-section/sub-components/Badge/styles.css +129 -0
- package/data/section-templates/product-slider-section/sub-components/Button/index.tsx +52 -0
- package/data/section-templates/product-slider-section/sub-components/Button/styles.css +114 -0
- package/data/section-templates/product-slider-section/sub-components/ProductCard/index.tsx +276 -0
- package/data/section-templates/product-slider-section/sub-components/ProductCard/styles.css +99 -0
- package/data/section-templates/product-slider-section/sub-components/SliderArrow/index.tsx +26 -0
- package/data/section-templates/product-slider-section/sub-components/SliderArrow/styles.css +24 -0
- package/data/section-templates/product-slider-section/sub-components/SpinnerIcon/index.tsx +10 -0
- package/data/section-templates/product-slider-section/sub-components/SpinnerIcon/styles.css +8 -0
- package/data/section-templates/product-slider-section/sub-components/Tag/index.tsx +21 -0
- package/data/section-templates/product-slider-section/sub-components/Tag/styles.css +30 -0
- package/data/section-templates/product-slider-section/sub-components/VariantBadge/index.tsx +153 -0
- package/data/section-templates/product-slider-section/sub-components/VariantBadge/styles.css +47 -0
- package/data/section-templates/product-slider-section/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/product-slider-section/types.ts +16 -0
- package/data/section-templates/product-slider-section/utils/cx.ts +4 -0
- package/data/section-templates/product-slider-section/utils/media.ts +36 -0
- package/data/section-templates/product-slider-section/utils/toast.ts +5 -0
- package/data/section-templates/recover-password-section/_meta.json +4 -0
- package/data/section-templates/recover-password-section/components/RecoverPasswordForm/index.tsx +133 -0
- package/data/section-templates/recover-password-section/components/RecoverPasswordForm/styles.css +0 -0
- package/data/section-templates/recover-password-section/hooks/useRedirectIfLoggedIn.ts +35 -0
- package/data/section-templates/recover-password-section/ikas-config-snippet.json +111 -0
- package/data/section-templates/recover-password-section/index.tsx +30 -0
- package/data/section-templates/recover-password-section/styles.css +93 -0
- package/data/section-templates/recover-password-section/sub-components/Button/index.tsx +52 -0
- package/data/section-templates/recover-password-section/sub-components/Button/styles.css +114 -0
- package/data/section-templates/recover-password-section/sub-components/FormItem/index.tsx +66 -0
- package/data/section-templates/recover-password-section/sub-components/FormItem/styles.css +38 -0
- package/data/section-templates/recover-password-section/sub-components/Input/index.tsx +69 -0
- package/data/section-templates/recover-password-section/sub-components/Input/styles.css +162 -0
- package/data/section-templates/recover-password-section/sub-components/PageLoader/index.tsx +14 -0
- package/data/section-templates/recover-password-section/sub-components/PageLoader/styles.css +12 -0
- package/data/section-templates/recover-password-section/sub-components/SpinnerIcon/index.tsx +10 -0
- package/data/section-templates/recover-password-section/sub-components/SpinnerIcon/styles.css +8 -0
- package/data/section-templates/recover-password-section/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/recover-password-section/types.ts +12 -0
- package/data/section-templates/recover-password-section/utils/cx.ts +4 -0
- package/data/section-templates/register-section/_meta.json +4 -0
- package/data/section-templates/register-section/components/RegisterForm/index.tsx +326 -0
- package/data/section-templates/register-section/components/RegisterForm/styles.css +0 -0
- package/data/section-templates/register-section/hooks/useRedirectIfLoggedIn.ts +35 -0
- package/data/section-templates/register-section/ikas-config-snippet.json +244 -0
- package/data/section-templates/register-section/index.tsx +30 -0
- package/data/section-templates/register-section/styles.css +152 -0
- package/data/section-templates/register-section/sub-components/Button/index.tsx +52 -0
- package/data/section-templates/register-section/sub-components/Button/styles.css +114 -0
- package/data/section-templates/register-section/sub-components/Checkbox/index.tsx +42 -0
- package/data/section-templates/register-section/sub-components/Checkbox/styles.css +65 -0
- package/data/section-templates/register-section/sub-components/FormItem/index.tsx +66 -0
- package/data/section-templates/register-section/sub-components/FormItem/styles.css +38 -0
- package/data/section-templates/register-section/sub-components/Input/index.tsx +69 -0
- package/data/section-templates/register-section/sub-components/Input/styles.css +162 -0
- package/data/section-templates/register-section/sub-components/PageLoader/index.tsx +14 -0
- package/data/section-templates/register-section/sub-components/PageLoader/styles.css +12 -0
- package/data/section-templates/register-section/sub-components/SocialLoginButton/index.tsx +24 -0
- package/data/section-templates/register-section/sub-components/SocialLoginButton/styles.css +19 -0
- package/data/section-templates/register-section/sub-components/SpinnerIcon/index.tsx +10 -0
- package/data/section-templates/register-section/sub-components/SpinnerIcon/styles.css +8 -0
- package/data/section-templates/register-section/sub-components/icons/index.tsx +981 -0
- package/data/section-templates/register-section/types.ts +26 -0
- package/data/section-templates/register-section/utils/cx.ts +4 -0
- package/data/section-templates/rich-text-section/_meta.json +4 -0
- package/data/section-templates/rich-text-section/ikas-config-snippet.json +22 -0
- package/data/section-templates/rich-text-section/index.tsx +25 -0
- package/data/section-templates/rich-text-section/styles.css +51 -0
- package/data/section-templates/rich-text-section/types.ts +4 -0
- package/data/section-templates/variant-selection/_meta.json +4 -0
- package/data/section-templates/variant-selection/ikas-config-snippet.json +73 -0
- package/data/section-templates/variant-selection/index.tsx +38 -0
- package/data/section-templates/variant-selection/styles.css +14 -0
- package/data/section-templates/variant-selection/sub-components/Badge/index.tsx +208 -0
- package/data/section-templates/variant-selection/sub-components/Badge/styles.css +129 -0
- package/data/section-templates/variant-selection/sub-components/VariantBadge/index.tsx +153 -0
- package/data/section-templates/variant-selection/sub-components/VariantBadge/styles.css +47 -0
- package/data/section-templates/variant-selection/types.ts +11 -0
- package/data/section-templates/variant-selection/utils/cx.ts +4 -0
- package/data/storefront-api.json +2 -2024
- package/data/storefront-types.json +1 -1
- package/dist/index.js +40 -11
- package/dist/index.js.map +1 -1
- package/package.json +5 -3
- package/data/section-templates.json +0 -928
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "{{PROJECT_ID}}-customer-email-verification",
|
|
3
|
+
"name": "CustomerEmailVerification",
|
|
4
|
+
"type": "section",
|
|
5
|
+
"entry": "./src/components/CustomerEmailVerification/index.tsx",
|
|
6
|
+
"styles": "./src/components/CustomerEmailVerification/styles.css",
|
|
7
|
+
"props": [
|
|
8
|
+
{
|
|
9
|
+
"name": "title",
|
|
10
|
+
"displayName": "Başlık",
|
|
11
|
+
"type": "TEXT",
|
|
12
|
+
"required": false,
|
|
13
|
+
"defaultValue": "Hesap Aktivasyonu",
|
|
14
|
+
"groupId": "loading"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "successTitle",
|
|
18
|
+
"displayName": "Başarı Başlığı",
|
|
19
|
+
"type": "TEXT",
|
|
20
|
+
"required": false,
|
|
21
|
+
"defaultValue": "Hesabınız Aktifleştirildi!",
|
|
22
|
+
"groupId": "success"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "successMessage",
|
|
26
|
+
"displayName": "Başarı Mesajı",
|
|
27
|
+
"type": "TEXT",
|
|
28
|
+
"required": false,
|
|
29
|
+
"defaultValue": "Hesabınız başarıyla aktifleştirildi. Giriş yaparak alışverişe başlayabilirsiniz.",
|
|
30
|
+
"groupId": "success"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "errorTitle",
|
|
34
|
+
"displayName": "Hata Başlığı",
|
|
35
|
+
"type": "TEXT",
|
|
36
|
+
"required": false,
|
|
37
|
+
"defaultValue": "Aktivasyon Başarısız",
|
|
38
|
+
"groupId": "error"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "errorMessage",
|
|
42
|
+
"displayName": "Hata Mesajı",
|
|
43
|
+
"type": "TEXT",
|
|
44
|
+
"required": false,
|
|
45
|
+
"defaultValue": "Aktivasyon bağlantınız geçersiz veya süresi dolmuş olabilir.",
|
|
46
|
+
"groupId": "error"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "loadingMessage",
|
|
50
|
+
"displayName": "Yükleniyor Mesajı",
|
|
51
|
+
"type": "TEXT",
|
|
52
|
+
"required": false,
|
|
53
|
+
"defaultValue": "Hesabınız aktifleştiriliyor...",
|
|
54
|
+
"groupId": "loading"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "loginButtonText",
|
|
58
|
+
"displayName": "Giriş Butonu Metni",
|
|
59
|
+
"type": "TEXT",
|
|
60
|
+
"required": false,
|
|
61
|
+
"defaultValue": "Giriş Yap",
|
|
62
|
+
"groupId": "success"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "resendTitle",
|
|
66
|
+
"displayName": "Tekrar Gönder Başlığı",
|
|
67
|
+
"type": "TEXT",
|
|
68
|
+
"required": false,
|
|
69
|
+
"defaultValue": "Aktivasyon Mailini Tekrar Gönder",
|
|
70
|
+
"groupId": "resend"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "emailLabel",
|
|
74
|
+
"displayName": "E-posta Etiketi",
|
|
75
|
+
"type": "TEXT",
|
|
76
|
+
"required": false,
|
|
77
|
+
"defaultValue": "E-posta",
|
|
78
|
+
"groupId": "resend"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "emailPlaceholder",
|
|
82
|
+
"displayName": "E-posta Yer Tutucu",
|
|
83
|
+
"type": "TEXT",
|
|
84
|
+
"required": false,
|
|
85
|
+
"defaultValue": "ornek@email.com",
|
|
86
|
+
"groupId": "resend"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "resendButtonText",
|
|
90
|
+
"displayName": "Tekrar Gönder Butonu Metni",
|
|
91
|
+
"type": "TEXT",
|
|
92
|
+
"required": false,
|
|
93
|
+
"defaultValue": "Tekrar Gönder",
|
|
94
|
+
"groupId": "resend"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "resendingButtonText",
|
|
98
|
+
"displayName": "Gönderiliyor Butonu Metni",
|
|
99
|
+
"type": "TEXT",
|
|
100
|
+
"required": false,
|
|
101
|
+
"defaultValue": "Gönderiliyor...",
|
|
102
|
+
"groupId": "resend"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "resendSuccessMessage",
|
|
106
|
+
"displayName": "Tekrar Gönderim Başarı Mesajı",
|
|
107
|
+
"type": "TEXT",
|
|
108
|
+
"required": false,
|
|
109
|
+
"defaultValue": "Aktivasyon maili tekrar gönderildi. Lütfen gelen kutunuzu kontrol edin.",
|
|
110
|
+
"groupId": "resend"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "resendErrorMessage",
|
|
114
|
+
"displayName": "Tekrar Gönderim Hata Mesajı",
|
|
115
|
+
"type": "TEXT",
|
|
116
|
+
"required": false,
|
|
117
|
+
"defaultValue": "Mail gönderilemedi. Lütfen tekrar deneyin.",
|
|
118
|
+
"groupId": "resend"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"propGroups": [
|
|
122
|
+
{
|
|
123
|
+
"id": "loading",
|
|
124
|
+
"name": "Yükleniyor",
|
|
125
|
+
"description": "E-posta doğrulama işlemi devam ederken gösterilen başlık ve mesaj metinleri"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"id": "success",
|
|
129
|
+
"name": "Başarılı",
|
|
130
|
+
"description": "Doğrulama başarılı olduğunda gösterilen başlık, mesaj ve giriş butonu metinleri"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"id": "error",
|
|
134
|
+
"name": "Hata",
|
|
135
|
+
"description": "Doğrulama başarısız olduğunda gösterilen başlık ve hata mesajı metinleri"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"id": "resend",
|
|
139
|
+
"name": "Tekrar Gönder",
|
|
140
|
+
"description": "Doğrulama e-postasını tekrar göndermek için kullanılan form alanı, buton ve durum mesajı metinleri"
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { useState, useEffect } from "preact/hooks";
|
|
2
|
+
import {
|
|
3
|
+
customerStore,
|
|
4
|
+
activateCustomer,
|
|
5
|
+
resendCustomerActivationMail,
|
|
6
|
+
Router,
|
|
7
|
+
} from "@ikas/bp-storefront";
|
|
8
|
+
|
|
9
|
+
import { Props } from "./types";
|
|
10
|
+
import { cx } from "../../utils/cx";
|
|
11
|
+
import { CheckCircleSVG, XCircleSVG } from "../../sub-components/icons";
|
|
12
|
+
import SpinnerIcon from "../../sub-components/SpinnerIcon";
|
|
13
|
+
import Button from "../../sub-components/Button";
|
|
14
|
+
import FormItem from "../../sub-components/FormItem";
|
|
15
|
+
import Input from "../../sub-components/Input";
|
|
16
|
+
|
|
17
|
+
type Status = "loading" | "success" | "error";
|
|
18
|
+
type ResendStatus = "idle" | "sending" | "success" | "error";
|
|
19
|
+
|
|
20
|
+
export function CustomerEmailVerification({
|
|
21
|
+
title = "E-posta Doğrulama",
|
|
22
|
+
successTitle = "E-posta Doğrulandı",
|
|
23
|
+
successMessage = "E-posta adresiniz başarıyla doğrulandı. Artık giriş yapabilirsiniz.",
|
|
24
|
+
errorTitle = "Doğrulama Başarısız",
|
|
25
|
+
errorMessage = "E-posta doğrulama bağlantısı geçersiz veya süresi dolmuş.",
|
|
26
|
+
loadingMessage = "E-posta adresiniz doğrulanıyor, lütfen bekleyin...",
|
|
27
|
+
loginButtonText = "Giriş Yap",
|
|
28
|
+
resendTitle = "Doğrulama E-postasını Tekrar Gönder",
|
|
29
|
+
emailLabel = "E-posta",
|
|
30
|
+
emailPlaceholder = "ornek@email.com",
|
|
31
|
+
resendButtonText = "Tekrar Gönder",
|
|
32
|
+
resendingButtonText = "Gönderiliyor...",
|
|
33
|
+
resendSuccessMessage = "Doğrulama e-postası başarıyla gönderildi.",
|
|
34
|
+
resendErrorMessage = "E-posta gönderilemedi. Lütfen tekrar deneyin.",
|
|
35
|
+
}: Props) {
|
|
36
|
+
const [status, setStatus] = useState<Status>("loading");
|
|
37
|
+
const [email, setEmail] = useState("");
|
|
38
|
+
const [resendStatus, setResendStatus] = useState<ResendStatus>("idle");
|
|
39
|
+
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
let cancelled = false;
|
|
42
|
+
|
|
43
|
+
activateCustomer(customerStore)
|
|
44
|
+
.then((success) => {
|
|
45
|
+
if (!cancelled) setStatus(success ? "success" : "error");
|
|
46
|
+
})
|
|
47
|
+
.catch(() => {
|
|
48
|
+
if (!cancelled) setStatus("error");
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
return () => {
|
|
52
|
+
cancelled = true;
|
|
53
|
+
};
|
|
54
|
+
}, []);
|
|
55
|
+
|
|
56
|
+
const resending = resendStatus === "sending";
|
|
57
|
+
|
|
58
|
+
const handleResend = async () => {
|
|
59
|
+
const trimmed = email.trim();
|
|
60
|
+
if (!trimmed || resending) return;
|
|
61
|
+
setResendStatus("sending");
|
|
62
|
+
|
|
63
|
+
const success = await resendCustomerActivationMail(customerStore, trimmed);
|
|
64
|
+
setResendStatus(success ? "success" : "error");
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<section className="customer-email-verification">
|
|
69
|
+
<div className="customer-email-verification__wrapper kombos-container">
|
|
70
|
+
<div className="customer-email-verification__container">
|
|
71
|
+
{status === "loading" && (
|
|
72
|
+
<div className="customer-email-verification__state">
|
|
73
|
+
<h1 className="customer-email-verification__title text-xl-medium md:display-xs-medium">
|
|
74
|
+
{title}
|
|
75
|
+
</h1>
|
|
76
|
+
<SpinnerIcon className="customer-email-verification__spinner" />
|
|
77
|
+
<p className="customer-email-verification__state-text text-md-regular">
|
|
78
|
+
{loadingMessage}
|
|
79
|
+
</p>
|
|
80
|
+
</div>
|
|
81
|
+
)}
|
|
82
|
+
|
|
83
|
+
{status === "success" && (
|
|
84
|
+
<div className="customer-email-verification__state">
|
|
85
|
+
<div className="customer-email-verification__icon customer-email-verification__icon--success">
|
|
86
|
+
<CheckCircleSVG />
|
|
87
|
+
</div>
|
|
88
|
+
<h1 className="customer-email-verification__title text-xl-medium md:display-xs-medium">
|
|
89
|
+
{successTitle}
|
|
90
|
+
</h1>
|
|
91
|
+
<p className="customer-email-verification__message text-md-regular">{successMessage}</p>
|
|
92
|
+
<Button
|
|
93
|
+
className="customer-email-verification__action-btn"
|
|
94
|
+
variant="primary"
|
|
95
|
+
size="s"
|
|
96
|
+
onClick={() => Router.navigateToPage("LOGIN")}
|
|
97
|
+
>
|
|
98
|
+
{loginButtonText}
|
|
99
|
+
</Button>
|
|
100
|
+
</div>
|
|
101
|
+
)}
|
|
102
|
+
|
|
103
|
+
{status === "error" && (
|
|
104
|
+
<div className="customer-email-verification__state">
|
|
105
|
+
<div className="customer-email-verification__icon customer-email-verification__icon--error">
|
|
106
|
+
<XCircleSVG />
|
|
107
|
+
</div>
|
|
108
|
+
<h1 className="customer-email-verification__title text-xl-medium md:display-xs-medium">
|
|
109
|
+
{errorTitle}
|
|
110
|
+
</h1>
|
|
111
|
+
<p className="customer-email-verification__message text-md-regular">{errorMessage}</p>
|
|
112
|
+
|
|
113
|
+
<div className="customer-email-verification__resend">
|
|
114
|
+
<h2 className="customer-email-verification__resend-title text-md-semibold md:text-lg-semibold">
|
|
115
|
+
{resendTitle}
|
|
116
|
+
</h2>
|
|
117
|
+
<form
|
|
118
|
+
className="customer-email-verification__resend-form"
|
|
119
|
+
onSubmit={(e) => {
|
|
120
|
+
e.preventDefault();
|
|
121
|
+
handleResend();
|
|
122
|
+
}}
|
|
123
|
+
>
|
|
124
|
+
<FormItem label={emailLabel} htmlFor="customer-email-verification-email">
|
|
125
|
+
<Input
|
|
126
|
+
id="customer-email-verification-email"
|
|
127
|
+
type="email"
|
|
128
|
+
name="email"
|
|
129
|
+
autoComplete="email"
|
|
130
|
+
placeholder={emailPlaceholder}
|
|
131
|
+
value={email}
|
|
132
|
+
onInput={(e) =>
|
|
133
|
+
setEmail((e.target as HTMLInputElement).value)
|
|
134
|
+
}
|
|
135
|
+
/>
|
|
136
|
+
</FormItem>
|
|
137
|
+
<Button
|
|
138
|
+
className="customer-email-verification__resend-btn"
|
|
139
|
+
variant="primary"
|
|
140
|
+
size="s"
|
|
141
|
+
disabled={resending || !email.trim()}
|
|
142
|
+
>
|
|
143
|
+
{resending ? resendingButtonText : resendButtonText}
|
|
144
|
+
</Button>
|
|
145
|
+
</form>
|
|
146
|
+
|
|
147
|
+
{(resendStatus === "success" || resendStatus === "error") && (
|
|
148
|
+
<div
|
|
149
|
+
className={cx(
|
|
150
|
+
"customer-email-verification__banner text-sm-regular",
|
|
151
|
+
`customer-email-verification__banner--${resendStatus}`,
|
|
152
|
+
)}
|
|
153
|
+
>
|
|
154
|
+
{resendStatus === "success"
|
|
155
|
+
? resendSuccessMessage
|
|
156
|
+
: resendErrorMessage}
|
|
157
|
+
</div>
|
|
158
|
+
)}
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
)}
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
</section>
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export default CustomerEmailVerification;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
.customer-email-verification {
|
|
2
|
+
width: 100%;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.customer-email-verification__wrapper {
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
align-items: flex-start;
|
|
9
|
+
padding-top: 1rem;
|
|
10
|
+
padding-bottom: 1rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.customer-email-verification__container {
|
|
14
|
+
width: 100%;
|
|
15
|
+
max-width: 29rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.customer-email-verification__state {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: 1rem;
|
|
23
|
+
text-align: center;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.customer-email-verification__spinner {
|
|
27
|
+
font-size: 2.5rem;
|
|
28
|
+
color: var(--kombos-gray-500);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.customer-email-verification__state-text {
|
|
32
|
+
color: var(--kombos-gray-500);
|
|
33
|
+
margin: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.customer-email-verification__icon {
|
|
37
|
+
font-size: 3rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.customer-email-verification__icon--success {
|
|
41
|
+
color: var(--kombos-success);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.customer-email-verification__icon--error {
|
|
45
|
+
color: var(--kombos-error);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.customer-email-verification__title {
|
|
49
|
+
color: var(--kombos-gray-900);
|
|
50
|
+
margin: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.customer-email-verification__message {
|
|
54
|
+
color: var(--kombos-gray-500);
|
|
55
|
+
margin: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.customer-email-verification__action-btn {
|
|
59
|
+
width: 100%;
|
|
60
|
+
margin-top: 0.5rem;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.customer-email-verification__resend {
|
|
64
|
+
width: 100%;
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
gap: 1rem;
|
|
68
|
+
margin-top: 1rem;
|
|
69
|
+
padding-top: 1.5rem;
|
|
70
|
+
border-top: 1px solid var(--kombos-gray-200);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.customer-email-verification__resend-title {
|
|
74
|
+
color: var(--kombos-gray-900);
|
|
75
|
+
margin: 0;
|
|
76
|
+
text-align: left;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.customer-email-verification__resend-form {
|
|
80
|
+
display: flex;
|
|
81
|
+
flex-direction: column;
|
|
82
|
+
gap: 1rem;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.customer-email-verification__resend-btn {
|
|
86
|
+
width: 100%;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.customer-email-verification__banner {
|
|
90
|
+
padding: 0.75rem 1rem;
|
|
91
|
+
border-radius: 6px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.customer-email-verification__banner--success {
|
|
95
|
+
background: rgba(18, 183, 106, 0.08);
|
|
96
|
+
border: 1px solid var(--kombos-success);
|
|
97
|
+
color: var(--kombos-success);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.customer-email-verification__banner--error {
|
|
101
|
+
background: rgba(255, 60, 72, 0.08);
|
|
102
|
+
border: 1px solid var(--kombos-error);
|
|
103
|
+
color: var(--kombos-error);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@media (min-width: 768px) {
|
|
107
|
+
.customer-email-verification__wrapper {
|
|
108
|
+
padding-top: 1.5rem;
|
|
109
|
+
padding-bottom: 1.5rem;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@media (min-width: 1024px) {
|
|
114
|
+
.customer-email-verification__wrapper {
|
|
115
|
+
padding-top: 2rem;
|
|
116
|
+
padding-bottom: 2rem;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ComponentChildren } from "preact";
|
|
2
|
+
import { SpinnerSVG } from "../icons";
|
|
3
|
+
import { cx } from "../../utils/cx";
|
|
4
|
+
|
|
5
|
+
type Variant = "primary" | "secondary" | "dangerous";
|
|
6
|
+
type Size = "xs" | "s" | "m";
|
|
7
|
+
|
|
8
|
+
export interface ButtonProps extends Omit<
|
|
9
|
+
ButtonHTMLAttributes<HTMLButtonElement>,
|
|
10
|
+
"size" | "icon" | "loading"
|
|
11
|
+
> {
|
|
12
|
+
variant?: Variant;
|
|
13
|
+
size?: Size;
|
|
14
|
+
icon?: ComponentChildren;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const TYPOGRAPHY: Record<Size, string> = {
|
|
19
|
+
xs: "text-sm-semibold",
|
|
20
|
+
s: "text-md-semibold",
|
|
21
|
+
m: "text-lg-semibold",
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default function Button({
|
|
25
|
+
variant = "primary",
|
|
26
|
+
size = "s",
|
|
27
|
+
icon,
|
|
28
|
+
loading,
|
|
29
|
+
className,
|
|
30
|
+
children,
|
|
31
|
+
disabled,
|
|
32
|
+
...rest
|
|
33
|
+
}: ButtonProps) {
|
|
34
|
+
const cls = cx(
|
|
35
|
+
"kombos-btn",
|
|
36
|
+
`kombos-btn--${variant}`,
|
|
37
|
+
`kombos-btn--${size}`,
|
|
38
|
+
TYPOGRAPHY[size],
|
|
39
|
+
className,
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<button className={cls} disabled={loading || disabled} {...rest}>
|
|
44
|
+
{loading ? (
|
|
45
|
+
<SpinnerSVG className="kombos-btn__spinner" />
|
|
46
|
+
) : (
|
|
47
|
+
icon && <span className="kombos-btn__icon">{icon}</span>
|
|
48
|
+
)}
|
|
49
|
+
{children}
|
|
50
|
+
</button>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/* ===== Button ===== */
|
|
2
|
+
|
|
3
|
+
/* --- Base --- */
|
|
4
|
+
.kombos-btn {
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
border: 1px solid transparent;
|
|
9
|
+
border-radius: 6px;
|
|
10
|
+
gap: 0.5rem;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.kombos-btn:disabled {
|
|
16
|
+
cursor: not-allowed;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* --- Spinner --- */
|
|
20
|
+
.kombos-btn__spinner {
|
|
21
|
+
animation: kombos-spin 1s linear infinite;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@keyframes kombos-spin {
|
|
25
|
+
from { transform: rotate(0deg); }
|
|
26
|
+
to { transform: rotate(360deg); }
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* --- Icon --- */
|
|
30
|
+
.kombos-btn__icon {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
flex-shrink: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.kombos-btn--xs .kombos-btn__icon {
|
|
37
|
+
font-size: 1rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.kombos-btn--s .kombos-btn__icon {
|
|
41
|
+
font-size: 1.25rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.kombos-btn--m .kombos-btn__icon {
|
|
45
|
+
font-size: 1.5rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* --- Sizes --- */
|
|
49
|
+
.kombos-btn--xs {
|
|
50
|
+
padding: 0.4375rem 0.9375rem;
|
|
51
|
+
min-height: 2.25rem;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.kombos-btn--s {
|
|
55
|
+
padding: 0.5625rem 1.1875rem;
|
|
56
|
+
min-height: 2.75rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.kombos-btn--m {
|
|
60
|
+
padding: 0.6875rem 1.4375rem;
|
|
61
|
+
min-height: 3.375rem;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* --- Primary --- */
|
|
65
|
+
.kombos-btn--primary {
|
|
66
|
+
background-color: var(--kombos-gray-900);
|
|
67
|
+
border-color: var(--kombos-gray-900);
|
|
68
|
+
color: var(--kombos-white);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.kombos-btn--primary:hover:not(:disabled) {
|
|
72
|
+
opacity: 0.85;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.kombos-btn--primary:disabled {
|
|
76
|
+
background-color: var(--kombos-gray-300);
|
|
77
|
+
border-color: var(--kombos-gray-300);
|
|
78
|
+
color: var(--kombos-gray-50);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* --- Secondary --- */
|
|
82
|
+
.kombos-btn--secondary {
|
|
83
|
+
background-color: var(--kombos-white);
|
|
84
|
+
border-color: var(--kombos-gray-200);
|
|
85
|
+
color: var(--kombos-gray-900);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.kombos-btn--secondary:hover:not(:disabled) {
|
|
89
|
+
border-color: var(--kombos-gray-300);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.kombos-btn--secondary:disabled {
|
|
93
|
+
background-color: var(--kombos-gray-50);
|
|
94
|
+
border-color: var(--kombos-gray-200);
|
|
95
|
+
color: var(--kombos-gray-300);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* --- Dangerous --- */
|
|
99
|
+
.kombos-btn--dangerous {
|
|
100
|
+
background-color: var(--kombos-error);
|
|
101
|
+
border-color: var(--kombos-error);
|
|
102
|
+
color: var(--kombos-white);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.kombos-btn--dangerous:hover:not(:disabled) {
|
|
106
|
+
background-color: var(--kombos-error-hover);
|
|
107
|
+
border-color: var(--kombos-error-hover);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.kombos-btn--dangerous:disabled {
|
|
111
|
+
background-color: var(--kombos-gray-300);
|
|
112
|
+
border-color: var(--kombos-gray-300);
|
|
113
|
+
color: var(--kombos-gray-50);
|
|
114
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { ComponentChildren } from "preact";
|
|
2
|
+
import { useId } from "preact/hooks";
|
|
3
|
+
import { cx } from "../../utils/cx";
|
|
4
|
+
import { cloneElement, isValidElement } from "preact";
|
|
5
|
+
|
|
6
|
+
type FormItemStatus = "default" | "error" | "success";
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
label?: ComponentChildren;
|
|
10
|
+
description?: ComponentChildren;
|
|
11
|
+
status?: FormItemStatus;
|
|
12
|
+
helper?: ComponentChildren;
|
|
13
|
+
children: ComponentChildren;
|
|
14
|
+
className?: string;
|
|
15
|
+
htmlFor?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default function FormItem({
|
|
19
|
+
label,
|
|
20
|
+
description,
|
|
21
|
+
status = "default",
|
|
22
|
+
helper,
|
|
23
|
+
children,
|
|
24
|
+
className,
|
|
25
|
+
htmlFor,
|
|
26
|
+
}: Props) {
|
|
27
|
+
const autoId = useId();
|
|
28
|
+
const helperId = helper ? `${autoId}-helper` : undefined;
|
|
29
|
+
|
|
30
|
+
const enhancedChildren =
|
|
31
|
+
helperId && isValidElement(children)
|
|
32
|
+
? cloneElement(children, { "aria-describedby": helperId })
|
|
33
|
+
: children;
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<div
|
|
37
|
+
className={cx("kombos-form-item", className)}
|
|
38
|
+
data-state={status !== "default" ? status : undefined}
|
|
39
|
+
>
|
|
40
|
+
{label &&
|
|
41
|
+
(htmlFor ? (
|
|
42
|
+
<label
|
|
43
|
+
htmlFor={htmlFor}
|
|
44
|
+
className="kombos-form-item__label text-xs-medium"
|
|
45
|
+
>
|
|
46
|
+
{label}
|
|
47
|
+
</label>
|
|
48
|
+
) : (
|
|
49
|
+
<span className="kombos-form-item__label text-xs-medium">
|
|
50
|
+
{label}
|
|
51
|
+
</span>
|
|
52
|
+
))}
|
|
53
|
+
{description && (
|
|
54
|
+
<span className="kombos-form-item__description text-xs-regular">
|
|
55
|
+
{description}
|
|
56
|
+
</span>
|
|
57
|
+
)}
|
|
58
|
+
{enhancedChildren}
|
|
59
|
+
{helper && (
|
|
60
|
+
<span id={helperId} className="kombos-form-item__helper text-xs-regular">
|
|
61
|
+
{helper}
|
|
62
|
+
</span>
|
|
63
|
+
)}
|
|
64
|
+
</div>
|
|
65
|
+
);
|
|
66
|
+
}
|