@ecohouse/ui 0.1.33 → 0.1.35
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/index.cjs +30078 -656
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +114 -7
- package/dist/index.d.ts +114 -7
- package/dist/index.js +30007 -593
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/AccordionItem/AccordionItem.stories.tsx +54 -0
- package/src/components/AccordionItem/AccordionItem.tsx +223 -0
- package/src/components/AccordionItem/index.ts +2 -0
- package/src/components/AccountHeader/AccountHeader.tsx +50 -29
- package/src/components/Button/Button.stories.tsx +10 -1
- package/src/components/Button/Button.tsx +32 -3
- package/src/components/ContactInfoCard/ContactInfoCard.stories.tsx +30 -0
- package/src/components/ContactInfoCard/ContactInfoCard.tsx +141 -0
- package/src/components/ContactInfoCard/index.ts +2 -0
- package/src/components/DatePicker/DatePicker.tsx +51 -15
- package/src/components/Input/Input.tsx +54 -21
- package/src/components/LanguageSwitcher/LanguageSwitcher.stories.tsx +11 -0
- package/src/components/LanguageSwitcher/LanguageSwitcher.tsx +103 -19
- package/src/components/LanguageSwitcher/index.ts +5 -1
- package/src/components/Modal/Modal.stories.tsx +100 -0
- package/src/components/Modal/Modal.tsx +165 -0
- package/src/components/Modal/index.ts +2 -0
- package/src/components/Select/Select.tsx +90 -5
- package/src/components/Sidebar/Sidebar.tsx +19 -3
- package/src/components/Textarea/Textarea.tsx +29 -4
- package/src/components/ToggleRow/ToggleRow.stories.tsx +46 -0
- package/src/components/ToggleRow/ToggleRow.tsx +121 -0
- package/src/components/ToggleRow/index.ts +2 -0
- package/src/components/VerificationCodeInput/VerificationCodeInput.tsx +80 -60
- package/src/components/index.ts +17 -1
- package/src/icons/CameraFilled/CameraFilledIcon.tsx +15 -0
- package/src/icons/CameraFilled/CameraFilledIcon.web.tsx +21 -0
- package/src/icons/CameraFilled/cameraFilledPath.ts +2 -0
- package/src/icons/CameraFilled/index.ts +1 -0
- package/src/icons/Globe/GlobeIcon.tsx +2 -2
- package/src/icons/Globe/GlobeIcon.web.tsx +2 -2
- package/src/icons/Globe/globePath.ts +2 -2
- package/src/icons/Headset/HeadsetIcon.tsx +26 -0
- package/src/icons/Headset/HeadsetIcon.web.tsx +25 -0
- package/src/icons/Headset/headsetPath.ts +6 -0
- package/src/icons/Headset/index.ts +1 -0
- package/src/icons/Hide/HideIcon.tsx +21 -0
- package/src/icons/Hide/HideIcon.web.tsx +27 -0
- package/src/icons/Hide/hidePath.ts +3 -0
- package/src/icons/Hide/index.ts +1 -0
- package/src/icons/Key/keyPath.ts +1 -1
- package/src/icons/MenuLines/MenuLinesIcon.tsx +20 -0
- package/src/icons/MenuLines/MenuLinesIcon.web.tsx +26 -0
- package/src/icons/MenuLines/index.ts +1 -0
- package/src/icons/MenuLines/menuLinesPath.ts +3 -0
- package/src/icons/index.ts +4 -0
- package/src/icons/registry.ts +11 -0
- package/src/index.ts +13 -0
- package/src/theme/typography.ts +3 -3
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { forwardRef, useMemo, useRef, type ComponentRef } from "react";
|
|
2
|
+
import {
|
|
3
|
+
StyleSheet,
|
|
4
|
+
Text,
|
|
5
|
+
useWindowDimensions,
|
|
6
|
+
View,
|
|
7
|
+
type StyleProp,
|
|
8
|
+
type ViewProps,
|
|
9
|
+
type ViewStyle,
|
|
10
|
+
} from "react-native";
|
|
11
|
+
import { colors, fonts } from "../../theme";
|
|
12
|
+
import { mergeRefs } from "../../utils/mergeRefs";
|
|
13
|
+
import { useApplyWebClassName } from "../../utils/useApplyWebClassName";
|
|
14
|
+
import { Toggle } from "../Toggle";
|
|
15
|
+
|
|
16
|
+
export interface ToggleRowProps extends Omit<ViewProps, "style" | "children"> {
|
|
17
|
+
label: string;
|
|
18
|
+
value?: boolean;
|
|
19
|
+
defaultValue?: boolean;
|
|
20
|
+
onValueChange?: (value: boolean) => void;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/** When false, hides the bottom border. Defaults to true. */
|
|
23
|
+
showBorder?: boolean;
|
|
24
|
+
style?: StyleProp<ViewStyle>;
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const DESKTOP_MIN_WIDTH = 1024;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Settings toggle line — label left, switch right.
|
|
32
|
+
* Mobile: height 57, padding 16/12, label 12px.
|
|
33
|
+
* Desktop: height 65, padding 20/12, label 14px.
|
|
34
|
+
*/
|
|
35
|
+
export const ToggleRow = forwardRef<ComponentRef<typeof View>, ToggleRowProps>(function ToggleRow(
|
|
36
|
+
{
|
|
37
|
+
label,
|
|
38
|
+
value,
|
|
39
|
+
defaultValue = false,
|
|
40
|
+
onValueChange,
|
|
41
|
+
disabled = false,
|
|
42
|
+
showBorder = true,
|
|
43
|
+
style,
|
|
44
|
+
className,
|
|
45
|
+
accessibilityLabel,
|
|
46
|
+
...rest
|
|
47
|
+
},
|
|
48
|
+
forwardedRef,
|
|
49
|
+
) {
|
|
50
|
+
const containerRef = useRef<ComponentRef<typeof View>>(null);
|
|
51
|
+
const setContainerRef = useMemo(() => mergeRefs(containerRef, forwardedRef), [forwardedRef]);
|
|
52
|
+
const { width: viewportWidth } = useWindowDimensions();
|
|
53
|
+
const isDesktop = viewportWidth >= DESKTOP_MIN_WIDTH;
|
|
54
|
+
const labelSize = isDesktop ? 14 : 12;
|
|
55
|
+
|
|
56
|
+
useApplyWebClassName(containerRef, className);
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<View
|
|
60
|
+
{...rest}
|
|
61
|
+
ref={setContainerRef}
|
|
62
|
+
style={[
|
|
63
|
+
styles.root,
|
|
64
|
+
{
|
|
65
|
+
minHeight: isDesktop ? 65 : 57,
|
|
66
|
+
paddingTop: isDesktop ? 20 : 16,
|
|
67
|
+
paddingBottom: isDesktop ? 20 : 16,
|
|
68
|
+
},
|
|
69
|
+
!showBorder && styles.noBorder,
|
|
70
|
+
style,
|
|
71
|
+
]}
|
|
72
|
+
>
|
|
73
|
+
<Text
|
|
74
|
+
style={[
|
|
75
|
+
styles.label,
|
|
76
|
+
{
|
|
77
|
+
fontSize: labelSize,
|
|
78
|
+
lineHeight: isDesktop ? 20 : 18,
|
|
79
|
+
letterSpacing: labelSize * 0.03,
|
|
80
|
+
},
|
|
81
|
+
]}
|
|
82
|
+
numberOfLines={2}
|
|
83
|
+
>
|
|
84
|
+
{label}
|
|
85
|
+
</Text>
|
|
86
|
+
<Toggle
|
|
87
|
+
value={value}
|
|
88
|
+
defaultValue={defaultValue}
|
|
89
|
+
onValueChange={onValueChange}
|
|
90
|
+
disabled={disabled}
|
|
91
|
+
accessibilityLabel={accessibilityLabel ?? label}
|
|
92
|
+
/>
|
|
93
|
+
</View>
|
|
94
|
+
);
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
const styles = StyleSheet.create({
|
|
98
|
+
root: {
|
|
99
|
+
width: "100%",
|
|
100
|
+
flexDirection: "row",
|
|
101
|
+
alignItems: "center",
|
|
102
|
+
gap: 40,
|
|
103
|
+
paddingRight: 12,
|
|
104
|
+
paddingLeft: 12,
|
|
105
|
+
borderBottomWidth: 1,
|
|
106
|
+
borderBottomColor: colors.grey650,
|
|
107
|
+
opacity: 1,
|
|
108
|
+
},
|
|
109
|
+
noBorder: {
|
|
110
|
+
borderBottomWidth: 0,
|
|
111
|
+
},
|
|
112
|
+
label: {
|
|
113
|
+
flex: 1,
|
|
114
|
+
minWidth: 0,
|
|
115
|
+
fontFamily: fonts.sans,
|
|
116
|
+
fontWeight: "700",
|
|
117
|
+
color: colors.white,
|
|
118
|
+
// RN-web clips Armenian descenders when line boxes are tight.
|
|
119
|
+
overflow: "visible",
|
|
120
|
+
},
|
|
121
|
+
});
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
Platform,
|
|
11
11
|
StyleSheet,
|
|
12
|
+
Text,
|
|
12
13
|
TextInput,
|
|
13
14
|
useWindowDimensions,
|
|
14
15
|
View,
|
|
@@ -24,12 +25,13 @@ import { useApplyWebClassName } from "../../utils/useApplyWebClassName";
|
|
|
24
25
|
import { normalizeVerificationCode, updateVerificationCode } from "./VerificationCodeInput.utils";
|
|
25
26
|
|
|
26
27
|
const DEFAULT_LENGTH = 6;
|
|
27
|
-
const DESKTOP_CELL_WIDTH = 54;
|
|
28
|
-
const MOBILE_CELL_WIDTH =
|
|
29
|
-
const
|
|
28
|
+
const DESKTOP_CELL_WIDTH = 54.333335876464844;
|
|
29
|
+
const MOBILE_CELL_WIDTH = 45.16666793823242;
|
|
30
|
+
const DESKTOP_CELL_HEIGHT = 68;
|
|
31
|
+
const MOBILE_CELL_HEIGHT = 58;
|
|
30
32
|
const DESKTOP_GAP = 12;
|
|
31
|
-
const MOBILE_GAP =
|
|
32
|
-
const MOBILE_BREAKPOINT =
|
|
33
|
+
const MOBILE_GAP = 12;
|
|
34
|
+
const MOBILE_BREAKPOINT = 1024;
|
|
33
35
|
|
|
34
36
|
export interface VerificationCodeInputHandle {
|
|
35
37
|
clear: () => void;
|
|
@@ -47,6 +49,8 @@ export interface VerificationCodeInputProps extends Omit<ViewProps, "children" |
|
|
|
47
49
|
/** Called when Enter/submit is pressed from a cell. */
|
|
48
50
|
onSubmit?: (value: string) => void;
|
|
49
51
|
error?: boolean;
|
|
52
|
+
/** Shown under the cells when `error` is true. */
|
|
53
|
+
errorMessage?: string;
|
|
50
54
|
disabled?: boolean;
|
|
51
55
|
autoFocus?: boolean;
|
|
52
56
|
/** Localized accessible name for each zero-based cell index. */
|
|
@@ -68,6 +72,7 @@ export const VerificationCodeInput = forwardRef<
|
|
|
68
72
|
onComplete,
|
|
69
73
|
onSubmit,
|
|
70
74
|
error = false,
|
|
75
|
+
errorMessage,
|
|
71
76
|
disabled = false,
|
|
72
77
|
autoFocus = false,
|
|
73
78
|
getDigitAccessibilityLabel,
|
|
@@ -161,71 +166,77 @@ export const VerificationCodeInput = forwardRef<
|
|
|
161
166
|
|
|
162
167
|
const mobile = viewportWidth < MOBILE_BREAKPOINT;
|
|
163
168
|
const cellWidth = mobile ? MOBILE_CELL_WIDTH : DESKTOP_CELL_WIDTH;
|
|
169
|
+
const cellHeight = mobile ? MOBILE_CELL_HEIGHT : DESKTOP_CELL_HEIGHT;
|
|
164
170
|
const cellGap = mobile ? MOBILE_GAP : DESKTOP_GAP;
|
|
165
|
-
const
|
|
171
|
+
const rowWidth = cellWidth * safeLength + cellGap * Math.max(0, safeLength - 1);
|
|
172
|
+
const showErrorMessage = Boolean(error && errorMessage);
|
|
166
173
|
|
|
167
174
|
return (
|
|
168
|
-
<View
|
|
169
|
-
{
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
})}
|
|
175
|
+
<View {...viewProps} ref={rootRef} style={[styles.wrapper, disabled && styles.disabled, style]}>
|
|
176
|
+
<View style={[styles.row, { width: rowWidth, maxWidth: "100%", gap: cellGap }]}>
|
|
177
|
+
{Array.from({ length: safeLength }, (_, index) => {
|
|
178
|
+
const active = focusedIndex === index;
|
|
179
|
+
const borderColor = error ? colors.red : active ? colors.primary : colors.grey600;
|
|
180
|
+
|
|
181
|
+
return (
|
|
182
|
+
<TextInput
|
|
183
|
+
ref={(element) => {
|
|
184
|
+
inputRefs.current[index] = element;
|
|
185
|
+
}}
|
|
186
|
+
accessibilityLabel={
|
|
187
|
+
getDigitAccessibilityLabel?.(index) ?? `Verification code digit ${index + 1}`
|
|
188
|
+
}
|
|
189
|
+
accessibilityState={{ disabled }}
|
|
190
|
+
autoComplete={index === 0 ? "one-time-code" : "off"}
|
|
191
|
+
autoFocus={autoFocus && index === 0}
|
|
192
|
+
caretHidden={Platform.OS !== "web"}
|
|
193
|
+
editable={!disabled}
|
|
194
|
+
inputMode="numeric"
|
|
195
|
+
key={index}
|
|
196
|
+
keyboardType="number-pad"
|
|
197
|
+
maxLength={safeLength}
|
|
198
|
+
onBlur={() => setFocusedIndex((current) => (current === index ? null : current))}
|
|
199
|
+
onChangeText={(text) => handleChange(index, text)}
|
|
200
|
+
onFocus={() => setFocusedIndex(index)}
|
|
201
|
+
onKeyPress={(event) => handleKeyPress(index, event)}
|
|
202
|
+
onSubmitEditing={() => onSubmit?.(currentCode)}
|
|
203
|
+
selectTextOnFocus
|
|
204
|
+
style={[
|
|
205
|
+
styles.cell,
|
|
206
|
+
{
|
|
207
|
+
width: cellWidth,
|
|
208
|
+
height: cellHeight,
|
|
209
|
+
borderColor,
|
|
210
|
+
color: error ? colors.red : colors.white,
|
|
211
|
+
},
|
|
212
|
+
Platform.OS === "web" ? styles.cellWeb : null,
|
|
213
|
+
Platform.OS === "android" ? styles.cellAndroid : null,
|
|
214
|
+
inputStyle,
|
|
215
|
+
]}
|
|
216
|
+
value={currentCode[index] ?? ""}
|
|
217
|
+
/>
|
|
218
|
+
);
|
|
219
|
+
})}
|
|
220
|
+
</View>
|
|
221
|
+
|
|
222
|
+
{showErrorMessage ? (
|
|
223
|
+
<Text accessibilityLiveRegion="assertive" style={styles.errorMessage}>
|
|
224
|
+
{errorMessage}
|
|
225
|
+
</Text>
|
|
226
|
+
) : null}
|
|
221
227
|
</View>
|
|
222
228
|
);
|
|
223
229
|
});
|
|
224
230
|
|
|
225
231
|
const styles = StyleSheet.create({
|
|
226
|
-
|
|
232
|
+
wrapper: {
|
|
227
233
|
minWidth: 0,
|
|
228
234
|
alignSelf: "center",
|
|
235
|
+
alignItems: "center",
|
|
236
|
+
gap: 12,
|
|
237
|
+
},
|
|
238
|
+
row: {
|
|
239
|
+
minWidth: 0,
|
|
229
240
|
flexDirection: "row",
|
|
230
241
|
justifyContent: "center",
|
|
231
242
|
},
|
|
@@ -252,4 +263,13 @@ const styles = StyleSheet.create({
|
|
|
252
263
|
cellAndroid: {
|
|
253
264
|
includeFontPadding: false,
|
|
254
265
|
},
|
|
266
|
+
errorMessage: {
|
|
267
|
+
fontFamily: fonts.sans,
|
|
268
|
+
fontSize: 12,
|
|
269
|
+
fontWeight: "400",
|
|
270
|
+
lineHeight: 12,
|
|
271
|
+
letterSpacing: 0,
|
|
272
|
+
textAlign: "center",
|
|
273
|
+
color: colors.red,
|
|
274
|
+
},
|
|
255
275
|
});
|
package/src/components/index.ts
CHANGED
|
@@ -22,6 +22,12 @@ export type { StepPagerProps } from "./StepPager";
|
|
|
22
22
|
export { InfoTile } from "./InfoTile";
|
|
23
23
|
export type { InfoTileProps } from "./InfoTile";
|
|
24
24
|
|
|
25
|
+
export { ContactInfoCard } from "./ContactInfoCard";
|
|
26
|
+
export type { ContactInfoCardProps } from "./ContactInfoCard";
|
|
27
|
+
|
|
28
|
+
export { AccordionItem } from "./AccordionItem";
|
|
29
|
+
export type { AccordionItemProps } from "./AccordionItem";
|
|
30
|
+
|
|
25
31
|
export { StepList } from "./StepList";
|
|
26
32
|
export type { StepListProps } from "./StepList";
|
|
27
33
|
|
|
@@ -35,7 +41,11 @@ export { Sidebar } from "./Sidebar";
|
|
|
35
41
|
export type { SidebarProps, SidebarItem, SidebarUser } from "./Sidebar";
|
|
36
42
|
|
|
37
43
|
export { LanguageSwitcher, defaultLanguageOptions } from "./LanguageSwitcher";
|
|
38
|
-
export type {
|
|
44
|
+
export type {
|
|
45
|
+
LanguageOption,
|
|
46
|
+
LanguageSwitcherProps,
|
|
47
|
+
LanguageSwitcherVariant,
|
|
48
|
+
} from "./LanguageSwitcher";
|
|
39
49
|
|
|
40
50
|
export { StatCard } from "./StatCard";
|
|
41
51
|
export type { StatCardProps } from "./StatCard";
|
|
@@ -58,6 +68,9 @@ export type {
|
|
|
58
68
|
export { FloatingActionButton } from "./FloatingActionButton";
|
|
59
69
|
export type { FloatingActionButtonProps } from "./FloatingActionButton";
|
|
60
70
|
|
|
71
|
+
export { Modal } from "./Modal";
|
|
72
|
+
export type { ModalProps } from "./Modal";
|
|
73
|
+
|
|
61
74
|
export { Input } from "./Input";
|
|
62
75
|
export type { InputIcon, InputProps, InputSize } from "./Input";
|
|
63
76
|
|
|
@@ -82,6 +95,9 @@ export type { TextareaProps } from "./Textarea";
|
|
|
82
95
|
export { Toggle } from "./Toggle";
|
|
83
96
|
export type { ToggleProps } from "./Toggle";
|
|
84
97
|
|
|
98
|
+
export { ToggleRow } from "./ToggleRow";
|
|
99
|
+
export type { ToggleRowProps } from "./ToggleRow";
|
|
100
|
+
|
|
85
101
|
export { RatingInput } from "./RatingInput";
|
|
86
102
|
export type { RatingInputProps } from "./RatingInput";
|
|
87
103
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Svg, { Path } from "react-native-svg";
|
|
2
|
+
import { CAMERA_FILLED_PATH } from "./cameraFilledPath";
|
|
3
|
+
import { colors } from "../../theme";
|
|
4
|
+
import type { IconProps } from "../types";
|
|
5
|
+
|
|
6
|
+
export { CAMERA_FILLED_PATH } from "./cameraFilledPath";
|
|
7
|
+
|
|
8
|
+
/** Native — filled camera, 32×32 viewBox. */
|
|
9
|
+
export function CameraFilledIcon({ size = 32, color = colors.primary }: IconProps) {
|
|
10
|
+
return (
|
|
11
|
+
<Svg width={size} height={size} viewBox="0 0 32 32" fill="none">
|
|
12
|
+
<Path d={CAMERA_FILLED_PATH} fill={color} />
|
|
13
|
+
</Svg>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CAMERA_FILLED_PATH } from "./cameraFilledPath";
|
|
2
|
+
import { colors } from "../../theme";
|
|
3
|
+
import type { IconProps } from "../types";
|
|
4
|
+
|
|
5
|
+
/** Web / Storybook — filled camera, 32×32 viewBox. */
|
|
6
|
+
export function CameraFilledIcon({ size = 32, color = colors.primary }: IconProps) {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
width={size}
|
|
10
|
+
height={size}
|
|
11
|
+
viewBox="0 0 32 32"
|
|
12
|
+
fill="none"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
aria-hidden
|
|
15
|
+
>
|
|
16
|
+
<path d={CAMERA_FILLED_PATH} fill={color} />
|
|
17
|
+
</svg>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { CAMERA_FILLED_PATH } from "./cameraFilledPath";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export const CAMERA_FILLED_PATH =
|
|
2
|
+
"M25.3327 8.66605H23.626L23.1993 7.33271C22.9228 6.55035 22.4097 5.87338 21.7312 5.39559C21.0528 4.9178 20.2425 4.66285 19.4127 4.66605H12.586C11.7481 4.66761 10.9318 4.93229 10.2524 5.42272C9.57295 5.91315 9.06469 6.60456 8.79935 7.39938L8.37268 8.73271H6.66602C5.60515 8.73271 4.58773 9.15414 3.83759 9.90428C3.08744 10.6544 2.66602 11.6718 2.66602 12.7327V23.3994C2.66602 24.4602 3.08744 25.4777 3.83759 26.2278C4.58773 26.978 5.60515 27.3994 6.66602 27.3994H25.3327C26.3935 27.3994 27.411 26.978 28.1611 26.2278C28.9113 25.4777 29.3327 24.4602 29.3327 23.3994V12.7327C29.3415 12.2018 29.2446 11.6745 29.0476 11.1815C28.8505 10.6885 28.5573 10.2396 28.1849 9.86109C27.8126 9.48256 27.3687 9.18195 26.879 8.97678C26.3893 8.7716 25.8636 8.66597 25.3327 8.66605ZM26.666 23.3327C26.666 23.6863 26.5255 24.0255 26.2755 24.2755C26.0254 24.5256 25.6863 24.666 25.3327 24.666H6.66602C6.31239 24.666 5.97326 24.5256 5.72321 24.2755C5.47316 24.0255 5.33268 23.6863 5.33268 23.3327V12.666C5.33268 12.3124 5.47316 11.9733 5.72321 11.7232C5.97326 11.4732 6.31239 11.3327 6.66602 11.3327H9.33268C9.62344 11.3479 9.91117 11.2675 10.1519 11.1038C10.3927 10.94 10.5732 10.702 10.666 10.426L11.386 8.23938C11.4755 7.97455 11.6459 7.74453 11.8732 7.58183C12.1005 7.41914 12.3732 7.33199 12.6527 7.33271H19.4793C19.7589 7.33199 20.0316 7.41914 20.2589 7.58183C20.4862 7.74453 20.6566 7.97455 20.746 8.23938L21.466 10.426C21.5516 10.6804 21.7119 10.903 21.926 11.0647C22.1401 11.2265 22.398 11.3199 22.666 11.3327H25.3327C25.6863 11.3327 26.0254 11.4732 26.2755 11.7232C26.5255 11.9733 26.666 12.3124 26.666 12.666V23.3327ZM15.9993 11.3327C14.9445 11.3327 13.9134 11.6455 13.0363 12.2315C12.1592 12.8176 11.4757 13.6505 11.072 14.6251C10.6683 15.5996 10.5627 16.672 10.7685 17.7065C10.9743 18.7411 11.4822 19.6914 12.2281 20.4373C12.974 21.1832 13.9243 21.6911 14.9589 21.8969C15.9934 22.1027 17.0658 21.9971 18.0403 21.5934C19.0149 21.1897 19.8478 20.5061 20.4339 19.6291C21.0199 18.752 21.3327 17.7209 21.3327 16.666C21.3327 15.2516 20.7708 13.895 19.7706 12.8948C18.7704 11.8946 17.4138 11.3327 15.9993 11.3327ZM15.9993 19.3327C15.4719 19.3327 14.9564 19.1763 14.5178 18.8833C14.0793 18.5903 13.7375 18.1738 13.5357 17.6865C13.3338 17.1993 13.281 16.6631 13.3839 16.1458C13.4868 15.6285 13.7408 15.1534 14.1137 14.7804C14.4867 14.4075 14.9618 14.1535 15.4791 14.0506C15.9964 13.9477 16.5326 14.0005 17.0198 14.2024C17.5071 14.4042 17.9236 14.746 18.2166 15.1845C18.5096 15.6231 18.666 16.1386 18.666 16.666C18.666 17.3733 18.3851 18.0516 17.885 18.5517C17.3849 19.0518 16.7066 19.3327 15.9993 19.3327Z";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CameraFilledIcon, CAMERA_FILLED_PATH } from "./CameraFilledIcon";
|
|
@@ -3,9 +3,9 @@ import { colors } from "../../theme";
|
|
|
3
3
|
import type { IconProps } from "../types";
|
|
4
4
|
import { GLOBE_PATH } from "./globePath";
|
|
5
5
|
|
|
6
|
-
export function GlobeIcon({ size =
|
|
6
|
+
export function GlobeIcon({ size = 16, color = colors.primary, strokeWidth = 1.5 }: IconProps) {
|
|
7
7
|
return (
|
|
8
|
-
<Svg width={size} height={size} viewBox="0 0
|
|
8
|
+
<Svg width={size} height={size} viewBox="0 0 16 16" fill="none">
|
|
9
9
|
<Path
|
|
10
10
|
d={GLOBE_PATH}
|
|
11
11
|
stroke={color}
|
|
@@ -2,12 +2,12 @@ import { colors } from "../../theme";
|
|
|
2
2
|
import type { IconProps } from "../types";
|
|
3
3
|
import { GLOBE_PATH } from "./globePath";
|
|
4
4
|
|
|
5
|
-
export function GlobeIcon({ size =
|
|
5
|
+
export function GlobeIcon({ size = 16, color = colors.primary, strokeWidth = 1.5 }: IconProps) {
|
|
6
6
|
return (
|
|
7
7
|
<svg
|
|
8
8
|
width={size}
|
|
9
9
|
height={size}
|
|
10
|
-
viewBox="0 0
|
|
10
|
+
viewBox="0 0 16 16"
|
|
11
11
|
fill="none"
|
|
12
12
|
xmlns="http://www.w3.org/2000/svg"
|
|
13
13
|
aria-hidden
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/** Globe paths —
|
|
1
|
+
/** Globe paths — 16×16 viewBox. */
|
|
2
2
|
export const GLOBE_PATH =
|
|
3
|
-
"
|
|
3
|
+
"M1.3335 8.00004H14.6668M1.3335 8.00004C1.3335 11.6819 4.31826 14.6667 8.00016 14.6667M1.3335 8.00004C1.3335 4.31814 4.31826 1.33337 8.00016 1.33337M14.6668 8.00004C14.6668 11.6819 11.6821 14.6667 8.00016 14.6667M14.6668 8.00004C14.6668 4.31814 11.6821 1.33337 8.00016 1.33337M8.00016 1.33337C9.66768 3.15894 10.6153 5.52806 10.6668 8.00004C10.6153 10.472 9.66768 12.8411 8.00016 14.6667M8.00016 1.33337C6.33264 3.15894 5.38499 5.52806 5.3335 8.00004C5.38499 10.472 6.33264 12.8411 8.00016 14.6667";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import Svg, { Path } from "react-native-svg";
|
|
2
|
+
import type { IconProps } from "../types";
|
|
3
|
+
import { HEADSET_MIC_PATH, HEADSET_PATH } from "./headsetPath";
|
|
4
|
+
|
|
5
|
+
export function HeadsetIcon({ size = 24, color = "#B76533", strokeWidth = 2 }: IconProps) {
|
|
6
|
+
return (
|
|
7
|
+
<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
8
|
+
<Path
|
|
9
|
+
d={HEADSET_PATH}
|
|
10
|
+
stroke={color}
|
|
11
|
+
strokeWidth={strokeWidth}
|
|
12
|
+
strokeLinecap="round"
|
|
13
|
+
strokeLinejoin="round"
|
|
14
|
+
/>
|
|
15
|
+
<Path
|
|
16
|
+
d={HEADSET_MIC_PATH}
|
|
17
|
+
stroke={color}
|
|
18
|
+
strokeWidth={strokeWidth}
|
|
19
|
+
strokeLinecap="round"
|
|
20
|
+
strokeLinejoin="round"
|
|
21
|
+
/>
|
|
22
|
+
</Svg>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { HEADSET_MIC_PATH, HEADSET_PATH } from "./headsetPath";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { IconProps } from "../types";
|
|
2
|
+
import { HEADSET_MIC_PATH, HEADSET_PATH } from "./headsetPath";
|
|
3
|
+
|
|
4
|
+
export function HeadsetIcon({ size = 24, color = "#B76533", strokeWidth = 2 }: IconProps) {
|
|
5
|
+
return (
|
|
6
|
+
<svg width={size} height={size} viewBox="0 0 24 24" fill="none" aria-hidden>
|
|
7
|
+
<path
|
|
8
|
+
d={HEADSET_PATH}
|
|
9
|
+
stroke={color}
|
|
10
|
+
strokeWidth={strokeWidth}
|
|
11
|
+
strokeLinecap="round"
|
|
12
|
+
strokeLinejoin="round"
|
|
13
|
+
/>
|
|
14
|
+
<path
|
|
15
|
+
d={HEADSET_MIC_PATH}
|
|
16
|
+
stroke={color}
|
|
17
|
+
strokeWidth={strokeWidth}
|
|
18
|
+
strokeLinecap="round"
|
|
19
|
+
strokeLinejoin="round"
|
|
20
|
+
/>
|
|
21
|
+
</svg>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { HEADSET_MIC_PATH, HEADSET_PATH } from "./headsetPath";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Headset / support hours — viewBox 0 0 24 24. */
|
|
2
|
+
export const HEADSET_PATH =
|
|
3
|
+
"M3 11H6C6.53043 11 7.03914 11.2107 7.41421 11.5858C7.78929 11.9609 8 12.4696 8 13V16C8 16.5304 7.78929 17.0391 7.41421 17.4142C7.03914 17.7893 6.53043 18 6 18H5C4.46957 18 3.96086 17.7893 3.58579 17.4142C3.21071 17.0391 3 16.5304 3 16V11ZM3 11C3 9.8181 3.23279 8.64778 3.68508 7.55585C4.13738 6.46392 4.80031 5.47177 5.63604 4.63604C6.47177 3.80031 7.46392 3.13738 8.55585 2.68508C9.64778 2.23279 10.8181 2 12 2C13.1819 2 14.3522 2.23279 15.4442 2.68508C16.5361 3.13738 17.5282 3.80031 18.364 4.63604C19.1997 5.47177 19.8626 6.46392 20.3149 7.55585C20.7672 8.64778 21 9.8181 21 11M21 11V16C21 16.5304 20.7893 17.0391 20.4142 17.4142C20.0391 17.7893 19.5304 18 19 18H18C17.4696 18 16.9609 17.7893 16.5858 17.4142C16.2107 17.0391 16 16.5304 16 16V13C16 12.4696 16.2107 11.9609 16.5858 11.5858C16.9609 11.2107 17.4696 11 18 11H21Z";
|
|
4
|
+
|
|
5
|
+
export const HEADSET_MIC_PATH =
|
|
6
|
+
"M21 16V18C21 19.0609 20.5786 20.0783 19.8284 20.8284C19.0783 21.5786 18.0609 22 17 22H12";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { HeadsetIcon, HEADSET_MIC_PATH, HEADSET_PATH } from "./HeadsetIcon";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Svg, { Path } from "react-native-svg";
|
|
2
|
+
import { HIDE_PATH } from "./hidePath";
|
|
3
|
+
import { colors } from "../../theme";
|
|
4
|
+
import type { IconProps } from "../types";
|
|
5
|
+
|
|
6
|
+
export { HIDE_PATH } from "./hidePath";
|
|
7
|
+
|
|
8
|
+
/** Native — react-native-svg (peer dependency). */
|
|
9
|
+
export function HideIcon({ size = 24, color = colors.primary, strokeWidth = 2 }: IconProps) {
|
|
10
|
+
return (
|
|
11
|
+
<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
12
|
+
<Path
|
|
13
|
+
d={HIDE_PATH}
|
|
14
|
+
stroke={color}
|
|
15
|
+
strokeWidth={strokeWidth}
|
|
16
|
+
strokeLinecap="round"
|
|
17
|
+
strokeLinejoin="round"
|
|
18
|
+
/>
|
|
19
|
+
</Svg>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { HIDE_PATH } from "./hidePath";
|
|
2
|
+
import { colors } from "../../theme";
|
|
3
|
+
import type { IconProps } from "../types";
|
|
4
|
+
|
|
5
|
+
/** Web / Storybook — plain SVG (no react-native-svg). */
|
|
6
|
+
export function HideIcon({ size = 24, color = colors.primary, strokeWidth = 2 }: IconProps) {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
width={size}
|
|
10
|
+
height={size}
|
|
11
|
+
viewBox="0 0 24 24"
|
|
12
|
+
fill="none"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
aria-hidden
|
|
15
|
+
>
|
|
16
|
+
<path
|
|
17
|
+
d={HIDE_PATH}
|
|
18
|
+
stroke={color}
|
|
19
|
+
strokeWidth={strokeWidth}
|
|
20
|
+
strokeLinecap="round"
|
|
21
|
+
strokeLinejoin="round"
|
|
22
|
+
/>
|
|
23
|
+
</svg>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { HIDE_PATH } from "./hidePath";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Hide (eye-off) icon path — 24×24 viewBox. */
|
|
2
|
+
export const HIDE_PATH =
|
|
3
|
+
"M10.7429 5.09232C11.1494 5.03223 11.5686 5 12.0004 5C17.1054 5 20.4553 9.50484 21.5807 11.2868C21.7169 11.5025 21.785 11.6103 21.8231 11.7767C21.8518 11.9016 21.8517 12.0987 21.8231 12.2236C21.7849 12.3899 21.7164 12.4985 21.5792 12.7156C21.2793 13.1901 20.8222 13.8571 20.2165 14.5805M6.72432 6.71504C4.56225 8.1817 3.09445 10.2194 2.42111 11.2853C2.28428 11.5019 2.21587 11.6102 2.17774 11.7765C2.1491 11.9014 2.14909 12.0984 2.17771 12.2234C2.21583 12.3897 2.28393 12.4975 2.42013 12.7132C3.54554 14.4952 6.89541 19 12.0004 19C14.0588 19 15.8319 18.2676 17.2888 17.2766M3.00042 3L21.0004 21M9.8791 9.87868C9.3362 10.4216 9.00042 11.1716 9.00042 12C9.00042 13.6569 10.3436 15 12.0004 15C12.8288 15 13.5788 14.6642 14.1217 14.1213";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { HideIcon, HIDE_PATH } from "./HideIcon";
|
package/src/icons/Key/keyPath.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const KEY_PATH =
|
|
2
|
-
"
|
|
2
|
+
"M14.1668 8.33333V6.66667C14.1668 4.36548 12.3013 2.5 10.0002 2.5C7.69898 2.5 5.8335 4.36548 5.8335 6.66667V8.33333M10.0002 12.0833V13.75M7.3335 17.5H12.6668C14.067 17.5 14.767 17.5 15.3018 17.2275C15.7722 16.9878 16.1547 16.6054 16.3943 16.135C16.6668 15.6002 16.6668 14.9001 16.6668 13.5V12.3333C16.6668 10.9332 16.6668 10.2331 16.3943 9.69836C16.1547 9.22795 15.7722 8.8455 15.3018 8.60582C14.767 8.33333 14.067 8.33333 12.6668 8.33333H7.3335C5.93336 8.33333 5.2333 8.33333 4.69852 8.60582C4.22811 8.8455 3.84566 9.22795 3.60598 9.69836C3.3335 10.2331 3.3335 10.9332 3.3335 12.3333V13.5C3.3335 14.9001 3.3335 15.6002 3.60598 16.135C3.84566 16.6054 4.22811 16.9878 4.69852 17.2275C5.2333 17.5 5.93336 17.5 7.3335 17.5Z";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import Svg, { Path } from "react-native-svg";
|
|
2
|
+
import { MENU_LINES_PATH } from "./menuLinesPath";
|
|
3
|
+
import { colors } from "../../theme";
|
|
4
|
+
import type { IconProps } from "../types";
|
|
5
|
+
|
|
6
|
+
export { MENU_LINES_PATH } from "./menuLinesPath";
|
|
7
|
+
|
|
8
|
+
export function MenuLinesIcon({ size = 28, color = colors.white, strokeWidth = 2 }: IconProps) {
|
|
9
|
+
return (
|
|
10
|
+
<Svg width={size} height={size} viewBox="0 0 28 28" fill="none">
|
|
11
|
+
<Path
|
|
12
|
+
d={MENU_LINES_PATH}
|
|
13
|
+
stroke={color}
|
|
14
|
+
strokeWidth={strokeWidth}
|
|
15
|
+
strokeLinecap="round"
|
|
16
|
+
strokeLinejoin="round"
|
|
17
|
+
/>
|
|
18
|
+
</Svg>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { MENU_LINES_PATH } from "./menuLinesPath";
|
|
2
|
+
import { colors } from "../../theme";
|
|
3
|
+
import type { IconProps } from "../types";
|
|
4
|
+
|
|
5
|
+
export function MenuLinesIcon({ size = 28, color = colors.white, strokeWidth = 2 }: IconProps) {
|
|
6
|
+
return (
|
|
7
|
+
<svg
|
|
8
|
+
width={size}
|
|
9
|
+
height={size}
|
|
10
|
+
viewBox="0 0 28 28"
|
|
11
|
+
fill="none"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
aria-hidden
|
|
14
|
+
>
|
|
15
|
+
<path
|
|
16
|
+
d={MENU_LINES_PATH}
|
|
17
|
+
stroke={color}
|
|
18
|
+
strokeWidth={strokeWidth}
|
|
19
|
+
strokeLinecap="round"
|
|
20
|
+
strokeLinejoin="round"
|
|
21
|
+
/>
|
|
22
|
+
</svg>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { MENU_LINES_PATH } from "./menuLinesPath";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MenuLinesIcon, MENU_LINES_PATH } from "./MenuLinesIcon";
|