@seekora-ai/ui-sdk-react 1.0.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/dist/components/Breadcrumb.d.ts +43 -0
- package/dist/components/Breadcrumb.d.ts.map +1 -0
- package/dist/components/Breadcrumb.js +119 -0
- package/dist/components/ClearRefinements.d.ts +42 -0
- package/dist/components/ClearRefinements.d.ts.map +1 -0
- package/dist/components/ClearRefinements.js +80 -0
- package/dist/components/CurrentRefinements.d.ts +41 -0
- package/dist/components/CurrentRefinements.d.ts.map +1 -0
- package/dist/components/CurrentRefinements.js +83 -0
- package/dist/components/Facets.d.ts +53 -0
- package/dist/components/Facets.d.ts.map +1 -0
- package/dist/components/Facets.js +195 -0
- package/dist/components/FederatedDropdown.d.ts +92 -0
- package/dist/components/FederatedDropdown.d.ts.map +1 -0
- package/dist/components/FederatedDropdown.js +510 -0
- package/dist/components/HierarchicalMenu.d.ts +55 -0
- package/dist/components/HierarchicalMenu.d.ts.map +1 -0
- package/dist/components/HierarchicalMenu.js +168 -0
- package/dist/components/Highlight.d.ts +51 -0
- package/dist/components/Highlight.d.ts.map +1 -0
- package/dist/components/Highlight.js +155 -0
- package/dist/components/HitsPerPage.d.ts +41 -0
- package/dist/components/HitsPerPage.d.ts.map +1 -0
- package/dist/components/HitsPerPage.js +72 -0
- package/dist/components/InfiniteHits.d.ts +56 -0
- package/dist/components/InfiniteHits.d.ts.map +1 -0
- package/dist/components/InfiniteHits.js +181 -0
- package/dist/components/MobileFilters.d.ts +71 -0
- package/dist/components/MobileFilters.d.ts.map +1 -0
- package/dist/components/MobileFilters.js +242 -0
- package/dist/components/Pagination.d.ts +44 -0
- package/dist/components/Pagination.d.ts.map +1 -0
- package/dist/components/Pagination.js +142 -0
- package/dist/components/QuerySuggestions.d.ts +38 -0
- package/dist/components/QuerySuggestions.d.ts.map +1 -0
- package/dist/components/QuerySuggestions.js +86 -0
- package/dist/components/QuerySuggestionsDropdown.d.ts +86 -0
- package/dist/components/QuerySuggestionsDropdown.d.ts.map +1 -0
- package/dist/components/QuerySuggestionsDropdown.js +395 -0
- package/dist/components/RangeInput.d.ts +58 -0
- package/dist/components/RangeInput.d.ts.map +1 -0
- package/dist/components/RangeInput.js +203 -0
- package/dist/components/RangeSlider.d.ts +51 -0
- package/dist/components/RangeSlider.d.ts.map +1 -0
- package/dist/components/RangeSlider.js +193 -0
- package/dist/components/Recommendations.d.ts +90 -0
- package/dist/components/Recommendations.d.ts.map +1 -0
- package/dist/components/Recommendations.js +270 -0
- package/dist/components/RichQuerySuggestions.d.ts +77 -0
- package/dist/components/RichQuerySuggestions.d.ts.map +1 -0
- package/dist/components/RichQuerySuggestions.js +492 -0
- package/dist/components/SearchBar.d.ts +40 -0
- package/dist/components/SearchBar.d.ts.map +1 -0
- package/dist/components/SearchBar.js +217 -0
- package/dist/components/SearchBarWithSuggestions.d.ts +99 -0
- package/dist/components/SearchBarWithSuggestions.d.ts.map +1 -0
- package/dist/components/SearchBarWithSuggestions.js +275 -0
- package/dist/components/SearchLayout.d.ts +35 -0
- package/dist/components/SearchLayout.d.ts.map +1 -0
- package/dist/components/SearchLayout.js +56 -0
- package/dist/components/SearchProvider.d.ts +28 -0
- package/dist/components/SearchProvider.d.ts.map +1 -0
- package/dist/components/SearchProvider.js +43 -0
- package/dist/components/SearchResults.d.ts +51 -0
- package/dist/components/SearchResults.d.ts.map +1 -0
- package/dist/components/SearchResults.js +485 -0
- package/dist/components/SortBy.d.ts +44 -0
- package/dist/components/SortBy.d.ts.map +1 -0
- package/dist/components/SortBy.js +61 -0
- package/dist/components/Stats.d.ts +37 -0
- package/dist/components/Stats.d.ts.map +1 -0
- package/dist/components/Stats.js +52 -0
- package/dist/components/suggestions/AmazonDropdown.d.ts +30 -0
- package/dist/components/suggestions/AmazonDropdown.d.ts.map +1 -0
- package/dist/components/suggestions/AmazonDropdown.js +529 -0
- package/dist/components/suggestions/GoogleDropdown.d.ts +31 -0
- package/dist/components/suggestions/GoogleDropdown.d.ts.map +1 -0
- package/dist/components/suggestions/GoogleDropdown.js +370 -0
- package/dist/components/suggestions/MinimalDropdown.d.ts +24 -0
- package/dist/components/suggestions/MinimalDropdown.d.ts.map +1 -0
- package/dist/components/suggestions/MinimalDropdown.js +314 -0
- package/dist/components/suggestions/MobileSheetDropdown.d.ts +31 -0
- package/dist/components/suggestions/MobileSheetDropdown.d.ts.map +1 -0
- package/dist/components/suggestions/MobileSheetDropdown.js +485 -0
- package/dist/components/suggestions/PinterestDropdown.d.ts +29 -0
- package/dist/components/suggestions/PinterestDropdown.d.ts.map +1 -0
- package/dist/components/suggestions/PinterestDropdown.js +450 -0
- package/dist/components/suggestions/ShopifyDropdown.d.ts +27 -0
- package/dist/components/suggestions/ShopifyDropdown.d.ts.map +1 -0
- package/dist/components/suggestions/ShopifyDropdown.js +451 -0
- package/dist/components/suggestions/SpotlightDropdown.d.ts +33 -0
- package/dist/components/suggestions/SpotlightDropdown.d.ts.map +1 -0
- package/dist/components/suggestions/SpotlightDropdown.js +547 -0
- package/dist/components/suggestions/SuggestionSearchBar.d.ts +123 -0
- package/dist/components/suggestions/SuggestionSearchBar.d.ts.map +1 -0
- package/dist/components/suggestions/SuggestionSearchBar.js +652 -0
- package/dist/components/suggestions/index.d.ts +37 -0
- package/dist/components/suggestions/index.d.ts.map +1 -0
- package/dist/components/suggestions/index.js +59 -0
- package/dist/components/suggestions/styles/index.d.ts +11 -0
- package/dist/components/suggestions/styles/index.d.ts.map +1 -0
- package/dist/components/suggestions/styles/index.js +289 -0
- package/dist/components/suggestions/styles/responsive.d.ts +107 -0
- package/dist/components/suggestions/styles/responsive.d.ts.map +1 -0
- package/dist/components/suggestions/styles/responsive.js +237 -0
- package/dist/components/suggestions/types.d.ts +489 -0
- package/dist/components/suggestions/types.d.ts.map +1 -0
- package/dist/components/suggestions/types.js +6 -0
- package/dist/components/suggestions/utils.d.ts +213 -0
- package/dist/components/suggestions/utils.d.ts.map +1 -0
- package/dist/components/suggestions/utils.js +514 -0
- package/dist/hooks/useAnalytics.d.ts +20 -0
- package/dist/hooks/useAnalytics.d.ts.map +1 -0
- package/dist/hooks/useAnalytics.js +62 -0
- package/dist/hooks/useNaturalLanguageFilters.d.ts +48 -0
- package/dist/hooks/useNaturalLanguageFilters.d.ts.map +1 -0
- package/dist/hooks/useNaturalLanguageFilters.js +221 -0
- package/dist/hooks/useQuerySuggestions.d.ts +21 -0
- package/dist/hooks/useQuerySuggestions.d.ts.map +1 -0
- package/dist/hooks/useQuerySuggestions.js +68 -0
- package/dist/hooks/useQuerySuggestionsEnhanced.d.ts +114 -0
- package/dist/hooks/useQuerySuggestionsEnhanced.d.ts.map +1 -0
- package/dist/hooks/useQuerySuggestionsEnhanced.js +376 -0
- package/dist/hooks/useSearchState.d.ts +35 -0
- package/dist/hooks/useSearchState.d.ts.map +1 -0
- package/dist/hooks/useSearchState.js +68 -0
- package/dist/hooks/useSeekoraSearch.d.ts +20 -0
- package/dist/hooks/useSeekoraSearch.d.ts.map +1 -0
- package/dist/hooks/useSeekoraSearch.js +63 -0
- package/dist/hooks/useSmartSuggestions.d.ts +55 -0
- package/dist/hooks/useSmartSuggestions.d.ts.map +1 -0
- package/dist/hooks/useSmartSuggestions.js +236 -0
- package/dist/hooks/useSuggestionsAnalytics.d.ts +91 -0
- package/dist/hooks/useSuggestionsAnalytics.d.ts.map +1 -0
- package/dist/hooks/useSuggestionsAnalytics.js +226 -0
- package/dist/index.d.ts +80 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +86 -0
- package/dist/index.umd.js +1 -0
- package/dist/src/index.d.ts +2849 -0
- package/dist/src/index.esm.js +11679 -0
- package/dist/src/index.esm.js.map +1 -0
- package/dist/src/index.js +11761 -0
- package/dist/src/index.js.map +1 -0
- package/dist/themes/createTheme.d.ts +8 -0
- package/dist/themes/createTheme.d.ts.map +1 -0
- package/dist/themes/createTheme.js +10 -0
- package/dist/themes/dark.d.ts +6 -0
- package/dist/themes/dark.d.ts.map +1 -0
- package/dist/themes/dark.js +34 -0
- package/dist/themes/default.d.ts +6 -0
- package/dist/themes/default.d.ts.map +1 -0
- package/dist/themes/default.js +71 -0
- package/dist/themes/mergeThemes.d.ts +7 -0
- package/dist/themes/mergeThemes.d.ts.map +1 -0
- package/dist/themes/mergeThemes.js +6 -0
- package/dist/themes/minimal.d.ts +6 -0
- package/dist/themes/minimal.d.ts.map +1 -0
- package/dist/themes/minimal.js +34 -0
- package/dist/themes/suggestions.d.ts +216 -0
- package/dist/themes/suggestions.d.ts.map +1 -0
- package/dist/themes/suggestions.js +546 -0
- package/dist/themes/types.d.ts +7 -0
- package/dist/themes/types.d.ts.map +1 -0
- package/dist/themes/types.js +6 -0
- package/dist/types/index.d.ts +33 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +4 -0
- package/package.json +65 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Query Suggestions Components
|
|
3
|
+
*
|
|
4
|
+
* Premium, configurable, data-agnostic dropdown components
|
|
5
|
+
* for search suggestions UI
|
|
6
|
+
*/
|
|
7
|
+
export { SuggestionSearchBar, default as SuggestionSearch } from './SuggestionSearchBar';
|
|
8
|
+
export type { SuggestionSearchBarProps, SuggestionSearchBarRef } from './SuggestionSearchBar';
|
|
9
|
+
export * from './types';
|
|
10
|
+
export * from './utils';
|
|
11
|
+
export { useResponsive, breakpoints, mediaQueries, touchTargets, responsiveSpacing, responsiveTypography, injectResponsiveStyles, type ResponsiveState, } from './styles/responsive';
|
|
12
|
+
export { globalResponsiveCSS, injectGlobalResponsiveStyles, useInjectResponsiveStyles, } from './styles';
|
|
13
|
+
export { AmazonDropdown } from './AmazonDropdown';
|
|
14
|
+
export type { AmazonDropdownProps } from './AmazonDropdown';
|
|
15
|
+
export { GoogleDropdown } from './GoogleDropdown';
|
|
16
|
+
export type { GoogleDropdownProps } from './GoogleDropdown';
|
|
17
|
+
export { PinterestDropdown } from './PinterestDropdown';
|
|
18
|
+
export type { PinterestDropdownProps } from './PinterestDropdown';
|
|
19
|
+
export { SpotlightDropdown } from './SpotlightDropdown';
|
|
20
|
+
export type { SpotlightDropdownProps } from './SpotlightDropdown';
|
|
21
|
+
export { ShopifyDropdown } from './ShopifyDropdown';
|
|
22
|
+
export type { ShopifyDropdownProps } from './ShopifyDropdown';
|
|
23
|
+
export { MobileSheetDropdown } from './MobileSheetDropdown';
|
|
24
|
+
export type { MobileSheetDropdownProps } from './MobileSheetDropdown';
|
|
25
|
+
export { MinimalDropdown } from './MinimalDropdown';
|
|
26
|
+
export type { MinimalDropdownProps } from './MinimalDropdown';
|
|
27
|
+
export declare const SuggestionDropdownVariants: {
|
|
28
|
+
readonly amazon: import("react").ForwardRefExoticComponent<import("./AmazonDropdown").AmazonDropdownProps & import("react").RefAttributes<import("./types").DropdownRef>>;
|
|
29
|
+
readonly google: import("react").ForwardRefExoticComponent<import("./GoogleDropdown").GoogleDropdownProps & import("react").RefAttributes<import("./types").DropdownRef>>;
|
|
30
|
+
readonly pinterest: import("react").ForwardRefExoticComponent<import("./PinterestDropdown").PinterestDropdownProps & import("react").RefAttributes<import("./types").DropdownRef>>;
|
|
31
|
+
readonly spotlight: import("react").ForwardRefExoticComponent<import("./SpotlightDropdown").SpotlightDropdownProps & import("react").RefAttributes<import("./types").DropdownRef>>;
|
|
32
|
+
readonly shopify: import("react").ForwardRefExoticComponent<import("./ShopifyDropdown").ShopifyDropdownProps & import("react").RefAttributes<import("./types").DropdownRef>>;
|
|
33
|
+
readonly 'mobile-sheet': import("react").ForwardRefExoticComponent<import("./MobileSheetDropdown").MobileSheetDropdownProps & import("react").RefAttributes<import("./types").DropdownRef>>;
|
|
34
|
+
readonly minimal: import("react").ForwardRefExoticComponent<import("./MinimalDropdown").MinimalDropdownProps & import("react").RefAttributes<import("./types").DropdownRef>>;
|
|
35
|
+
};
|
|
36
|
+
export type SuggestionDropdownVariant = keyof typeof SuggestionDropdownVariants;
|
|
37
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/suggestions/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,mBAAmB,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzF,YAAY,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAK9F,cAAc,SAAS,CAAC;AAKxB,cAAc,SAAS,CAAC;AAKxB,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,eAAe,GACrB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,mBAAmB,EACnB,4BAA4B,EAC5B,yBAAyB,GAC1B,MAAM,UAAU,CAAC;AAOlB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAGtE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAa9D,eAAO,MAAM,0BAA0B;;;;;;;;CAQ7B,CAAC;AAEX,MAAM,MAAM,yBAAyB,GAAG,MAAM,OAAO,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Query Suggestions Components
|
|
3
|
+
*
|
|
4
|
+
* Premium, configurable, data-agnostic dropdown components
|
|
5
|
+
* for search suggestions UI
|
|
6
|
+
*/
|
|
7
|
+
// ============================================================================
|
|
8
|
+
// Main Component (Easy Integration - Handles Everything)
|
|
9
|
+
// ============================================================================
|
|
10
|
+
export { SuggestionSearchBar, default as SuggestionSearch } from './SuggestionSearchBar';
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// Types
|
|
13
|
+
// ============================================================================
|
|
14
|
+
export * from './types';
|
|
15
|
+
// ============================================================================
|
|
16
|
+
// Utilities
|
|
17
|
+
// ============================================================================
|
|
18
|
+
export * from './utils';
|
|
19
|
+
// ============================================================================
|
|
20
|
+
// Responsive Utilities & Styles
|
|
21
|
+
// ============================================================================
|
|
22
|
+
export { useResponsive, breakpoints, mediaQueries, touchTargets, responsiveSpacing, responsiveTypography, injectResponsiveStyles, } from './styles/responsive';
|
|
23
|
+
export { globalResponsiveCSS, injectGlobalResponsiveStyles, useInjectResponsiveStyles, } from './styles';
|
|
24
|
+
// ============================================================================
|
|
25
|
+
// Components
|
|
26
|
+
// ============================================================================
|
|
27
|
+
// Amazon-style dropdown with department scoping
|
|
28
|
+
export { AmazonDropdown } from './AmazonDropdown';
|
|
29
|
+
// Google-style clean search suggestions
|
|
30
|
+
export { GoogleDropdown } from './GoogleDropdown';
|
|
31
|
+
// Pinterest-style visual discovery
|
|
32
|
+
export { PinterestDropdown } from './PinterestDropdown';
|
|
33
|
+
// macOS Spotlight / Command palette style
|
|
34
|
+
export { SpotlightDropdown } from './SpotlightDropdown';
|
|
35
|
+
// Shopify-style modern e-commerce
|
|
36
|
+
export { ShopifyDropdown } from './ShopifyDropdown';
|
|
37
|
+
// Mobile-first bottom sheet
|
|
38
|
+
export { MobileSheetDropdown } from './MobileSheetDropdown';
|
|
39
|
+
// Minimal/editorial style
|
|
40
|
+
export { MinimalDropdown } from './MinimalDropdown';
|
|
41
|
+
// ============================================================================
|
|
42
|
+
// Variant Map for easy access
|
|
43
|
+
// ============================================================================
|
|
44
|
+
import { AmazonDropdown } from './AmazonDropdown';
|
|
45
|
+
import { GoogleDropdown } from './GoogleDropdown';
|
|
46
|
+
import { PinterestDropdown } from './PinterestDropdown';
|
|
47
|
+
import { SpotlightDropdown } from './SpotlightDropdown';
|
|
48
|
+
import { ShopifyDropdown } from './ShopifyDropdown';
|
|
49
|
+
import { MobileSheetDropdown } from './MobileSheetDropdown';
|
|
50
|
+
import { MinimalDropdown } from './MinimalDropdown';
|
|
51
|
+
export const SuggestionDropdownVariants = {
|
|
52
|
+
amazon: AmazonDropdown,
|
|
53
|
+
google: GoogleDropdown,
|
|
54
|
+
pinterest: PinterestDropdown,
|
|
55
|
+
spotlight: SpotlightDropdown,
|
|
56
|
+
shopify: ShopifyDropdown,
|
|
57
|
+
'mobile-sheet': MobileSheetDropdown,
|
|
58
|
+
minimal: MinimalDropdown,
|
|
59
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Styles Index
|
|
3
|
+
*/
|
|
4
|
+
export * from './responsive';
|
|
5
|
+
export declare const globalResponsiveCSS = "\n/* ============================================\n SEEKORA DROPDOWN - RESPONSIVE STYLES\n ============================================ */\n\n/* CSS Variables for responsiveness */\n:root {\n --seekora-touch-target-min: 44px;\n --seekora-touch-target-comfortable: 48px;\n --seekora-mobile-padding: 16px;\n --seekora-desktop-padding: 20px;\n}\n\n/* Base responsive rules for all dropdowns */\n[class*=\"seekora-\"][class*=\"-dropdown\"] {\n box-sizing: border-box;\n}\n\n[class*=\"seekora-\"][class*=\"-dropdown\"] * {\n box-sizing: border-box;\n}\n\n/* ============================================\n MOBILE STYLES (< 768px)\n ============================================ */\n@media (max-width: 767px) {\n /* Full-width dropdowns on mobile */\n [class*=\"seekora-\"][class*=\"-dropdown\"]:not(.seekora-mobile-sheet):not(.seekora-spotlight-dropdown) {\n width: 100% !important;\n max-width: 100vw !important;\n left: 0 !important;\n right: 0 !important;\n border-radius: 0 !important;\n margin: 0 !important;\n }\n\n /* Touch-friendly item sizes */\n [class*=\"seekora-\"][class*=\"-dropdown\"] [role=\"option\"],\n [class*=\"seekora-\"][class*=\"-dropdown\"] [data-item],\n [class*=\"seekora-\"][class*=\"-dropdown\"] .suggestion-item,\n [class*=\"seekora-\"][class*=\"-dropdown\"] .product-card {\n min-height: var(--seekora-touch-target-min);\n }\n\n /* Larger padding on mobile */\n [class*=\"seekora-\"][class*=\"-dropdown\"] [role=\"option\"],\n [class*=\"seekora-\"][class*=\"-dropdown\"] [data-item] {\n padding: 14px var(--seekora-mobile-padding) !important;\n }\n\n /* Larger fonts on mobile for readability */\n [class*=\"seekora-\"][class*=\"-dropdown\"] {\n font-size: 16px !important;\n }\n\n /* Stack columns on mobile */\n [class*=\"seekora-\"][class*=\"-dropdown\"] .dropdown-content,\n [class*=\"seekora-\"][class*=\"-dropdown\"] [style*=\"display: flex\"][style*=\"flex-direction\"] {\n flex-direction: column !important;\n }\n\n /* Full-width columns on mobile */\n [class*=\"seekora-\"][class*=\"-dropdown\"] [style*=\"width: 40%\"],\n [class*=\"seekora-\"][class*=\"-dropdown\"] [style*=\"width: 45%\"],\n [class*=\"seekora-\"][class*=\"-dropdown\"] [style*=\"width: 50%\"],\n [class*=\"seekora-\"][class*=\"-dropdown\"] [style*=\"width: 55%\"],\n [class*=\"seekora-\"][class*=\"-dropdown\"] [style*=\"width: 60%\"] {\n width: 100% !important;\n flex: none !important;\n }\n\n /* Product grid adjustments */\n [class*=\"seekora-\"][class*=\"-dropdown\"] .products-grid,\n [class*=\"seekora-\"][class*=\"-dropdown\"] [style*=\"grid-template-columns\"] {\n grid-template-columns: repeat(2, 1fr) !important;\n gap: 12px !important;\n }\n\n /* Horizontal scroll for products on mobile */\n [class*=\"seekora-\"][class*=\"-dropdown\"] .products-scroll {\n display: flex !important;\n overflow-x: auto !important;\n scroll-snap-type: x mandatory !important;\n -webkit-overflow-scrolling: touch !important;\n padding-bottom: 8px !important;\n }\n\n [class*=\"seekora-\"][class*=\"-dropdown\"] .products-scroll > * {\n scroll-snap-align: start !important;\n flex-shrink: 0 !important;\n }\n\n /* Hide keyboard hints on mobile */\n [class*=\"seekora-\"][class*=\"-dropdown\"] .keyboard-hint,\n [class*=\"seekora-\"][class*=\"-dropdown\"] [class*=\"keyboard\"],\n [class*=\"seekora-\"][class*=\"-dropdown\"] kbd,\n [class*=\"seekora-\"][class*=\"-dropdown\"] .kbd {\n display: none !important;\n }\n\n /* Safe area padding for notched devices */\n [class*=\"seekora-\"][class*=\"-dropdown\"] [style*=\"padding-bottom\"] {\n padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px) !important;\n }\n}\n\n/* ============================================\n TOUCH DEVICE STYLES\n ============================================ */\n@media (hover: none) and (pointer: coarse) {\n /* Active state instead of hover for touch */\n [class*=\"seekora-\"][class*=\"-dropdown\"] [role=\"option\"]:active,\n [class*=\"seekora-\"][class*=\"-dropdown\"] [data-item]:active,\n [class*=\"seekora-\"][class*=\"-dropdown\"] button:active {\n background-color: var(--seekora-bg-hover, rgba(0,0,0,0.05)) !important;\n transform: scale(0.98);\n }\n\n /* Disable hover effects on touch */\n [class*=\"seekora-\"][class*=\"-dropdown\"] [role=\"option\"]:hover,\n [class*=\"seekora-\"][class*=\"-dropdown\"] [data-item]:hover {\n background-color: transparent;\n }\n\n /* Larger touch targets */\n [class*=\"seekora-\"][class*=\"-dropdown\"] button,\n [class*=\"seekora-\"][class*=\"-dropdown\"] [role=\"button\"] {\n min-height: var(--seekora-touch-target-min);\n min-width: var(--seekora-touch-target-min);\n }\n\n /* No text selection on touch */\n [class*=\"seekora-\"][class*=\"-dropdown\"] {\n -webkit-user-select: none;\n user-select: none;\n }\n}\n\n/* ============================================\n TABLET STYLES (768px - 1023px)\n ============================================ */\n@media (min-width: 768px) and (max-width: 1023px) {\n [class*=\"seekora-\"][class*=\"-dropdown\"]:not(.seekora-mobile-sheet) {\n max-width: 90vw !important;\n margin-left: auto !important;\n margin-right: auto !important;\n }\n\n /* 3-column product grid on tablet */\n [class*=\"seekora-\"][class*=\"-dropdown\"] .products-grid {\n grid-template-columns: repeat(3, 1fr) !important;\n }\n}\n\n/* ============================================\n DESKTOP STYLES (>= 1024px)\n ============================================ */\n@media (min-width: 1024px) {\n [class*=\"seekora-\"][class*=\"-dropdown\"] [role=\"option\"],\n [class*=\"seekora-\"][class*=\"-dropdown\"] [data-item] {\n min-height: 40px;\n }\n\n /* Hover effects only on desktop */\n [class*=\"seekora-\"][class*=\"-dropdown\"] [role=\"option\"]:hover,\n [class*=\"seekora-\"][class*=\"-dropdown\"] [data-item]:hover {\n background-color: var(--seekora-bg-hover, rgba(0,0,0,0.04));\n }\n}\n\n/* ============================================\n ANIMATION & TRANSITIONS\n ============================================ */\n@keyframes seekora-dropdown-enter {\n from {\n opacity: 0;\n transform: translateY(-8px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes seekora-dropdown-enter-mobile {\n from {\n opacity: 0;\n transform: translateY(100%);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes seekora-spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n[class*=\"seekora-\"][class*=\"-dropdown\"].entering {\n animation: seekora-dropdown-enter 200ms ease-out;\n}\n\n@media (max-width: 767px) {\n [class*=\"seekora-\"][class*=\"-dropdown\"].entering {\n animation: seekora-dropdown-enter-mobile 300ms ease-out;\n }\n}\n\n/* ============================================\n ACCESSIBILITY\n ============================================ */\n@media (prefers-reduced-motion: reduce) {\n [class*=\"seekora-\"][class*=\"-dropdown\"],\n [class*=\"seekora-\"][class*=\"-dropdown\"] * {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n }\n}\n\n/* Focus visible styles */\n[class*=\"seekora-\"][class*=\"-dropdown\"] [role=\"option\"]:focus-visible,\n[class*=\"seekora-\"][class*=\"-dropdown\"] button:focus-visible {\n outline: 2px solid var(--seekora-primary, #007aff);\n outline-offset: -2px;\n}\n\n/* High contrast mode */\n@media (prefers-contrast: high) {\n [class*=\"seekora-\"][class*=\"-dropdown\"] {\n border: 2px solid currentColor !important;\n }\n\n [class*=\"seekora-\"][class*=\"-dropdown\"] [role=\"option\"][aria-selected=\"true\"] {\n outline: 2px solid currentColor;\n }\n}\n\n/* Dark mode adjustments */\n@media (prefers-color-scheme: dark) {\n [class*=\"seekora-\"][class*=\"-dropdown\"] {\n --seekora-bg-surface: #1c1c1e;\n --seekora-bg-secondary: #2c2c2e;\n --seekora-bg-hover: #3a3a3c;\n --seekora-text-primary: #ffffff;\n --seekora-text-secondary: #8e8e93;\n --seekora-border-color: #38383a;\n }\n}\n";
|
|
6
|
+
export declare const injectGlobalResponsiveStyles: () => void;
|
|
7
|
+
/**
|
|
8
|
+
* Hook to auto-inject styles on mount
|
|
9
|
+
*/
|
|
10
|
+
export declare const useInjectResponsiveStyles: () => void;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/suggestions/styles/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,cAAc,cAAc,CAAC;AAM7B,eAAO,MAAM,mBAAmB,m/PA4P/B,CAAC;AAOF,eAAO,MAAM,4BAA4B,QAAO,IAe/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,QAAO,IAI5C,CAAC"}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Styles Index
|
|
3
|
+
*/
|
|
4
|
+
import { useEffect } from 'react';
|
|
5
|
+
export * from './responsive';
|
|
6
|
+
// ============================================================================
|
|
7
|
+
// Global Responsive CSS for all Dropdown Variants
|
|
8
|
+
// ============================================================================
|
|
9
|
+
export const globalResponsiveCSS = `
|
|
10
|
+
/* ============================================
|
|
11
|
+
SEEKORA DROPDOWN - RESPONSIVE STYLES
|
|
12
|
+
============================================ */
|
|
13
|
+
|
|
14
|
+
/* CSS Variables for responsiveness */
|
|
15
|
+
:root {
|
|
16
|
+
--seekora-touch-target-min: 44px;
|
|
17
|
+
--seekora-touch-target-comfortable: 48px;
|
|
18
|
+
--seekora-mobile-padding: 16px;
|
|
19
|
+
--seekora-desktop-padding: 20px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Base responsive rules for all dropdowns */
|
|
23
|
+
[class*="seekora-"][class*="-dropdown"] {
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
[class*="seekora-"][class*="-dropdown"] * {
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* ============================================
|
|
32
|
+
MOBILE STYLES (< 768px)
|
|
33
|
+
============================================ */
|
|
34
|
+
@media (max-width: 767px) {
|
|
35
|
+
/* Full-width dropdowns on mobile */
|
|
36
|
+
[class*="seekora-"][class*="-dropdown"]:not(.seekora-mobile-sheet):not(.seekora-spotlight-dropdown) {
|
|
37
|
+
width: 100% !important;
|
|
38
|
+
max-width: 100vw !important;
|
|
39
|
+
left: 0 !important;
|
|
40
|
+
right: 0 !important;
|
|
41
|
+
border-radius: 0 !important;
|
|
42
|
+
margin: 0 !important;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Touch-friendly item sizes */
|
|
46
|
+
[class*="seekora-"][class*="-dropdown"] [role="option"],
|
|
47
|
+
[class*="seekora-"][class*="-dropdown"] [data-item],
|
|
48
|
+
[class*="seekora-"][class*="-dropdown"] .suggestion-item,
|
|
49
|
+
[class*="seekora-"][class*="-dropdown"] .product-card {
|
|
50
|
+
min-height: var(--seekora-touch-target-min);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Larger padding on mobile */
|
|
54
|
+
[class*="seekora-"][class*="-dropdown"] [role="option"],
|
|
55
|
+
[class*="seekora-"][class*="-dropdown"] [data-item] {
|
|
56
|
+
padding: 14px var(--seekora-mobile-padding) !important;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Larger fonts on mobile for readability */
|
|
60
|
+
[class*="seekora-"][class*="-dropdown"] {
|
|
61
|
+
font-size: 16px !important;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Stack columns on mobile */
|
|
65
|
+
[class*="seekora-"][class*="-dropdown"] .dropdown-content,
|
|
66
|
+
[class*="seekora-"][class*="-dropdown"] [style*="display: flex"][style*="flex-direction"] {
|
|
67
|
+
flex-direction: column !important;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Full-width columns on mobile */
|
|
71
|
+
[class*="seekora-"][class*="-dropdown"] [style*="width: 40%"],
|
|
72
|
+
[class*="seekora-"][class*="-dropdown"] [style*="width: 45%"],
|
|
73
|
+
[class*="seekora-"][class*="-dropdown"] [style*="width: 50%"],
|
|
74
|
+
[class*="seekora-"][class*="-dropdown"] [style*="width: 55%"],
|
|
75
|
+
[class*="seekora-"][class*="-dropdown"] [style*="width: 60%"] {
|
|
76
|
+
width: 100% !important;
|
|
77
|
+
flex: none !important;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Product grid adjustments */
|
|
81
|
+
[class*="seekora-"][class*="-dropdown"] .products-grid,
|
|
82
|
+
[class*="seekora-"][class*="-dropdown"] [style*="grid-template-columns"] {
|
|
83
|
+
grid-template-columns: repeat(2, 1fr) !important;
|
|
84
|
+
gap: 12px !important;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Horizontal scroll for products on mobile */
|
|
88
|
+
[class*="seekora-"][class*="-dropdown"] .products-scroll {
|
|
89
|
+
display: flex !important;
|
|
90
|
+
overflow-x: auto !important;
|
|
91
|
+
scroll-snap-type: x mandatory !important;
|
|
92
|
+
-webkit-overflow-scrolling: touch !important;
|
|
93
|
+
padding-bottom: 8px !important;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[class*="seekora-"][class*="-dropdown"] .products-scroll > * {
|
|
97
|
+
scroll-snap-align: start !important;
|
|
98
|
+
flex-shrink: 0 !important;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Hide keyboard hints on mobile */
|
|
102
|
+
[class*="seekora-"][class*="-dropdown"] .keyboard-hint,
|
|
103
|
+
[class*="seekora-"][class*="-dropdown"] [class*="keyboard"],
|
|
104
|
+
[class*="seekora-"][class*="-dropdown"] kbd,
|
|
105
|
+
[class*="seekora-"][class*="-dropdown"] .kbd {
|
|
106
|
+
display: none !important;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Safe area padding for notched devices */
|
|
110
|
+
[class*="seekora-"][class*="-dropdown"] [style*="padding-bottom"] {
|
|
111
|
+
padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px) !important;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* ============================================
|
|
116
|
+
TOUCH DEVICE STYLES
|
|
117
|
+
============================================ */
|
|
118
|
+
@media (hover: none) and (pointer: coarse) {
|
|
119
|
+
/* Active state instead of hover for touch */
|
|
120
|
+
[class*="seekora-"][class*="-dropdown"] [role="option"]:active,
|
|
121
|
+
[class*="seekora-"][class*="-dropdown"] [data-item]:active,
|
|
122
|
+
[class*="seekora-"][class*="-dropdown"] button:active {
|
|
123
|
+
background-color: var(--seekora-bg-hover, rgba(0,0,0,0.05)) !important;
|
|
124
|
+
transform: scale(0.98);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* Disable hover effects on touch */
|
|
128
|
+
[class*="seekora-"][class*="-dropdown"] [role="option"]:hover,
|
|
129
|
+
[class*="seekora-"][class*="-dropdown"] [data-item]:hover {
|
|
130
|
+
background-color: transparent;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* Larger touch targets */
|
|
134
|
+
[class*="seekora-"][class*="-dropdown"] button,
|
|
135
|
+
[class*="seekora-"][class*="-dropdown"] [role="button"] {
|
|
136
|
+
min-height: var(--seekora-touch-target-min);
|
|
137
|
+
min-width: var(--seekora-touch-target-min);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* No text selection on touch */
|
|
141
|
+
[class*="seekora-"][class*="-dropdown"] {
|
|
142
|
+
-webkit-user-select: none;
|
|
143
|
+
user-select: none;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* ============================================
|
|
148
|
+
TABLET STYLES (768px - 1023px)
|
|
149
|
+
============================================ */
|
|
150
|
+
@media (min-width: 768px) and (max-width: 1023px) {
|
|
151
|
+
[class*="seekora-"][class*="-dropdown"]:not(.seekora-mobile-sheet) {
|
|
152
|
+
max-width: 90vw !important;
|
|
153
|
+
margin-left: auto !important;
|
|
154
|
+
margin-right: auto !important;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* 3-column product grid on tablet */
|
|
158
|
+
[class*="seekora-"][class*="-dropdown"] .products-grid {
|
|
159
|
+
grid-template-columns: repeat(3, 1fr) !important;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* ============================================
|
|
164
|
+
DESKTOP STYLES (>= 1024px)
|
|
165
|
+
============================================ */
|
|
166
|
+
@media (min-width: 1024px) {
|
|
167
|
+
[class*="seekora-"][class*="-dropdown"] [role="option"],
|
|
168
|
+
[class*="seekora-"][class*="-dropdown"] [data-item] {
|
|
169
|
+
min-height: 40px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* Hover effects only on desktop */
|
|
173
|
+
[class*="seekora-"][class*="-dropdown"] [role="option"]:hover,
|
|
174
|
+
[class*="seekora-"][class*="-dropdown"] [data-item]:hover {
|
|
175
|
+
background-color: var(--seekora-bg-hover, rgba(0,0,0,0.04));
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/* ============================================
|
|
180
|
+
ANIMATION & TRANSITIONS
|
|
181
|
+
============================================ */
|
|
182
|
+
@keyframes seekora-dropdown-enter {
|
|
183
|
+
from {
|
|
184
|
+
opacity: 0;
|
|
185
|
+
transform: translateY(-8px);
|
|
186
|
+
}
|
|
187
|
+
to {
|
|
188
|
+
opacity: 1;
|
|
189
|
+
transform: translateY(0);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
@keyframes seekora-dropdown-enter-mobile {
|
|
194
|
+
from {
|
|
195
|
+
opacity: 0;
|
|
196
|
+
transform: translateY(100%);
|
|
197
|
+
}
|
|
198
|
+
to {
|
|
199
|
+
opacity: 1;
|
|
200
|
+
transform: translateY(0);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@keyframes seekora-spin {
|
|
205
|
+
to {
|
|
206
|
+
transform: rotate(360deg);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
[class*="seekora-"][class*="-dropdown"].entering {
|
|
211
|
+
animation: seekora-dropdown-enter 200ms ease-out;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@media (max-width: 767px) {
|
|
215
|
+
[class*="seekora-"][class*="-dropdown"].entering {
|
|
216
|
+
animation: seekora-dropdown-enter-mobile 300ms ease-out;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/* ============================================
|
|
221
|
+
ACCESSIBILITY
|
|
222
|
+
============================================ */
|
|
223
|
+
@media (prefers-reduced-motion: reduce) {
|
|
224
|
+
[class*="seekora-"][class*="-dropdown"],
|
|
225
|
+
[class*="seekora-"][class*="-dropdown"] * {
|
|
226
|
+
animation-duration: 0.01ms !important;
|
|
227
|
+
animation-iteration-count: 1 !important;
|
|
228
|
+
transition-duration: 0.01ms !important;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/* Focus visible styles */
|
|
233
|
+
[class*="seekora-"][class*="-dropdown"] [role="option"]:focus-visible,
|
|
234
|
+
[class*="seekora-"][class*="-dropdown"] button:focus-visible {
|
|
235
|
+
outline: 2px solid var(--seekora-primary, #007aff);
|
|
236
|
+
outline-offset: -2px;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* High contrast mode */
|
|
240
|
+
@media (prefers-contrast: high) {
|
|
241
|
+
[class*="seekora-"][class*="-dropdown"] {
|
|
242
|
+
border: 2px solid currentColor !important;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
[class*="seekora-"][class*="-dropdown"] [role="option"][aria-selected="true"] {
|
|
246
|
+
outline: 2px solid currentColor;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/* Dark mode adjustments */
|
|
251
|
+
@media (prefers-color-scheme: dark) {
|
|
252
|
+
[class*="seekora-"][class*="-dropdown"] {
|
|
253
|
+
--seekora-bg-surface: #1c1c1e;
|
|
254
|
+
--seekora-bg-secondary: #2c2c2e;
|
|
255
|
+
--seekora-bg-hover: #3a3a3c;
|
|
256
|
+
--seekora-text-primary: #ffffff;
|
|
257
|
+
--seekora-text-secondary: #8e8e93;
|
|
258
|
+
--seekora-border-color: #38383a;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
`;
|
|
262
|
+
/**
|
|
263
|
+
* Inject global responsive styles
|
|
264
|
+
*/
|
|
265
|
+
let stylesInjected = false;
|
|
266
|
+
export const injectGlobalResponsiveStyles = () => {
|
|
267
|
+
if (stylesInjected)
|
|
268
|
+
return;
|
|
269
|
+
if (typeof document === 'undefined')
|
|
270
|
+
return;
|
|
271
|
+
const styleId = 'seekora-dropdown-responsive-global';
|
|
272
|
+
if (document.getElementById(styleId)) {
|
|
273
|
+
stylesInjected = true;
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
const style = document.createElement('style');
|
|
277
|
+
style.id = styleId;
|
|
278
|
+
style.textContent = globalResponsiveCSS;
|
|
279
|
+
document.head.appendChild(style);
|
|
280
|
+
stylesInjected = true;
|
|
281
|
+
};
|
|
282
|
+
/**
|
|
283
|
+
* Hook to auto-inject styles on mount
|
|
284
|
+
*/
|
|
285
|
+
export const useInjectResponsiveStyles = () => {
|
|
286
|
+
useEffect(() => {
|
|
287
|
+
injectGlobalResponsiveStyles();
|
|
288
|
+
}, []);
|
|
289
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Responsive Utilities and Breakpoints
|
|
3
|
+
*
|
|
4
|
+
* Shared responsive design utilities for all dropdown components
|
|
5
|
+
*/
|
|
6
|
+
import type { CSSProperties } from 'react';
|
|
7
|
+
export declare const breakpoints: {
|
|
8
|
+
readonly xs: 0;
|
|
9
|
+
readonly sm: 480;
|
|
10
|
+
readonly md: 768;
|
|
11
|
+
readonly lg: 1024;
|
|
12
|
+
readonly xl: 1280;
|
|
13
|
+
};
|
|
14
|
+
export type Breakpoint = keyof typeof breakpoints;
|
|
15
|
+
export declare const mediaQueries: {
|
|
16
|
+
readonly xs: `@media (max-width: ${number}px)`;
|
|
17
|
+
readonly sm: `@media (min-width: 480px) and (max-width: ${number}px)`;
|
|
18
|
+
readonly md: `@media (min-width: 768px) and (max-width: ${number}px)`;
|
|
19
|
+
readonly lg: `@media (min-width: 1024px) and (max-width: ${number}px)`;
|
|
20
|
+
readonly xl: "@media (min-width: 1280px)";
|
|
21
|
+
readonly mobile: `@media (max-width: ${number}px)`;
|
|
22
|
+
readonly tablet: `@media (min-width: 768px) and (max-width: ${number}px)`;
|
|
23
|
+
readonly desktop: "@media (min-width: 1024px)";
|
|
24
|
+
readonly touch: "@media (hover: none) and (pointer: coarse)";
|
|
25
|
+
readonly mouse: "@media (hover: hover) and (pointer: fine)";
|
|
26
|
+
};
|
|
27
|
+
export declare const touchTargets: {
|
|
28
|
+
/** Minimum touch target size per WCAG guidelines */
|
|
29
|
+
readonly minimum: 44;
|
|
30
|
+
/** Comfortable touch target size */
|
|
31
|
+
readonly comfortable: 48;
|
|
32
|
+
/** Large touch target for primary actions */
|
|
33
|
+
readonly large: 56;
|
|
34
|
+
};
|
|
35
|
+
export declare const responsiveSpacing: {
|
|
36
|
+
readonly mobile: {
|
|
37
|
+
readonly xs: "4px";
|
|
38
|
+
readonly sm: "8px";
|
|
39
|
+
readonly md: "12px";
|
|
40
|
+
readonly lg: "16px";
|
|
41
|
+
readonly xl: "20px";
|
|
42
|
+
};
|
|
43
|
+
readonly desktop: {
|
|
44
|
+
readonly xs: "4px";
|
|
45
|
+
readonly sm: "8px";
|
|
46
|
+
readonly md: "16px";
|
|
47
|
+
readonly lg: "24px";
|
|
48
|
+
readonly xl: "32px";
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export declare const responsiveTypography: {
|
|
52
|
+
readonly mobile: {
|
|
53
|
+
readonly xs: "11px";
|
|
54
|
+
readonly sm: "13px";
|
|
55
|
+
readonly md: "15px";
|
|
56
|
+
readonly lg: "17px";
|
|
57
|
+
readonly xl: "20px";
|
|
58
|
+
readonly xxl: "24px";
|
|
59
|
+
};
|
|
60
|
+
readonly desktop: {
|
|
61
|
+
readonly xs: "11px";
|
|
62
|
+
readonly sm: "12px";
|
|
63
|
+
readonly md: "14px";
|
|
64
|
+
readonly lg: "16px";
|
|
65
|
+
readonly xl: "18px";
|
|
66
|
+
readonly xxl: "24px";
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Generate responsive CSS class string
|
|
71
|
+
*/
|
|
72
|
+
export declare const generateResponsiveCSS: (componentName: string) => string;
|
|
73
|
+
/**
|
|
74
|
+
* Inject responsive styles into document
|
|
75
|
+
*/
|
|
76
|
+
export declare const injectResponsiveStyles: (componentName: string) => void;
|
|
77
|
+
export interface ResponsiveState {
|
|
78
|
+
isMobile: boolean;
|
|
79
|
+
isTablet: boolean;
|
|
80
|
+
isDesktop: boolean;
|
|
81
|
+
isTouch: boolean;
|
|
82
|
+
width: number;
|
|
83
|
+
height: number;
|
|
84
|
+
breakpoint: Breakpoint;
|
|
85
|
+
}
|
|
86
|
+
export declare const useResponsive: () => ResponsiveState;
|
|
87
|
+
export interface ResponsiveStyles {
|
|
88
|
+
base: CSSProperties;
|
|
89
|
+
mobile?: CSSProperties;
|
|
90
|
+
tablet?: CSSProperties;
|
|
91
|
+
desktop?: CSSProperties;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Get styles for current breakpoint
|
|
95
|
+
*/
|
|
96
|
+
export declare const getResponsiveStyle: (styles: ResponsiveStyles, responsive: ResponsiveState) => CSSProperties;
|
|
97
|
+
export declare const safeAreaInsets: {
|
|
98
|
+
readonly top: "env(safe-area-inset-top, 0px)";
|
|
99
|
+
readonly bottom: "env(safe-area-inset-bottom, 0px)";
|
|
100
|
+
readonly left: "env(safe-area-inset-left, 0px)";
|
|
101
|
+
readonly right: "env(safe-area-inset-right, 0px)";
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Get padding with safe area insets
|
|
105
|
+
*/
|
|
106
|
+
export declare const getSafeAreaPadding: (position: "top" | "bottom" | "left" | "right", additionalPadding?: string) => string;
|
|
107
|
+
//# sourceMappingURL=responsive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responsive.d.ts","sourceRoot":"","sources":["../../../../src/components/suggestions/styles/responsive.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAM3C,eAAO,MAAM,WAAW;;;;;;CAMd,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,WAAW,CAAC;AAMlD,eAAO,MAAM,YAAY;;;;;;;;;;;CAWf,CAAC;AAMX,eAAO,MAAM,YAAY;IACvB,oDAAoD;;IAEpD,oCAAoC;;IAEpC,6CAA6C;;CAErC,CAAC;AAMX,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;CAepB,CAAC;AAMX,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;CAiBvB,CAAC;AAMX;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,eAAe,MAAM,KAAG,MA4D7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,eAAe,MAAM,KAAG,IAc9D,CAAC;AAMF,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,eAAO,MAAM,aAAa,QAAO,eA6ChC,CAAC;AAMF,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,gBAAgB,EACxB,YAAY,eAAe,KAC1B,aASF,CAAC;AAMF,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAC7B,UAAU,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,EAC7C,oBAAmB,MAAc,KAChC,MAEF,CAAC"}
|