@coinbase/cds-mobile 8.37.1 → 8.38.1

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dts/alpha/select/DefaultSelectControl.d.ts +9 -1
  3. package/dts/alpha/select/DefaultSelectControl.d.ts.map +1 -1
  4. package/dts/alpha/select/Select.d.ts.map +1 -1
  5. package/dts/alpha/select/types.d.ts +15 -1
  6. package/dts/alpha/select/types.d.ts.map +1 -1
  7. package/dts/controls/InputStack.d.ts +10 -0
  8. package/dts/controls/InputStack.d.ts.map +1 -1
  9. package/dts/controls/TextInput.d.ts.map +1 -1
  10. package/dts/hooks/useInputBorderStyle.d.ts +10 -4
  11. package/dts/hooks/useInputBorderStyle.d.ts.map +1 -1
  12. package/esm/alpha/combobox/__stories__/Combobox.stories.js +32 -0
  13. package/esm/alpha/select/DefaultSelectControl.js +7 -2
  14. package/esm/alpha/select/Select.js +3 -1
  15. package/esm/alpha/select/__stories__/AlphaSelect.stories.js +32 -0
  16. package/esm/cards/__figma__/AnnouncementCard.figma.js +1 -0
  17. package/esm/chips/__figma__/InputChip.figma.js +10 -9
  18. package/esm/chips/__figma__/SelectChip.figma.js +7 -8
  19. package/esm/controls/InputStack.js +28 -16
  20. package/esm/controls/TextInput.js +17 -12
  21. package/esm/controls/__figma__/CheckboxCell.figma.js +2 -2
  22. package/esm/controls/__figma__/RadioCell.figma.js +43 -3
  23. package/esm/controls/__figma__/RadioGroup.figma.js +1 -1
  24. package/esm/controls/__stories__/TextInput.stories.js +80 -5
  25. package/esm/dates/__stories__/DateInput.stories.js +68 -1
  26. package/esm/dates/__stories__/DatePicker.stories.js +62 -1
  27. package/esm/hooks/useInputBorderStyle.js +24 -11
  28. package/esm/navigation/__figma__/TopNavBar.figma.js +71 -64
  29. package/esm/overlays/tray/__figma__/Tray.figma.js +28 -31
  30. package/esm/system/__figma__/AndroidNavigationBar.figma.js +1 -0
  31. package/package.json +2 -3
@@ -4,7 +4,7 @@ import { figma } from '@figma/code-connect';
4
4
  import { CheckboxCell } from '../CheckboxCell';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  figma.connect(CheckboxCell, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E2%9C%A8-CDS-Components?node-id=54927-2772&t=pdfsCDffPYWTRujC-4', {
7
- imports: ["import { CheckboxCell } from '@coinbase/cds-web/controls/CheckboxCell'"],
7
+ imports: ["import { CheckboxCell } from '@coinbase/cds-mobile/controls/CheckboxCell'"],
8
8
  props: {
9
9
  title: figma.string('title text'),
10
10
  description: figma.boolean('description', {
@@ -18,7 +18,7 @@ figma.connect(CheckboxCell, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g
18
18
  }
19
19
  });
20
20
  figma.connect(CheckboxCell, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E2%9C%A8-CDS-Components?node-id=54927-2772&t=pdfsCDffPYWTRujC-4', {
21
- imports: ["import { CheckboxCell } from '@coinbase/cds-web/controls/CheckboxCell'"],
21
+ imports: ["import { CheckboxCell } from '@coinbase/cds-mobile/controls/CheckboxCell'"],
22
22
  variant: {
23
23
  state: 'selected'
24
24
  },
@@ -4,7 +4,7 @@ import { figma } from '@figma/code-connect';
4
4
  import { RadioCell } from '../RadioCell';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  figma.connect(RadioCell, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E2%9C%A8-CDS-Components?node-id=54927-2624', {
7
- imports: ["import { RadioCell } from '@coinbase/cds-web/controls/RadioCell'"],
7
+ imports: ["import { RadioCell } from '@coinbase/cds-mobile/controls/RadioCell'"],
8
8
  props: {
9
9
  title: figma.string('title text'),
10
10
  description: figma.boolean('description', {
@@ -18,9 +18,9 @@ figma.connect(RadioCell, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E
18
18
  }
19
19
  });
20
20
  figma.connect(RadioCell, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E2%9C%A8-CDS-Components?node-id=54927-2624', {
21
- imports: ["import { RadioCell } from '@coinbase/cds-web/controls/RadioCell'"],
21
+ imports: ["import { RadioCell } from '@coinbase/cds-mobile/controls/RadioCell'"],
22
22
  variant: {
23
- state: 'selected'
23
+ selected: true
24
24
  },
25
25
  props: {
26
26
  title: figma.string('title text'),
@@ -35,4 +35,44 @@ figma.connect(RadioCell, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E
35
35
  checked: true
36
36
  }, props));
37
37
  }
38
+ });
39
+ figma.connect(RadioCell, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E2%9C%A8-CDS-Components?node-id=54927-2624', {
40
+ imports: ["import { RadioCell } from '@coinbase/cds-mobile/controls/RadioCell'"],
41
+ variant: {
42
+ state: 'disabled'
43
+ },
44
+ props: {
45
+ title: figma.string('title text'),
46
+ description: figma.boolean('description', {
47
+ true: figma.string('description text'),
48
+ false: undefined
49
+ })
50
+ },
51
+ example: _ref3 => {
52
+ let props = _extends({}, (_objectDestructuringEmpty(_ref3), _ref3));
53
+ return /*#__PURE__*/_jsx(RadioCell, _extends({
54
+ disabled: true
55
+ }, props));
56
+ }
57
+ });
58
+ figma.connect(RadioCell, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E2%9C%A8-CDS-Components?node-id=54927-2624', {
59
+ imports: ["import { RadioCell } from '@coinbase/cds-mobile/controls/RadioCell'"],
60
+ variant: {
61
+ state: 'disabled',
62
+ selected: true
63
+ },
64
+ props: {
65
+ title: figma.string('title text'),
66
+ description: figma.boolean('description', {
67
+ true: figma.string('description text'),
68
+ false: undefined
69
+ })
70
+ },
71
+ example: _ref4 => {
72
+ let props = _extends({}, (_objectDestructuringEmpty(_ref4), _ref4));
73
+ return /*#__PURE__*/_jsx(RadioCell, _extends({
74
+ checked: true,
75
+ disabled: true
76
+ }, props));
77
+ }
38
78
  });
@@ -5,7 +5,7 @@ import { Radio } from '../Radio';
5
5
  import { RadioGroup } from '../RadioGroup';
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  figma.connect(RadioGroup, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=355-14414&m=dev', {
8
- imports: ["import { ControlGroup } from '@coinbase/cds-web/controls/ControlGroup';", "import { Radio } from '@coinbase/cds-web/controls/Radio';"],
8
+ imports: ["import { ControlGroup } from '@coinbase/cds-mobile/controls/ControlGroup';", "import { Radio } from '@coinbase/cds-mobile/controls/Radio';"],
9
9
  props: {
10
10
  options: figma.enum('quantity', {
11
11
  '1': [{
@@ -249,6 +249,26 @@ const InputScreen = () => {
249
249
  label: "Search",
250
250
  placeholder: "ex. Bitcoin"
251
251
  })
252
+ }), /*#__PURE__*/_jsxs(Example, {
253
+ inline: true,
254
+ title: "TextInput start icon",
255
+ children: [/*#__PURE__*/_jsx(MockTextInput, {
256
+ helperText: "Search for assets here",
257
+ label: "Search",
258
+ placeholder: "ex. Bitcoin",
259
+ start: /*#__PURE__*/_jsx(InputIconButton, {
260
+ transparent: true,
261
+ name: "search"
262
+ })
263
+ }), /*#__PURE__*/_jsx(MockTextInput, {
264
+ helperText: "Search for assets here",
265
+ label: "Search",
266
+ placeholder: "ex. Bitcoin",
267
+ start: /*#__PURE__*/_jsx(InputIconButton, {
268
+ transparent: true,
269
+ name: "search"
270
+ })
271
+ })]
252
272
  }), /*#__PURE__*/_jsx(Example, {
253
273
  inline: true,
254
274
  title: "TextInput start/end Node",
@@ -539,11 +559,11 @@ const InputScreen = () => {
539
559
  placeholder: "Enter your favorite color",
540
560
  variant: "negative"
541
561
  })
542
- }), /*#__PURE__*/_jsx(Example, {
562
+ }), /*#__PURE__*/_jsxs(Example, {
543
563
  inline: true,
544
- title: "TextInput with labelNode",
545
- children: /*#__PURE__*/_jsx(MockTextInput, {
546
- label: "Display name",
564
+ title: "TextInput with custom label",
565
+ children: [/*#__PURE__*/_jsx(MockTextInput, {
566
+ accessibilityLabel: "Display name",
547
567
  labelNode: /*#__PURE__*/_jsxs(HStack, {
548
568
  alignItems: "center",
549
569
  gap: 1,
@@ -560,7 +580,62 @@ const InputScreen = () => {
560
580
  })]
561
581
  }),
562
582
  placeholder: "Satoshi Nakamoto"
563
- })
583
+ }), /*#__PURE__*/_jsx(MockCompactTextInput, {
584
+ accessibilityLabel: "Amount",
585
+ labelNode: /*#__PURE__*/_jsxs(HStack, {
586
+ alignItems: "center",
587
+ gap: 0.5,
588
+ children: [/*#__PURE__*/_jsx(InputLabel, {
589
+ children: "Amount"
590
+ }), /*#__PURE__*/_jsx(Text, {
591
+ color: "fgNegative",
592
+ font: "label1",
593
+ children: "*"
594
+ })]
595
+ }),
596
+ placeholder: "0.00",
597
+ suffix: "USD"
598
+ }), /*#__PURE__*/_jsx(MockCompactTextInput, {
599
+ accessibilityLabel: "Search",
600
+ labelNode: /*#__PURE__*/_jsx(VStack, {
601
+ justifyContent: "center",
602
+ children: /*#__PURE__*/_jsx(InputLabel, {
603
+ children: "Search"
604
+ })
605
+ }),
606
+ placeholder: "Search...",
607
+ start: /*#__PURE__*/_jsx(InputIconButton, {
608
+ transparent: true,
609
+ name: "search"
610
+ })
611
+ }), /*#__PURE__*/_jsx(MockTextInput, {
612
+ accessibilityLabel: "Bio",
613
+ labelNode: /*#__PURE__*/_jsxs(HStack, {
614
+ alignItems: "center",
615
+ gap: 1,
616
+ children: [/*#__PURE__*/_jsx(InputLabel, {
617
+ paddingY: 0,
618
+ children: "Bio"
619
+ }), /*#__PURE__*/_jsx(Text, {
620
+ color: "fgMuted",
621
+ font: "legal",
622
+ children: "(optional)"
623
+ })]
624
+ }),
625
+ labelVariant: "inside",
626
+ placeholder: "Tell us about yourself"
627
+ }), /*#__PURE__*/_jsx(MockTextInput, {
628
+ accessibilityLabel: "Notes",
629
+ labelNode: /*#__PURE__*/_jsx(InputLabel, {
630
+ paddingY: 0,
631
+ children: "Notes"
632
+ }),
633
+ labelVariant: "inside",
634
+ placeholder: "Add a note",
635
+ start: /*#__PURE__*/_jsx(InputIcon, {
636
+ name: "pencil"
637
+ })
638
+ })]
564
639
  })]
565
640
  });
566
641
  };
@@ -6,9 +6,11 @@ import { Example, ExampleScreen } from '../../examples/ExampleScreen';
6
6
  import { Icon } from '../../icons';
7
7
  import { HStack } from '../../layout';
8
8
  import { Group } from '../../layout/Group';
9
+ import { VStack } from '../../layout/VStack';
9
10
  import { Tooltip } from '../../overlays';
10
11
  import { ThemeProvider } from '../../system/ThemeProvider';
11
12
  import { defaultTheme } from '../../themes/defaultTheme';
13
+ import { Text } from '../../typography/Text';
12
14
  import { DateInput } from '../DateInput';
13
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
16
  const today = new Date(new Date(2024, 7, 18).setHours(0, 0, 0, 0));
@@ -47,7 +49,7 @@ export const Examples = () => {
47
49
  })), /*#__PURE__*/_jsx(DateInput, _extends({}, sharedProps, props, {
48
50
  separator: "-"
49
51
  })), /*#__PURE__*/_jsx(DateInput, _extends({}, sharedProps, props, {
50
- label: "Date of birth",
52
+ accessibilityLabel: "Date of birth",
51
53
  labelNode: /*#__PURE__*/_jsxs(HStack, {
52
54
  alignItems: "center",
53
55
  gap: 1,
@@ -84,4 +86,69 @@ export const Examples = () => {
84
86
  })
85
87
  });
86
88
  };
89
+ export const CustomLabel = () => {
90
+ const [date, setDate] = useState(null);
91
+ const [error, setError] = useState(null);
92
+ const props = {
93
+ date,
94
+ onChangeDate: setDate,
95
+ error,
96
+ onErrorDate: setError
97
+ };
98
+ return /*#__PURE__*/_jsx(ExampleScreen, {
99
+ children: /*#__PURE__*/_jsx(Example, {
100
+ title: "DateInput with custom label",
101
+ children: /*#__PURE__*/_jsxs(VStack, {
102
+ gap: 2,
103
+ children: [/*#__PURE__*/_jsx(DateInput, _extends({}, sharedProps, props, {
104
+ accessibilityLabel: "Date of birth",
105
+ labelNode: /*#__PURE__*/_jsxs(HStack, {
106
+ alignItems: "center",
107
+ gap: 1,
108
+ children: [/*#__PURE__*/_jsx(InputLabel, {
109
+ children: "Date of birth"
110
+ }), /*#__PURE__*/_jsx(Tooltip, {
111
+ content: "This will be visible to other users.",
112
+ children: /*#__PURE__*/_jsx(Icon, {
113
+ color: "fgMuted",
114
+ name: "info",
115
+ size: "xs"
116
+ })
117
+ })]
118
+ })
119
+ })), /*#__PURE__*/_jsx(DateInput, _extends({
120
+ compact: true
121
+ }, sharedProps, props, {
122
+ accessibilityLabel: "Start date",
123
+ labelNode: /*#__PURE__*/_jsxs(HStack, {
124
+ alignItems: "center",
125
+ gap: 0.5,
126
+ children: [/*#__PURE__*/_jsx(InputLabel, {
127
+ children: "Start date"
128
+ }), /*#__PURE__*/_jsx(Text, {
129
+ color: "fgNegative",
130
+ font: "label1",
131
+ children: "*"
132
+ })]
133
+ })
134
+ })), /*#__PURE__*/_jsx(DateInput, _extends({}, sharedProps, props, {
135
+ accessibilityLabel: "End date",
136
+ labelNode: /*#__PURE__*/_jsxs(HStack, {
137
+ alignItems: "center",
138
+ gap: 1,
139
+ children: [/*#__PURE__*/_jsx(InputLabel, {
140
+ paddingY: 0,
141
+ children: "End date"
142
+ }), /*#__PURE__*/_jsx(Text, {
143
+ color: "fgMuted",
144
+ font: "legal",
145
+ children: "(optional)"
146
+ })]
147
+ }),
148
+ labelVariant: "inside"
149
+ }))]
150
+ })
151
+ })
152
+ });
153
+ };
87
154
  export default Examples;
@@ -5,7 +5,9 @@ import { TextInput } from '../../controls/TextInput';
5
5
  import { Example, ExampleScreen } from '../../examples/ExampleScreen';
6
6
  import { Icon } from '../../icons';
7
7
  import { HStack } from '../../layout';
8
+ import { VStack } from '../../layout/VStack';
8
9
  import { Tooltip } from '../../overlays/tooltip/Tooltip';
10
+ import { Text } from '../../typography/Text';
9
11
  import { DatePicker } from '../DatePicker';
10
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
13
  const today = new Date(new Date(2024, 7, 18).setHours(0, 0, 0, 0));
@@ -82,8 +84,8 @@ export const FullExample = () => {
82
84
  }), /*#__PURE__*/_jsx(Example, {
83
85
  title: "DatePicker with labelNode",
84
86
  children: /*#__PURE__*/_jsx(ExampleDatePicker, {
87
+ accessibilityLabel: "Birthdate",
85
88
  calendarIconButtonAccessibilityLabel: "Birthdate calendar",
86
- label: "Birthdate",
87
89
  labelNode: /*#__PURE__*/_jsxs(HStack, {
88
90
  alignItems: "center",
89
91
  gap: 1,
@@ -121,4 +123,63 @@ export const FullExample = () => {
121
123
  })]
122
124
  });
123
125
  };
126
+ export const CustomLabel = () => {
127
+ return /*#__PURE__*/_jsx(ExampleScreen, {
128
+ children: /*#__PURE__*/_jsx(Example, {
129
+ title: "DatePicker with custom label",
130
+ children: /*#__PURE__*/_jsxs(VStack, {
131
+ gap: 2,
132
+ children: [/*#__PURE__*/_jsx(ExampleDatePicker, {
133
+ accessibilityLabel: "Date of birth",
134
+ calendarIconButtonAccessibilityLabel: "Date of birth calendar",
135
+ labelNode: /*#__PURE__*/_jsxs(HStack, {
136
+ alignItems: "center",
137
+ gap: 1,
138
+ children: [/*#__PURE__*/_jsx(InputLabel, {
139
+ children: "Date of birth"
140
+ }), /*#__PURE__*/_jsx(Tooltip, {
141
+ content: "This will be visible to other users.",
142
+ children: /*#__PURE__*/_jsx(Icon, {
143
+ color: "fgMuted",
144
+ name: "info",
145
+ size: "xs"
146
+ })
147
+ })]
148
+ })
149
+ }), /*#__PURE__*/_jsx(ExampleDatePicker, {
150
+ compact: true,
151
+ accessibilityLabel: "Start date",
152
+ calendarIconButtonAccessibilityLabel: "Start date calendar",
153
+ labelNode: /*#__PURE__*/_jsxs(HStack, {
154
+ alignItems: "center",
155
+ gap: 0.5,
156
+ children: [/*#__PURE__*/_jsx(InputLabel, {
157
+ children: "Start date"
158
+ }), /*#__PURE__*/_jsx(Text, {
159
+ color: "fgNegative",
160
+ font: "label1",
161
+ children: "*"
162
+ })]
163
+ })
164
+ }), /*#__PURE__*/_jsx(ExampleDatePicker, {
165
+ accessibilityLabel: "End date",
166
+ calendarIconButtonAccessibilityLabel: "End date calendar",
167
+ labelNode: /*#__PURE__*/_jsxs(HStack, {
168
+ alignItems: "center",
169
+ gap: 1,
170
+ children: [/*#__PURE__*/_jsx(InputLabel, {
171
+ paddingY: 0,
172
+ children: "End date"
173
+ }), /*#__PURE__*/_jsx(Text, {
174
+ color: "fgMuted",
175
+ font: "legal",
176
+ children: "(optional)"
177
+ })]
178
+ }),
179
+ labelVariant: "inside"
180
+ })]
181
+ })
182
+ })
183
+ });
184
+ };
124
185
  export default FullExample;
@@ -1,18 +1,31 @@
1
1
  import { useEffect, useMemo } from 'react';
2
- import { inputBorderWidth } from '@coinbase/cds-common/tokens/input';
3
2
  import { useInputBorderAnimation } from './useInputBorderAnimation';
3
+ import { useTheme } from './useTheme';
4
4
 
5
5
  /**
6
+ * Hook for managing input border styles with animation support.
6
7
  *
7
- * @param focused
8
- * @param initialVariant
9
- * @param focusedVariant
10
- * @param bordered
8
+ * @param focused - Whether the input is currently focused
9
+ * @param initialVariant - The variant when unfocused
10
+ * @param focusedVariant - The variant when focused
11
+ * @param bordered - Whether to show a border when unfocused
12
+ * @param borderWidth - Width of the border (theme token). @default 100
13
+ * @param focusedBorderWidth - Additional border width when focused (theme token). @default borderWidth
11
14
  */
12
- export const useInputBorderStyle = function (focused, initialVariant, focusedVariant, bordered) {
15
+ export const useInputBorderStyle = function (focused, initialVariant, focusedVariant, bordered, borderWidth, focusedBorderWidth) {
13
16
  if (bordered === void 0) {
14
17
  bordered = true;
15
18
  }
19
+ if (borderWidth === void 0) {
20
+ borderWidth = bordered ? 100 : 0;
21
+ }
22
+ if (focusedBorderWidth === void 0) {
23
+ focusedBorderWidth = borderWidth;
24
+ }
25
+ const theme = useTheme();
26
+ const resolvedBorderWidth = theme.borderWidth[borderWidth];
27
+ const resolvedFocusedBorderWidth = theme.borderWidth[focusedBorderWidth];
28
+ const totalFocusBorderWidth = resolvedBorderWidth + resolvedFocusedBorderWidth;
16
29
  const {
17
30
  animateInputBorderIn,
18
31
  animateInputBorderOut,
@@ -25,18 +38,18 @@ export const useInputBorderStyle = function (focused, initialVariant, focusedVar
25
38
  const borderUnfocusedStyle = useMemo(() => {
26
39
  return {
27
40
  borderColor: focused ? focusedBorderRgba : initialVariant === 'secondary' ? 'transparent' : unFocusedBorderRgba,
28
- borderWidth: bordered ? inputBorderWidth : 0
41
+ borderWidth: resolvedBorderWidth
29
42
  };
30
- }, [focused, focusedBorderRgba, initialVariant, unFocusedBorderRgba, bordered]);
43
+ }, [focused, focusedBorderRgba, initialVariant, unFocusedBorderRgba, resolvedBorderWidth]);
31
44
 
32
- /** Border style for when input is focused */
45
+ /** Border style for when input is focused (overlay) */
33
46
  const borderFocusedStyle = useMemo(() => {
34
47
  return {
35
48
  opacity: focusedBorderOpacity,
36
49
  borderColor: focusedBorderRgba,
37
- borderWidth: bordered ? inputBorderWidth : 0
50
+ borderWidth: totalFocusBorderWidth
38
51
  };
39
- }, [focusedBorderOpacity, focusedBorderRgba, bordered]);
52
+ }, [focusedBorderOpacity, focusedBorderRgba, totalFocusBorderWidth]);
40
53
  useEffect(() => {
41
54
  if (focused) {
42
55
  animateInputBorderOut.stop();
@@ -1,6 +1,6 @@
1
1
  import { figma } from '@figma/code-connect';
2
2
  import { Divider, HStack, VStack } from '../../layout';
3
- import { BrowserBar, BrowserBarSearchInput, NavBarIconButton, NavigationSubtitle, NavigationTitle, NavigationTitleSelect } from '../../navigation';
3
+ import { BrowserBar, BrowserBarSearchInput, NavigationSubtitle, NavigationTitle, NavigationTitleSelect } from '../../navigation';
4
4
  import { TopNavBar } from '../TopNavBar';
5
5
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
6
  figma.connect(TopNavBar, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E2%9C%A8-CDS-Components?node-id=49598-4137', {
@@ -15,27 +15,19 @@ figma.connect(TopNavBar, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E
15
15
  false: undefined
16
16
  }),
17
17
  startAction: figma.boolean('show left action', {
18
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
19
- name: "appSwitcher"
20
- }),
18
+ true: figma.instance('left action'),
21
19
  false: undefined
22
20
  }),
23
21
  endAction1: figma.boolean('show right action', {
24
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
25
- name: "more"
26
- }),
22
+ true: figma.instance('right action'),
27
23
  false: undefined
28
24
  }),
29
25
  endAction2: figma.boolean('show 2nd right action', {
30
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
31
- name: "gear"
32
- }),
26
+ true: figma.instance('2nd right action'),
33
27
  false: undefined
34
28
  }),
35
29
  endAction3: figma.boolean('show 3rd right action', {
36
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
37
- name: "share"
38
- }),
30
+ true: figma.instance('3rd right action'),
39
31
  false: undefined
40
32
  }),
41
33
  divider: figma.boolean('show divider', {
@@ -81,27 +73,19 @@ figma.connect(TopNavBar, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E
81
73
  props: {
82
74
  title: figma.string('↳ title'),
83
75
  startAction: figma.boolean('show left action', {
84
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
85
- name: "appSwitcher"
86
- }),
76
+ true: figma.instance('left action'),
87
77
  false: undefined
88
78
  }),
89
79
  endAction1: figma.boolean('show right action', {
90
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
91
- name: "more"
92
- }),
80
+ true: figma.instance('right action'),
93
81
  false: undefined
94
82
  }),
95
83
  endAction2: figma.boolean('show 2nd right action', {
96
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
97
- name: "gear"
98
- }),
84
+ true: figma.instance('2nd right action'),
99
85
  false: undefined
100
86
  }),
101
87
  endAction3: figma.boolean('show 3rd right action', {
102
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
103
- name: "share"
104
- }),
88
+ true: figma.instance('3rd right action'),
105
89
  false: undefined
106
90
  }),
107
91
  divider: figma.boolean('show divider', {
@@ -145,27 +129,19 @@ figma.connect(TopNavBar, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E
145
129
  imports: ["import { Divider } from '@coinbase/cds-mobile/layout/Divider';", "import { VStack } from '@coinbase/cds-mobile/layout/VStack';", "import { HStack } from '@coinbase/cds-mobile/layout/HStack';", "import { BrowserBar } from '@coinbase/cds-mobile/navigation/BrowserBar';", "import { BrowserBarSearchInput } from '@coinbase/cds-mobile/navigation/BrowserBarSearchInput';"],
146
130
  props: {
147
131
  startAction: figma.boolean('show left action', {
148
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
149
- name: "appSwitcher"
150
- }),
132
+ true: figma.instance('left action'),
151
133
  false: undefined
152
134
  }),
153
135
  endAction1: figma.boolean('show right action', {
154
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
155
- name: "more"
156
- }),
136
+ true: figma.instance('right action'),
157
137
  false: undefined
158
138
  }),
159
139
  endAction2: figma.boolean('show 2nd right action', {
160
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
161
- name: "gear"
162
- }),
140
+ true: figma.instance('2nd right action'),
163
141
  false: undefined
164
142
  }),
165
143
  endAction3: figma.boolean('show 3rd right action', {
166
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
167
- name: "share"
168
- }),
144
+ true: figma.instance('3rd right action'),
169
145
  false: undefined
170
146
  }),
171
147
  divider: figma.boolean('show divider', {
@@ -204,27 +180,19 @@ figma.connect(TopNavBar, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E
204
180
  imports: ["import { TopNavBar } from '@coinbase/cds-mobile/navigation/TopNavBar';", "import { Divider } from '@coinbase/cds-mobile/layout/Divider';", "import { VStack } from '@coinbase/cds-mobile/layout/VStack';", "import { HStack } from '@coinbase/cds-mobile/layout/HStack';"],
205
181
  props: {
206
182
  startAction: figma.boolean('show left action', {
207
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
208
- name: "appSwitcher"
209
- }),
183
+ true: figma.instance('left action'),
210
184
  false: undefined
211
185
  }),
212
186
  endAction1: figma.boolean('show right action', {
213
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
214
- name: "more"
215
- }),
187
+ true: figma.instance('right action'),
216
188
  false: undefined
217
189
  }),
218
190
  endAction2: figma.boolean('show 2nd right action', {
219
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
220
- name: "gear"
221
- }),
191
+ true: figma.instance('2nd right action'),
222
192
  false: undefined
223
193
  }),
224
194
  endAction3: figma.boolean('show 3rd right action', {
225
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
226
- name: "share"
227
- }),
195
+ true: figma.instance('3rd right action'),
228
196
  false: undefined
229
197
  }),
230
198
  divider: figma.boolean('show divider', {
@@ -254,33 +222,24 @@ figma.connect(TopNavBar, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E
254
222
  });
255
223
  figma.connect(TopNavBar, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E2%9C%A8-CDS-Components?node-id=49598-4137', {
256
224
  variant: {
257
- type: 'Market Selector'
225
+ type: 'stepper'
258
226
  },
259
227
  imports: ["import { TopNavBar } from '@coinbase/cds-mobile/navigation/TopNavBar';", "import { Divider } from '@coinbase/cds-mobile/layout/Divider';", "import { VStack } from '@coinbase/cds-mobile/layout/VStack';", "import { HStack } from '@coinbase/cds-mobile/layout/HStack';"],
260
228
  props: {
261
- children: figma.children('Market selector'),
262
229
  startAction: figma.boolean('show left action', {
263
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
264
- name: "appSwitcher"
265
- }),
230
+ true: figma.instance('left action'),
266
231
  false: undefined
267
232
  }),
268
233
  endAction1: figma.boolean('show right action', {
269
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
270
- name: "more"
271
- }),
234
+ true: figma.instance('right action'),
272
235
  false: undefined
273
236
  }),
274
237
  endAction2: figma.boolean('show 2nd right action', {
275
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
276
- name: "gear"
277
- }),
238
+ true: figma.instance('2nd right action'),
278
239
  false: undefined
279
240
  }),
280
241
  endAction3: figma.boolean('show 3rd right action', {
281
- true: /*#__PURE__*/_jsx(NavBarIconButton, {
282
- name: "share"
283
- }),
242
+ true: figma.instance('3rd right action'),
284
243
  false: undefined
285
244
  }),
286
245
  divider: figma.boolean('show divider', {
@@ -290,13 +249,61 @@ figma.connect(TopNavBar, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E
290
249
  },
291
250
  example: function Example(_ref5) {
292
251
  let {
293
- children,
294
252
  startAction,
295
253
  endAction1,
296
254
  endAction2,
297
255
  endAction3,
298
256
  divider
299
257
  } = _ref5;
258
+ return /*#__PURE__*/_jsxs(VStack, {
259
+ children: [/*#__PURE__*/_jsx(TopNavBar, {
260
+ end: /*#__PURE__*/_jsxs(HStack, {
261
+ alignItems: "center",
262
+ gap: 0.25,
263
+ children: [endAction3, endAction2, endAction1]
264
+ }),
265
+ start: startAction
266
+ }), divider]
267
+ });
268
+ }
269
+ });
270
+ figma.connect(TopNavBar, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E2%9C%A8-CDS-Components?node-id=49598-4137', {
271
+ variant: {
272
+ type: 'Market Selector'
273
+ },
274
+ imports: ["import { TopNavBar } from '@coinbase/cds-mobile/navigation/TopNavBar';", "import { Divider } from '@coinbase/cds-mobile/layout/Divider';", "import { VStack } from '@coinbase/cds-mobile/layout/VStack';", "import { HStack } from '@coinbase/cds-mobile/layout/HStack';"],
275
+ props: {
276
+ children: figma.children('SelectChip'),
277
+ startAction: figma.boolean('show left action', {
278
+ true: figma.instance('left action'),
279
+ false: undefined
280
+ }),
281
+ endAction1: figma.boolean('show right action', {
282
+ true: figma.instance('right action'),
283
+ false: undefined
284
+ }),
285
+ endAction2: figma.boolean('show 2nd right action', {
286
+ true: figma.instance('2nd right action'),
287
+ false: undefined
288
+ }),
289
+ endAction3: figma.boolean('show 3rd right action', {
290
+ true: figma.instance('3rd right action'),
291
+ false: undefined
292
+ }),
293
+ divider: figma.boolean('show divider', {
294
+ true: /*#__PURE__*/_jsx(Divider, {}),
295
+ false: undefined
296
+ })
297
+ },
298
+ example: function Example(_ref6) {
299
+ let {
300
+ children,
301
+ startAction,
302
+ endAction1,
303
+ endAction2,
304
+ endAction3,
305
+ divider
306
+ } = _ref6;
300
307
  return /*#__PURE__*/_jsxs(VStack, {
301
308
  children: [/*#__PURE__*/_jsx(TopNavBar, {
302
309
  end: /*#__PURE__*/_jsxs(HStack, {