mautourco-components 0.2.55 → 0.2.56
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/atoms/Icon/icons/MapIcon.js +1 -1
- package/dist/components/molecules/LocationDropdown/LocationDropdown.js +39 -6
- package/dist/components/molecules/ServiceSelector/ServiceSelector.js +3 -3
- package/dist/styles/components/molecule/location-dropdown.css +100 -0
- package/dist/styles/components/molecule/service-selector.css +33 -12
- package/package.json +1 -1
- package/src/components/atoms/Icon/icons/MapIcon.tsx +1 -1
- package/src/components/molecules/LocationDropdown/LocationDropdown.tsx +59 -9
- package/src/components/molecules/ServiceSelector/ServiceSelector.tsx +3 -3
- package/src/styles/components/molecule/location-dropdown.css +37 -1
- package/src/styles/components/molecule/service-selector.css +33 -12
|
@@ -20,6 +20,6 @@ var MapIcon = function (_a) {
|
|
|
20
20
|
var sizeClasses = getSizeClasses();
|
|
21
21
|
var colorClass = color ? "text-".concat(color) : 'text-current';
|
|
22
22
|
var classes = "".concat(sizeClasses, " ").concat(colorClass, " ").concat(className);
|
|
23
|
-
return (_jsxs("svg", { className: classes, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("g", { clipPath: "url(#clip0_7033_40039)", children: _jsx("path", { d: "M11.2483 5.33398C11.2483 4.47217 10.9064 3.6456 10.2971 3.03613C9.6876 2.42664 8.86022 2.08398 7.99827 2.08398C7.13645 2.08408 6.30982 2.42673 5.70042 3.03613C5.09104 3.64561 4.74827 4.47212 4.74827 5.33398C4.74827 6.29385 5.27536 7.37034 6.01975 8.38379C6.70202 9.31263 7.49819 10.0927 7.99827 10.5488C8.49845 10.0929 9.29531 9.31298 9.97776 8.38379C10.722 7.37039 11.2483 6.2939 11.2483 5.33398ZM2.11545 13.917H13.8821L12.6047 10.084H10.5403C9.9137 10.8175 9.29437 11.4056 8.90354 11.7559C8.88906 11.7688 8.87406 11.7812 8.85862 11.793C8.61164 11.9816 8.30904 12.084 7.99827 12.084C7.68762 12.0839 7.38578 11.9815 7.13889 11.793C7.12325 11.781 7.10764 11.769 7.09299 11.7559C6.70253 11.4056 6.08382 10.8175 5.45725 10.084H3.39573L2.11545 13.917ZM8.58225 5.33398C8.58225 5.01182 8.32043 4.75098 7.99827 4.75098C7.67627 4.75117 7.41526 5.01194 7.41526 5.33398C7.41526 5.65603 7.67627 5.91679 7.99827 5.91699C8.32043 5.91699 8.58225 5.65615 8.58225 5.33398ZM10.0823 5.33398C10.0823 6.48458 9.14886 7.41699 7.99827 7.41699C6.84784 7.41679 5.91526 6.48446 5.91526 5.33398C5.91526 4.18351 6.84784 3.25117 7.99827 3.25098C9.14886 3.25098 10.0823 4.18339 10.0823 5.33398ZM12.7395 5.60547C12.6711 6.66975 12.2087 7.6965 11.6506 8.58398H12.6643C12.9246 8.58392 13.1794 8.65556 13.4006 8.79004L13.4934 8.85156L13.5803 8.91992C13.7498 9.06348 13.8835 9.24462 13.9699 9.44922L14.009 9.55273L15.342 13.5527C15.4129 13.7655 15.4324 13.9922 15.3987 14.2139C15.3648 14.4357 15.2788 14.6471 15.1477 14.8291C15.0166 15.011 14.8442 15.1594 14.6448 15.2617C14.4451 15.364 14.2236 15.4168 13.9992 15.417H1.99827C1.77384 15.4169 1.5525 15.3641 1.35276 15.2617C1.15295 15.1593 0.980017 15.0103 0.848853 14.8281C0.717783 14.646 0.631562 14.4348 0.597876 14.2129C0.564278 13.9911 0.584401 13.7645 0.655493 13.5518L1.99143 9.55176L2.03049 9.44727C2.1314 9.20941 2.29628 9.00342 2.50706 8.85156L2.59983 8.79004C2.82065 8.65595 3.07444 8.58412 3.3342 8.58398H4.34592C3.78785 7.6966 3.32547 6.66961 3.25706 5.60547L3.24827 5.33398C3.24827 4.07429 3.74919 2.86637 4.63987 1.97559C5.53058 1.08487 6.73862 0.584082 7.99827 0.583984C9.25805 0.583984 10.4668 1.08479 11.3576 1.97559C12.2483 2.86635 12.7483 4.07435 12.7483 5.33398L12.7395 5.60547Z", fill: "
|
|
23
|
+
return (_jsxs("svg", { className: classes, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("g", { clipPath: "url(#clip0_7033_40039)", children: _jsx("path", { d: "M11.2483 5.33398C11.2483 4.47217 10.9064 3.6456 10.2971 3.03613C9.6876 2.42664 8.86022 2.08398 7.99827 2.08398C7.13645 2.08408 6.30982 2.42673 5.70042 3.03613C5.09104 3.64561 4.74827 4.47212 4.74827 5.33398C4.74827 6.29385 5.27536 7.37034 6.01975 8.38379C6.70202 9.31263 7.49819 10.0927 7.99827 10.5488C8.49845 10.0929 9.29531 9.31298 9.97776 8.38379C10.722 7.37039 11.2483 6.2939 11.2483 5.33398ZM2.11545 13.917H13.8821L12.6047 10.084H10.5403C9.9137 10.8175 9.29437 11.4056 8.90354 11.7559C8.88906 11.7688 8.87406 11.7812 8.85862 11.793C8.61164 11.9816 8.30904 12.084 7.99827 12.084C7.68762 12.0839 7.38578 11.9815 7.13889 11.793C7.12325 11.781 7.10764 11.769 7.09299 11.7559C6.70253 11.4056 6.08382 10.8175 5.45725 10.084H3.39573L2.11545 13.917ZM8.58225 5.33398C8.58225 5.01182 8.32043 4.75098 7.99827 4.75098C7.67627 4.75117 7.41526 5.01194 7.41526 5.33398C7.41526 5.65603 7.67627 5.91679 7.99827 5.91699C8.32043 5.91699 8.58225 5.65615 8.58225 5.33398ZM10.0823 5.33398C10.0823 6.48458 9.14886 7.41699 7.99827 7.41699C6.84784 7.41679 5.91526 6.48446 5.91526 5.33398C5.91526 4.18351 6.84784 3.25117 7.99827 3.25098C9.14886 3.25098 10.0823 4.18339 10.0823 5.33398ZM12.7395 5.60547C12.6711 6.66975 12.2087 7.6965 11.6506 8.58398H12.6643C12.9246 8.58392 13.1794 8.65556 13.4006 8.79004L13.4934 8.85156L13.5803 8.91992C13.7498 9.06348 13.8835 9.24462 13.9699 9.44922L14.009 9.55273L15.342 13.5527C15.4129 13.7655 15.4324 13.9922 15.3987 14.2139C15.3648 14.4357 15.2788 14.6471 15.1477 14.8291C15.0166 15.011 14.8442 15.1594 14.6448 15.2617C14.4451 15.364 14.2236 15.4168 13.9992 15.417H1.99827C1.77384 15.4169 1.5525 15.3641 1.35276 15.2617C1.15295 15.1593 0.980017 15.0103 0.848853 14.8281C0.717783 14.646 0.631562 14.4348 0.597876 14.2129C0.564278 13.9911 0.584401 13.7645 0.655493 13.5518L1.99143 9.55176L2.03049 9.44727C2.1314 9.20941 2.29628 9.00342 2.50706 8.85156L2.59983 8.79004C2.82065 8.65595 3.07444 8.58412 3.3342 8.58398H4.34592C3.78785 7.6966 3.32547 6.66961 3.25706 5.60547L3.24827 5.33398C3.24827 4.07429 3.74919 2.86637 4.63987 1.97559C5.53058 1.08487 6.73862 0.584082 7.99827 0.583984C9.25805 0.583984 10.4668 1.08479 11.3576 1.97559C12.2483 2.86635 12.7483 4.07435 12.7483 5.33398L12.7395 5.60547Z", fill: "currentColor" }) }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_7033_40039", children: _jsx("rect", { width: "16", height: "16", fill: "white" }) }) })] }));
|
|
24
24
|
};
|
|
25
25
|
export default MapIcon;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
1
12
|
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
13
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
14
|
if (ar || !(i in from)) {
|
|
@@ -9,15 +20,17 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
9
20
|
};
|
|
10
21
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
22
|
import { useEffect, useRef, useState } from 'react';
|
|
23
|
+
import { scrollIntoViewOnOpen } from '../../../lib/utils';
|
|
12
24
|
import '../../../styles/components/molecule/location-dropdown.css';
|
|
13
25
|
import Icon from '../../atoms/Icon/Icon';
|
|
14
26
|
import { Text } from '../../atoms/Typography/Typography';
|
|
15
|
-
import { scrollIntoViewOnOpen } from '../../../lib/utils';
|
|
16
27
|
var LocationDropdown = function (_a) {
|
|
17
28
|
var _b = _a.options, options = _b === void 0 ? [] : _b, _c = _a.groups, groups = _c === void 0 ? [] : _c, _d = _a.selectedValue, selectedValue = _d === void 0 ? null : _d, _e = _a.placeholder, placeholder = _e === void 0 ? 'Select a location' : _e, label = _a.label, onSelectionChange = _a.onSelectionChange, _f = _a.disabled, disabled = _f === void 0 ? false : _f, _g = _a.error, error = _g === void 0 ? false : _g, _h = _a.loading, loading = _h === void 0 ? false : _h, _j = _a.className, className = _j === void 0 ? '' : _j, _k = _a.type, type = _k === void 0 ? 'airport-port' : _k, _l = _a.maxHeight, maxHeight = _l === void 0 ? 240 : _l, _m = _a.direction, direction = _m === void 0 ? undefined : _m, _o = _a.showGroupTitles, showGroupTitles = _o === void 0 ? true : _o, _p = _a.scrollOnOpen, scrollOnOpen = _p === void 0 ? false : _p;
|
|
18
29
|
var _q = useState(false), isOpen = _q[0], setIsOpen = _q[1];
|
|
30
|
+
var _r = useState(''), searchQuery = _r[0], setSearchQuery = _r[1];
|
|
19
31
|
var dropdownRef = useRef(null);
|
|
20
32
|
var inputRef = useRef(null);
|
|
33
|
+
var searchInputRef = useRef(null);
|
|
21
34
|
// Close dropdown when clicking outside
|
|
22
35
|
useEffect(function () {
|
|
23
36
|
var handleClickOutside = function (event) {
|
|
@@ -34,6 +47,12 @@ var LocationDropdown = function (_a) {
|
|
|
34
47
|
useEffect(function () {
|
|
35
48
|
scrollIntoViewOnOpen(inputRef, isOpen, scrollOnOpen);
|
|
36
49
|
}, [isOpen, scrollOnOpen]);
|
|
50
|
+
// Reset search when dropdown closes
|
|
51
|
+
useEffect(function () {
|
|
52
|
+
if (!isOpen) {
|
|
53
|
+
setSearchQuery('');
|
|
54
|
+
}
|
|
55
|
+
}, [isOpen]);
|
|
37
56
|
var handleToggleDropdown = function () {
|
|
38
57
|
if (!disabled) {
|
|
39
58
|
setIsOpen(!isOpen);
|
|
@@ -48,6 +67,19 @@ var LocationDropdown = function (_a) {
|
|
|
48
67
|
};
|
|
49
68
|
onSelectionChange(locationData);
|
|
50
69
|
setIsOpen(false);
|
|
70
|
+
setSearchQuery('');
|
|
71
|
+
};
|
|
72
|
+
var handleSearchChange = function (e) {
|
|
73
|
+
setSearchQuery(e.target.value);
|
|
74
|
+
};
|
|
75
|
+
// Filter locations based on search query
|
|
76
|
+
var filterOptions = function (opts) {
|
|
77
|
+
if (!searchQuery.trim())
|
|
78
|
+
return opts;
|
|
79
|
+
var query = searchQuery.toLowerCase();
|
|
80
|
+
return opts.filter(function (option) {
|
|
81
|
+
return option.label.toLowerCase().includes(query);
|
|
82
|
+
});
|
|
51
83
|
};
|
|
52
84
|
var getSelectedOption = function () {
|
|
53
85
|
if (!selectedValue)
|
|
@@ -109,17 +141,18 @@ var LocationDropdown = function (_a) {
|
|
|
109
141
|
};
|
|
110
142
|
var selectedOption = getSelectedOption();
|
|
111
143
|
var displayText = selectedOption ? selectedOption.label : placeholder;
|
|
112
|
-
// Prepare all options (flat or grouped)
|
|
113
|
-
var
|
|
144
|
+
// Prepare all options (flat or grouped) and filter them
|
|
145
|
+
var allOptionsRaw = groups.length > 0 ? groups : [{ id: 'default', label: '', options: options }];
|
|
146
|
+
var allOptions = allOptionsRaw.map(function (group) { return (__assign(__assign({}, group), { options: filterOptions(group.options) })); }).filter(function (group) { return group.options.length > 0; });
|
|
114
147
|
// Skeleton loader component
|
|
115
148
|
var SkeletonOption = function () { return (_jsxs("div", { className: "location-dropdown__option location-dropdown__option--skeleton", children: [_jsx("div", { className: "location-dropdown__skeleton-icon" }), _jsx("div", { className: "location-dropdown__skeleton-text" })] })); };
|
|
116
149
|
// Render skeleton loading state
|
|
117
150
|
var renderSkeletonLoading = function () { return (_jsx("div", { className: "location-dropdown__panel", children: _jsx("div", { className: "location-dropdown__content", style: { maxHeight: "".concat(maxHeight, "px") }, children: _jsx("div", { className: "location-dropdown__options-wrapper", children: _jsx("div", { className: "location-dropdown__group", children: _jsx("div", { className: "location-dropdown__group-options", children: __spreadArray([], Array(5), true).map(function (_, index) { return (_jsx(SkeletonOption, {}, "skeleton-".concat(index))); }) }) }) }) }) })); };
|
|
118
|
-
return (_jsxs("div", { ref: dropdownRef, className: "location-dropdown location-dropdown--".concat(type, " ").concat(disabled ? 'location-dropdown--disabled' : '', " ").concat(className), children: [label && (_jsx("div", { className: "location-dropdown__label", children: _jsx(Text, { size: "sm", variant: "medium", children: label }) })), _jsxs("div", { ref: inputRef, className: "location-dropdown__input location-dropdown__input--".concat(getDropdownState()), onClick: handleToggleDropdown, children: [_jsxs("div", { className: "location-dropdown__input-content", children: [_jsx(Icon, { name: getInputIcon(), size: "sm", className: "location-dropdown__input-icon ".concat(!selectedOption ? 'location-dropdown__input-icon--placeholder' : '') }), _jsx("span", { className: "location-dropdown__input-text ".concat(!selectedOption ? 'location-dropdown__input-text--placeholder' : ''), children: displayText })] }), _jsx(Icon, { name: "chevron-down", size: "sm", className: "location-dropdown__input-chevron" })] }), isOpen &&
|
|
119
|
-
(loading ? (renderSkeletonLoading()) : (_jsx("div", { className: "location-dropdown__panel", children: _jsx("div", { className: "location-dropdown__content", style: { maxHeight: "".concat(maxHeight, "px") }, children: _jsx("div", { className: "location-dropdown__options-wrapper", children: allOptions.map(function (group, groupIndex) { return (_jsxs("div", { className: "location-dropdown__group", children: [showGroupTitles && group.label && groups.length > 0 && (_jsxs(_Fragment, { children: [groupIndex > 0 && _jsx("div", { className: "location-dropdown__divider" }), _jsx("div", { className: "location-dropdown__group-header", children: _jsx(Text, { size: "xs", variant: "bold", children: group.label }) })] })), _jsx("div", { className: "location-dropdown__group-options", children: group.options.map(function (option) {
|
|
151
|
+
return (_jsxs("div", { ref: dropdownRef, className: "location-dropdown location-dropdown--".concat(type, " ").concat(disabled ? 'location-dropdown--disabled' : '', " ").concat(className), children: [label && (_jsx("div", { className: "location-dropdown__label", children: _jsx(Text, { size: "sm", variant: "medium", children: label }) })), _jsxs("div", { ref: inputRef, className: "location-dropdown__input location-dropdown__input--".concat(getDropdownState()), onClick: handleToggleDropdown, children: [_jsxs("div", { className: "location-dropdown__input-content", children: [_jsx(Icon, { name: getInputIcon(), size: "sm", className: "location-dropdown__input-icon ".concat(!selectedOption ? 'location-dropdown__input-icon--placeholder' : '') }), isOpen ? (_jsx("input", { ref: searchInputRef, type: "text", className: "location-dropdown__input-text ".concat(!selectedOption && !searchQuery ? 'location-dropdown__input-text--placeholder' : ''), placeholder: displayText, value: searchQuery, onChange: handleSearchChange, onClick: function (e) { return e.stopPropagation(); }, disabled: disabled, autoFocus: true })) : (_jsx("span", { className: "location-dropdown__input-text ".concat(!selectedOption ? 'location-dropdown__input-text--placeholder' : ''), children: displayText }))] }), _jsx(Icon, { name: "chevron-down", size: "sm", className: "location-dropdown__input-chevron" })] }), isOpen &&
|
|
152
|
+
(loading ? (renderSkeletonLoading()) : (_jsx("div", { className: "location-dropdown__panel", children: _jsx("div", { className: "location-dropdown__content", style: { maxHeight: "".concat(maxHeight, "px") }, children: _jsx("div", { className: "location-dropdown__options-wrapper", children: allOptions.length === 0 ? (_jsx("div", { className: "location-dropdown__no-results", children: _jsx(Text, { size: "sm", variant: "medium", children: "No locations found" }) })) : (allOptions.map(function (group, groupIndex) { return (_jsxs("div", { className: "location-dropdown__group", children: [showGroupTitles && group.label && groups.length > 0 && (_jsxs(_Fragment, { children: [groupIndex > 0 && _jsx("div", { className: "location-dropdown__divider" }), _jsx("div", { className: "location-dropdown__group-header", children: _jsx(Text, { size: "xs", variant: "bold", children: group.label }) })] })), _jsx("div", { className: "location-dropdown__group-options", children: group.options.map(function (option) {
|
|
120
153
|
var isSelected = selectedValue === option.id;
|
|
121
154
|
var isDisabled = option.disabled || disabled;
|
|
122
155
|
return (_jsxs("div", { className: "location-dropdown__option ".concat(isSelected ? 'location-dropdown__option--selected' : '', " ").concat(isDisabled ? 'location-dropdown__option--disabled' : ''), onClick: function () { return !isDisabled && handleOptionSelect(option); }, children: [_jsx(Icon, { name: getOptionIcon(option, isSelected), size: "sm", className: "location-dropdown__option-icon" }), _jsx("span", { className: "location-dropdown__option-text", children: option.label })] }, option.id));
|
|
123
|
-
}) })] }, group.id)); }) }) }) })))] }));
|
|
156
|
+
}) })] }, group.id)); })) }) }) })))] }));
|
|
124
157
|
};
|
|
125
158
|
export default LocationDropdown;
|
|
@@ -9,17 +9,17 @@ var DEFAULT_OPTIONS = [
|
|
|
9
9
|
{
|
|
10
10
|
value: 'accommodation',
|
|
11
11
|
label: 'Accommodation',
|
|
12
|
-
icon: '
|
|
12
|
+
icon: 'accom',
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
value: 'transfer',
|
|
16
16
|
label: 'Transfer',
|
|
17
|
-
icon: '
|
|
17
|
+
icon: 'bus',
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
value: 'excursion',
|
|
21
21
|
label: 'Excursion',
|
|
22
|
-
icon: 'map
|
|
22
|
+
icon: 'map',
|
|
23
23
|
disabled: true,
|
|
24
24
|
badge: 'Coming soon',
|
|
25
25
|
},
|
|
@@ -70,6 +70,8 @@
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
.location-dropdown__input-text {
|
|
73
|
+
min-width: 0px;
|
|
74
|
+
flex: 1 1 0%;
|
|
73
75
|
overflow: hidden;
|
|
74
76
|
text-overflow: ellipsis;
|
|
75
77
|
white-space: nowrap;
|
|
@@ -79,11 +81,32 @@
|
|
|
79
81
|
color: var(--color-neutral-800);
|
|
80
82
|
}
|
|
81
83
|
|
|
84
|
+
.location-dropdown__input-text:is(input) {
|
|
85
|
+
border-width: 0px;
|
|
86
|
+
background-color: #ffffff00;
|
|
87
|
+
outline: 2px solid transparent;
|
|
88
|
+
outline-offset: 2px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.location-dropdown__input-text:is(input)::placeholder {
|
|
92
|
+
font-weight: 400;
|
|
93
|
+
color: var(--color-neutral-400);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.location-dropdown__input-text:is(input):disabled {
|
|
97
|
+
cursor: not-allowed;
|
|
98
|
+
}
|
|
99
|
+
|
|
82
100
|
.location-dropdown__input-text--placeholder {
|
|
83
101
|
font-weight: 400;
|
|
84
102
|
color: var(--color-neutral-400);
|
|
85
103
|
}
|
|
86
104
|
|
|
105
|
+
.location-dropdown__input-text:is(input).location-dropdown__input-text--placeholder::placeholder {
|
|
106
|
+
font-weight: 400;
|
|
107
|
+
color: var(--color-neutral-400);
|
|
108
|
+
}
|
|
109
|
+
|
|
87
110
|
.location-dropdown__input-chevron {
|
|
88
111
|
flex-shrink: 0;
|
|
89
112
|
color: var(--color-neutral-800);
|
|
@@ -173,6 +196,83 @@
|
|
|
173
196
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
|
|
174
197
|
}
|
|
175
198
|
|
|
199
|
+
/* Search Input */
|
|
200
|
+
|
|
201
|
+
.location-dropdown__search-wrapper {
|
|
202
|
+
position: relative;
|
|
203
|
+
display: flex;
|
|
204
|
+
align-items: center;
|
|
205
|
+
padding-left: 1rem;
|
|
206
|
+
padding-right: 1rem;
|
|
207
|
+
padding-top: 1rem;
|
|
208
|
+
padding-bottom: 0.5rem;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.location-dropdown__search-icon {
|
|
212
|
+
pointer-events: none;
|
|
213
|
+
position: absolute;
|
|
214
|
+
left: 1.5rem;
|
|
215
|
+
color: var(--color-neutral-400);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.location-dropdown__search-input {
|
|
219
|
+
width: 100%;
|
|
220
|
+
border-radius: 0.5rem;
|
|
221
|
+
border-width: 1px;
|
|
222
|
+
border-color: var(--color-neutral-300);
|
|
223
|
+
padding-top: 0.5rem;
|
|
224
|
+
padding-bottom: 0.5rem;
|
|
225
|
+
padding-left: 1.75rem;
|
|
226
|
+
padding-right: 2rem;
|
|
227
|
+
font-size: 0.875rem;
|
|
228
|
+
line-height: 1.25rem;
|
|
229
|
+
transition-property: all;
|
|
230
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
231
|
+
transition-duration: 200ms;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.location-dropdown__search-input:focus {
|
|
235
|
+
border-color: var(--color-atoll-green-600);
|
|
236
|
+
outline: 2px solid transparent;
|
|
237
|
+
outline-offset: 2px;
|
|
238
|
+
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
239
|
+
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
240
|
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
241
|
+
--tw-ring-color: var(--color-atoll-green-600);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.location-dropdown__search-input::placeholder {
|
|
245
|
+
color: var(--color-neutral-400);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.location-dropdown__search-clear {
|
|
249
|
+
position: absolute;
|
|
250
|
+
right: 1.5rem;
|
|
251
|
+
cursor: pointer;
|
|
252
|
+
border-width: 0px;
|
|
253
|
+
background-color: #ffffff00;
|
|
254
|
+
padding: 0.125rem;
|
|
255
|
+
color: var(--color-neutral-400);
|
|
256
|
+
transition-property: color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;
|
|
257
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
|
|
258
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;
|
|
259
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
260
|
+
transition-duration: 150ms;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.location-dropdown__search-clear:hover {
|
|
264
|
+
color: var(--color-neutral-600);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.location-dropdown__no-results {
|
|
268
|
+
padding-left: 1rem;
|
|
269
|
+
padding-right: 1rem;
|
|
270
|
+
padding-top: 1.5rem;
|
|
271
|
+
padding-bottom: 1.5rem;
|
|
272
|
+
text-align: center;
|
|
273
|
+
color: var(--color-neutral-500);
|
|
274
|
+
}
|
|
275
|
+
|
|
176
276
|
.location-dropdown__content {
|
|
177
277
|
overflow-y: auto;
|
|
178
278
|
overflow-x: hidden;
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
|
|
61
61
|
.service-selector__trigger-icon {
|
|
62
62
|
flex-shrink: 0;
|
|
63
|
-
color: var(--service-selector-color-service-selector-foreground-default, #
|
|
63
|
+
color: var(--service-selector-color-service-selector-foreground-default, #737373);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.service-selector__trigger-text {
|
|
67
67
|
flex-shrink: 0;
|
|
68
|
-
color: var(--service-selector-color-service-selector-foreground-default, #
|
|
68
|
+
color: var(--service-selector-color-service-selector-foreground-default, #737373);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.service-selector__trigger-chevron {
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
display: inline-flex;
|
|
74
74
|
align-items: center;
|
|
75
75
|
justify-content: center;
|
|
76
|
-
color: var(--service-selector-color-service-selector-foreground-default, #
|
|
76
|
+
color: var(--service-selector-color-service-selector-foreground-default, #737373);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.service-selector__trigger-chevron svg {
|
|
@@ -94,21 +94,32 @@
|
|
|
94
94
|
.service-selector__trigger--default .service-selector__trigger-icon,
|
|
95
95
|
.service-selector__trigger--default .service-selector__trigger-text,
|
|
96
96
|
.service-selector__trigger--default .service-selector__trigger-chevron {
|
|
97
|
-
color: var(--service-selector-color-service-selector-foreground-default, #
|
|
97
|
+
color: var(--service-selector-color-service-selector-foreground-default, #737373);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
.service-selector__trigger--open {
|
|
101
101
|
border-color: var(--service-selector-color-service-selector-border-hover, #0f7173);
|
|
102
|
+
background-color: var(
|
|
103
|
+
--service-selector-color-service-selector-background-hover,
|
|
104
|
+
#ccfbf6
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.service-selector__trigger--open .service-selector__trigger-icon,
|
|
109
|
+
.service-selector__trigger--open .service-selector__trigger-text,
|
|
110
|
+
.service-selector__trigger--open .service-selector__trigger-chevron {
|
|
111
|
+
color: var(--service-selector-color-service-selector-foreground-default, #0f7173);
|
|
102
112
|
}
|
|
103
113
|
|
|
104
|
-
/* Selected state -
|
|
114
|
+
/* Selected state - distinct visual style */
|
|
105
115
|
|
|
106
116
|
.service-selector__trigger.service-selector__trigger--selected {
|
|
107
117
|
background-color: var(
|
|
108
|
-
--service-selector-color-service-selector-background-
|
|
109
|
-
#
|
|
118
|
+
--service-selector-color-service-selector-background-hover,
|
|
119
|
+
#ccfbf6
|
|
110
120
|
);
|
|
111
|
-
border-color: var(--service-selector-color-service-selector-border-
|
|
121
|
+
border-color: var(--service-selector-color-service-selector-border-hover, #0f7173);
|
|
122
|
+
border-width: 2px;
|
|
112
123
|
}
|
|
113
124
|
|
|
114
125
|
.service-selector__trigger.service-selector__trigger--selected
|
|
@@ -117,10 +128,10 @@
|
|
|
117
128
|
.service-selector__trigger-text,
|
|
118
129
|
.service-selector__trigger.service-selector__trigger--selected
|
|
119
130
|
.service-selector__trigger-chevron {
|
|
120
|
-
color: var(--service-selector-color-service-selector-foreground-
|
|
131
|
+
color: var(--service-selector-color-service-selector-foreground-hover, #0f7173);
|
|
121
132
|
}
|
|
122
133
|
|
|
123
|
-
/* When dropdown is open AND a service is selected, keep
|
|
134
|
+
/* When dropdown is open AND a service is selected, keep selected style with hover */
|
|
124
135
|
|
|
125
136
|
.service-selector__trigger.service-selector__trigger--selected:hover {
|
|
126
137
|
background-color: var(
|
|
@@ -128,14 +139,18 @@
|
|
|
128
139
|
#ccfbf6
|
|
129
140
|
);
|
|
130
141
|
border-color: var(--service-selector-color-service-selector-border-hover, #0f7173);
|
|
142
|
+
border-width: 2px;
|
|
131
143
|
}
|
|
132
144
|
|
|
133
145
|
.service-selector__trigger--disabled {
|
|
134
|
-
opacity: 0.
|
|
146
|
+
opacity: 0.5;
|
|
135
147
|
cursor: not-allowed;
|
|
148
|
+
background-color: var(--color-neutral-100, #f5f5f5);
|
|
149
|
+
border-color: var(--color-neutral-300, #d4d4d4);
|
|
136
150
|
}
|
|
137
151
|
|
|
138
152
|
.service-selector__trigger--disabled .service-selector__trigger-icon,
|
|
153
|
+
.service-selector__trigger--disabled .service-selector__trigger-text,
|
|
139
154
|
.service-selector__trigger--disabled .service-selector__trigger-chevron {
|
|
140
155
|
color: var(--color-neutral-400, #a3a3a3);
|
|
141
156
|
}
|
|
@@ -238,14 +253,20 @@
|
|
|
238
253
|
}
|
|
239
254
|
|
|
240
255
|
.service-selector__option--disabled {
|
|
241
|
-
opacity: 0.
|
|
256
|
+
opacity: 0.4;
|
|
242
257
|
cursor: not-allowed;
|
|
258
|
+
position: relative;
|
|
243
259
|
}
|
|
244
260
|
|
|
245
261
|
.service-selector__option--disabled:hover {
|
|
246
262
|
background-color: transparent;
|
|
247
263
|
}
|
|
248
264
|
|
|
265
|
+
.service-selector__option--disabled .service-selector__option-icon,
|
|
266
|
+
.service-selector__option--disabled .service-selector__option-text {
|
|
267
|
+
color: var(--service-selector-color-dropdown-item-foreground-default, #a3a3a3);
|
|
268
|
+
}
|
|
269
|
+
|
|
249
270
|
.service-selector__option-icon {
|
|
250
271
|
flex-shrink: 0;
|
|
251
272
|
color: var(--service-selector-color-dropdown-item-foreground-default, #737373);
|
package/package.json
CHANGED
|
@@ -37,7 +37,7 @@ const MapIcon: React.FC<MapIconProps> = ({ size = 'md', className = '', color })
|
|
|
37
37
|
<g clipPath="url(#clip0_7033_40039)">
|
|
38
38
|
<path
|
|
39
39
|
d="M11.2483 5.33398C11.2483 4.47217 10.9064 3.6456 10.2971 3.03613C9.6876 2.42664 8.86022 2.08398 7.99827 2.08398C7.13645 2.08408 6.30982 2.42673 5.70042 3.03613C5.09104 3.64561 4.74827 4.47212 4.74827 5.33398C4.74827 6.29385 5.27536 7.37034 6.01975 8.38379C6.70202 9.31263 7.49819 10.0927 7.99827 10.5488C8.49845 10.0929 9.29531 9.31298 9.97776 8.38379C10.722 7.37039 11.2483 6.2939 11.2483 5.33398ZM2.11545 13.917H13.8821L12.6047 10.084H10.5403C9.9137 10.8175 9.29437 11.4056 8.90354 11.7559C8.88906 11.7688 8.87406 11.7812 8.85862 11.793C8.61164 11.9816 8.30904 12.084 7.99827 12.084C7.68762 12.0839 7.38578 11.9815 7.13889 11.793C7.12325 11.781 7.10764 11.769 7.09299 11.7559C6.70253 11.4056 6.08382 10.8175 5.45725 10.084H3.39573L2.11545 13.917ZM8.58225 5.33398C8.58225 5.01182 8.32043 4.75098 7.99827 4.75098C7.67627 4.75117 7.41526 5.01194 7.41526 5.33398C7.41526 5.65603 7.67627 5.91679 7.99827 5.91699C8.32043 5.91699 8.58225 5.65615 8.58225 5.33398ZM10.0823 5.33398C10.0823 6.48458 9.14886 7.41699 7.99827 7.41699C6.84784 7.41679 5.91526 6.48446 5.91526 5.33398C5.91526 4.18351 6.84784 3.25117 7.99827 3.25098C9.14886 3.25098 10.0823 4.18339 10.0823 5.33398ZM12.7395 5.60547C12.6711 6.66975 12.2087 7.6965 11.6506 8.58398H12.6643C12.9246 8.58392 13.1794 8.65556 13.4006 8.79004L13.4934 8.85156L13.5803 8.91992C13.7498 9.06348 13.8835 9.24462 13.9699 9.44922L14.009 9.55273L15.342 13.5527C15.4129 13.7655 15.4324 13.9922 15.3987 14.2139C15.3648 14.4357 15.2788 14.6471 15.1477 14.8291C15.0166 15.011 14.8442 15.1594 14.6448 15.2617C14.4451 15.364 14.2236 15.4168 13.9992 15.417H1.99827C1.77384 15.4169 1.5525 15.3641 1.35276 15.2617C1.15295 15.1593 0.980017 15.0103 0.848853 14.8281C0.717783 14.646 0.631562 14.4348 0.597876 14.2129C0.564278 13.9911 0.584401 13.7645 0.655493 13.5518L1.99143 9.55176L2.03049 9.44727C2.1314 9.20941 2.29628 9.00342 2.50706 8.85156L2.59983 8.79004C2.82065 8.65595 3.07444 8.58412 3.3342 8.58398H4.34592C3.78785 7.6966 3.32547 6.66961 3.25706 5.60547L3.24827 5.33398C3.24827 4.07429 3.74919 2.86637 4.63987 1.97559C5.53058 1.08487 6.73862 0.584082 7.99827 0.583984C9.25805 0.583984 10.4668 1.08479 11.3576 1.97559C12.2483 2.86635 12.7483 4.07435 12.7483 5.33398L12.7395 5.60547Z"
|
|
40
|
-
fill="
|
|
40
|
+
fill="currentColor"
|
|
41
41
|
/>
|
|
42
42
|
</g>
|
|
43
43
|
<defs>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { scrollIntoViewOnOpen } from '../../../lib/utils';
|
|
2
3
|
import '../../../styles/components/molecule/location-dropdown.css';
|
|
3
4
|
import Icon from '../../atoms/Icon/Icon';
|
|
4
5
|
import { Text } from '../../atoms/Typography/Typography';
|
|
5
|
-
import { scrollIntoViewOnOpen } from '../../../lib/utils';
|
|
6
6
|
|
|
7
7
|
export interface LocationOption {
|
|
8
8
|
id: string | number;
|
|
@@ -59,8 +59,10 @@ const LocationDropdown: React.FC<LocationDropdownProps> = ({
|
|
|
59
59
|
scrollOnOpen = false,
|
|
60
60
|
}) => {
|
|
61
61
|
const [isOpen, setIsOpen] = useState(false);
|
|
62
|
+
const [searchQuery, setSearchQuery] = useState('');
|
|
62
63
|
const dropdownRef = useRef<HTMLDivElement>(null);
|
|
63
64
|
const inputRef = useRef<HTMLDivElement>(null);
|
|
65
|
+
const searchInputRef = useRef<HTMLInputElement>(null);
|
|
64
66
|
|
|
65
67
|
// Close dropdown when clicking outside
|
|
66
68
|
useEffect(() => {
|
|
@@ -81,6 +83,13 @@ const LocationDropdown: React.FC<LocationDropdownProps> = ({
|
|
|
81
83
|
scrollIntoViewOnOpen(inputRef, isOpen, scrollOnOpen);
|
|
82
84
|
}, [isOpen, scrollOnOpen]);
|
|
83
85
|
|
|
86
|
+
// Reset search when dropdown closes
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
if (!isOpen) {
|
|
89
|
+
setSearchQuery('');
|
|
90
|
+
}
|
|
91
|
+
}, [isOpen]);
|
|
92
|
+
|
|
84
93
|
const handleToggleDropdown = () => {
|
|
85
94
|
if (!disabled) {
|
|
86
95
|
setIsOpen(!isOpen);
|
|
@@ -95,6 +104,21 @@ const LocationDropdown: React.FC<LocationDropdownProps> = ({
|
|
|
95
104
|
};
|
|
96
105
|
onSelectionChange(locationData);
|
|
97
106
|
setIsOpen(false);
|
|
107
|
+
setSearchQuery('');
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const handleSearchChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
111
|
+
setSearchQuery(e.target.value);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
// Filter locations based on search query
|
|
115
|
+
const filterOptions = (opts: LocationOption[]): LocationOption[] => {
|
|
116
|
+
if (!searchQuery.trim()) return opts;
|
|
117
|
+
|
|
118
|
+
const query = searchQuery.toLowerCase();
|
|
119
|
+
return opts.filter((option) =>
|
|
120
|
+
option.label.toLowerCase().includes(query)
|
|
121
|
+
);
|
|
98
122
|
};
|
|
99
123
|
|
|
100
124
|
const getSelectedOption = (): LocationOption | null => {
|
|
@@ -158,8 +182,12 @@ const LocationDropdown: React.FC<LocationDropdownProps> = ({
|
|
|
158
182
|
const selectedOption = getSelectedOption();
|
|
159
183
|
const displayText = selectedOption ? selectedOption.label : placeholder;
|
|
160
184
|
|
|
161
|
-
// Prepare all options (flat or grouped)
|
|
162
|
-
const
|
|
185
|
+
// Prepare all options (flat or grouped) and filter them
|
|
186
|
+
const allOptionsRaw = groups.length > 0 ? groups : [{ id: 'default', label: '', options }];
|
|
187
|
+
const allOptions = allOptionsRaw.map((group) => ({
|
|
188
|
+
...group,
|
|
189
|
+
options: filterOptions(group.options),
|
|
190
|
+
})).filter((group) => group.options.length > 0);
|
|
163
191
|
|
|
164
192
|
// Skeleton loader component
|
|
165
193
|
const SkeletonOption = () => (
|
|
@@ -208,10 +236,24 @@ const LocationDropdown: React.FC<LocationDropdownProps> = ({
|
|
|
208
236
|
size="sm"
|
|
209
237
|
className={`location-dropdown__input-icon ${!selectedOption ? 'location-dropdown__input-icon--placeholder' : ''}`}
|
|
210
238
|
/>
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
239
|
+
{isOpen ? (
|
|
240
|
+
<input
|
|
241
|
+
ref={searchInputRef}
|
|
242
|
+
type="text"
|
|
243
|
+
className={`location-dropdown__input-text ${!selectedOption && !searchQuery ? 'location-dropdown__input-text--placeholder' : ''}`}
|
|
244
|
+
placeholder={displayText}
|
|
245
|
+
value={searchQuery}
|
|
246
|
+
onChange={handleSearchChange}
|
|
247
|
+
onClick={(e) => e.stopPropagation()}
|
|
248
|
+
disabled={disabled}
|
|
249
|
+
autoFocus
|
|
250
|
+
/>
|
|
251
|
+
) : (
|
|
252
|
+
<span
|
|
253
|
+
className={`location-dropdown__input-text ${!selectedOption ? 'location-dropdown__input-text--placeholder' : ''}`}>
|
|
254
|
+
{displayText}
|
|
255
|
+
</span>
|
|
256
|
+
)}
|
|
215
257
|
</div>
|
|
216
258
|
<Icon
|
|
217
259
|
name="chevron-down"
|
|
@@ -229,7 +271,14 @@ const LocationDropdown: React.FC<LocationDropdownProps> = ({
|
|
|
229
271
|
className="location-dropdown__content"
|
|
230
272
|
style={{ maxHeight: `${maxHeight}px` }}>
|
|
231
273
|
<div className="location-dropdown__options-wrapper">
|
|
232
|
-
{allOptions.
|
|
274
|
+
{allOptions.length === 0 ? (
|
|
275
|
+
<div className="location-dropdown__no-results">
|
|
276
|
+
<Text size="sm" variant="medium">
|
|
277
|
+
No locations found
|
|
278
|
+
</Text>
|
|
279
|
+
</div>
|
|
280
|
+
) : (
|
|
281
|
+
allOptions.map((group, groupIndex) => (
|
|
233
282
|
<div key={group.id} className="location-dropdown__group">
|
|
234
283
|
{showGroupTitles && group.label && groups.length > 0 && (
|
|
235
284
|
<>
|
|
@@ -265,7 +314,8 @@ const LocationDropdown: React.FC<LocationDropdownProps> = ({
|
|
|
265
314
|
})}
|
|
266
315
|
</div>
|
|
267
316
|
</div>
|
|
268
|
-
|
|
317
|
+
))
|
|
318
|
+
)}
|
|
269
319
|
</div>
|
|
270
320
|
</div>
|
|
271
321
|
</div>
|
|
@@ -32,17 +32,17 @@ const DEFAULT_OPTIONS: ServiceOption[] = [
|
|
|
32
32
|
{
|
|
33
33
|
value: 'accommodation',
|
|
34
34
|
label: 'Accommodation',
|
|
35
|
-
icon: '
|
|
35
|
+
icon: 'accom',
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
value: 'transfer',
|
|
39
39
|
label: 'Transfer',
|
|
40
|
-
icon: '
|
|
40
|
+
icon: 'bus',
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
value: 'excursion',
|
|
44
44
|
label: 'Excursion',
|
|
45
|
-
icon: 'map
|
|
45
|
+
icon: 'map',
|
|
46
46
|
disabled: true,
|
|
47
47
|
badge: 'Coming soon',
|
|
48
48
|
},
|
|
@@ -35,13 +35,26 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.location-dropdown__input-text {
|
|
38
|
-
@apply text-sm leading-5 text-[var(--color-neutral-800)] font-medium truncate;
|
|
38
|
+
@apply text-sm leading-5 text-[var(--color-neutral-800)] font-medium truncate flex-1 min-w-0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.location-dropdown__input-text:is(input) {
|
|
42
|
+
@apply bg-transparent border-0 outline-none;
|
|
43
|
+
@apply placeholder:text-[var(--color-neutral-400)] placeholder:font-normal;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.location-dropdown__input-text:is(input):disabled {
|
|
47
|
+
@apply cursor-not-allowed;
|
|
39
48
|
}
|
|
40
49
|
|
|
41
50
|
.location-dropdown__input-text--placeholder {
|
|
42
51
|
@apply text-[var(--color-neutral-400)] font-normal;
|
|
43
52
|
}
|
|
44
53
|
|
|
54
|
+
.location-dropdown__input-text:is(input).location-dropdown__input-text--placeholder {
|
|
55
|
+
@apply placeholder:text-[var(--color-neutral-400)] placeholder:font-normal;
|
|
56
|
+
}
|
|
57
|
+
|
|
45
58
|
.location-dropdown__input-chevron {
|
|
46
59
|
@apply text-[var(--color-neutral-800)] flex-shrink-0 transition-transform duration-200;
|
|
47
60
|
}
|
|
@@ -100,6 +113,29 @@
|
|
|
100
113
|
@apply absolute top-full left-0 right-0 mt-2 bg-white rounded-xl overflow-hidden z-50 w-[17.5rem] border border-[var(--color-neutral-200)];
|
|
101
114
|
}
|
|
102
115
|
|
|
116
|
+
/* Search Input */
|
|
117
|
+
.location-dropdown__search-wrapper {
|
|
118
|
+
@apply relative flex items-center px-4 pt-4 pb-2;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.location-dropdown__search-icon {
|
|
122
|
+
@apply absolute left-6 text-[var(--color-neutral-400)] pointer-events-none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.location-dropdown__search-input {
|
|
126
|
+
@apply w-full pl-7 pr-8 py-2 text-sm border border-[var(--color-neutral-300)] rounded-lg transition-all duration-200;
|
|
127
|
+
@apply focus:outline-none focus:border-[var(--color-atoll-green-600)] focus:ring-1 focus:ring-[var(--color-atoll-green-600)];
|
|
128
|
+
@apply placeholder:text-[var(--color-neutral-400)];
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.location-dropdown__search-clear {
|
|
132
|
+
@apply absolute right-6 text-[var(--color-neutral-400)] hover:text-[var(--color-neutral-600)] transition-colors cursor-pointer bg-transparent border-0 p-0.5;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.location-dropdown__no-results {
|
|
136
|
+
@apply px-4 py-6 text-center text-[var(--color-neutral-500)];
|
|
137
|
+
}
|
|
138
|
+
|
|
103
139
|
.location-dropdown__content {
|
|
104
140
|
@apply overflow-y-auto overflow-x-hidden;
|
|
105
141
|
scrollbar-width: thin;
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
|
|
56
56
|
.service-selector__trigger-icon {
|
|
57
57
|
flex-shrink: 0;
|
|
58
|
-
color: var(--service-selector-color-service-selector-foreground-default, #
|
|
58
|
+
color: var(--service-selector-color-service-selector-foreground-default, #737373);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.service-selector__trigger-text {
|
|
62
62
|
flex-shrink: 0;
|
|
63
|
-
color: var(--service-selector-color-service-selector-foreground-default, #
|
|
63
|
+
color: var(--service-selector-color-service-selector-foreground-default, #737373);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.service-selector__trigger-chevron {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
display: inline-flex;
|
|
69
69
|
align-items: center;
|
|
70
70
|
justify-content: center;
|
|
71
|
-
color: var(--service-selector-color-service-selector-foreground-default, #
|
|
71
|
+
color: var(--service-selector-color-service-selector-foreground-default, #737373);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
.service-selector__trigger-chevron svg {
|
|
@@ -88,20 +88,31 @@
|
|
|
88
88
|
.service-selector__trigger--default .service-selector__trigger-icon,
|
|
89
89
|
.service-selector__trigger--default .service-selector__trigger-text,
|
|
90
90
|
.service-selector__trigger--default .service-selector__trigger-chevron {
|
|
91
|
-
color: var(--service-selector-color-service-selector-foreground-default, #
|
|
91
|
+
color: var(--service-selector-color-service-selector-foreground-default, #737373);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
.service-selector__trigger--open {
|
|
95
95
|
border-color: var(--service-selector-color-service-selector-border-hover, #0f7173);
|
|
96
|
+
background-color: var(
|
|
97
|
+
--service-selector-color-service-selector-background-hover,
|
|
98
|
+
#ccfbf6
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.service-selector__trigger--open .service-selector__trigger-icon,
|
|
103
|
+
.service-selector__trigger--open .service-selector__trigger-text,
|
|
104
|
+
.service-selector__trigger--open .service-selector__trigger-chevron {
|
|
105
|
+
color: var(--service-selector-color-service-selector-foreground-default, #0f7173);
|
|
96
106
|
}
|
|
97
107
|
|
|
98
|
-
/* Selected state -
|
|
108
|
+
/* Selected state - distinct visual style */
|
|
99
109
|
.service-selector__trigger.service-selector__trigger--selected {
|
|
100
110
|
background-color: var(
|
|
101
|
-
--service-selector-color-service-selector-background-
|
|
102
|
-
#
|
|
111
|
+
--service-selector-color-service-selector-background-hover,
|
|
112
|
+
#ccfbf6
|
|
103
113
|
);
|
|
104
|
-
border-color: var(--service-selector-color-service-selector-border-
|
|
114
|
+
border-color: var(--service-selector-color-service-selector-border-hover, #0f7173);
|
|
115
|
+
border-width: 2px;
|
|
105
116
|
}
|
|
106
117
|
|
|
107
118
|
.service-selector__trigger.service-selector__trigger--selected
|
|
@@ -110,24 +121,28 @@
|
|
|
110
121
|
.service-selector__trigger-text,
|
|
111
122
|
.service-selector__trigger.service-selector__trigger--selected
|
|
112
123
|
.service-selector__trigger-chevron {
|
|
113
|
-
color: var(--service-selector-color-service-selector-foreground-
|
|
124
|
+
color: var(--service-selector-color-service-selector-foreground-hover, #0f7173);
|
|
114
125
|
}
|
|
115
126
|
|
|
116
|
-
/* When dropdown is open AND a service is selected, keep
|
|
127
|
+
/* When dropdown is open AND a service is selected, keep selected style with hover */
|
|
117
128
|
.service-selector__trigger.service-selector__trigger--selected:hover {
|
|
118
129
|
background-color: var(
|
|
119
130
|
--service-selector-color-service-selector-background-hover,
|
|
120
131
|
#ccfbf6
|
|
121
132
|
);
|
|
122
133
|
border-color: var(--service-selector-color-service-selector-border-hover, #0f7173);
|
|
134
|
+
border-width: 2px;
|
|
123
135
|
}
|
|
124
136
|
|
|
125
137
|
.service-selector__trigger--disabled {
|
|
126
|
-
opacity: 0.
|
|
138
|
+
opacity: 0.5;
|
|
127
139
|
cursor: not-allowed;
|
|
140
|
+
background-color: var(--color-neutral-100, #f5f5f5);
|
|
141
|
+
border-color: var(--color-neutral-300, #d4d4d4);
|
|
128
142
|
}
|
|
129
143
|
|
|
130
144
|
.service-selector__trigger--disabled .service-selector__trigger-icon,
|
|
145
|
+
.service-selector__trigger--disabled .service-selector__trigger-text,
|
|
131
146
|
.service-selector__trigger--disabled .service-selector__trigger-chevron {
|
|
132
147
|
color: var(--color-neutral-400, #a3a3a3);
|
|
133
148
|
}
|
|
@@ -228,14 +243,20 @@
|
|
|
228
243
|
}
|
|
229
244
|
|
|
230
245
|
.service-selector__option--disabled {
|
|
231
|
-
opacity: 0.
|
|
246
|
+
opacity: 0.4;
|
|
232
247
|
cursor: not-allowed;
|
|
248
|
+
position: relative;
|
|
233
249
|
}
|
|
234
250
|
|
|
235
251
|
.service-selector__option--disabled:hover {
|
|
236
252
|
background-color: transparent;
|
|
237
253
|
}
|
|
238
254
|
|
|
255
|
+
.service-selector__option--disabled .service-selector__option-icon,
|
|
256
|
+
.service-selector__option--disabled .service-selector__option-text {
|
|
257
|
+
color: var(--service-selector-color-dropdown-item-foreground-default, #a3a3a3);
|
|
258
|
+
}
|
|
259
|
+
|
|
239
260
|
.service-selector__option-icon {
|
|
240
261
|
flex-shrink: 0;
|
|
241
262
|
color: var(--service-selector-color-dropdown-item-foreground-default, #737373);
|