nova-design-model-testing 0.0.1 → 0.0.3
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/guidelines/components/action-sheet.md +30 -0
- package/guidelines/components/avatar.md +30 -0
- package/guidelines/components/badge.md +45 -0
- package/guidelines/components/bottom-navigation.md +30 -0
- package/guidelines/components/bottom-sheet.md +30 -0
- package/guidelines/components/button-group.md +56 -0
- package/guidelines/components/button.md +76 -0
- package/guidelines/components/card.md +30 -0
- package/guidelines/components/checkbox.md +30 -0
- package/guidelines/components/chips.md +30 -0
- package/guidelines/components/confirm-sheet.md +30 -0
- package/guidelines/components/date-picker.md +30 -0
- package/guidelines/components/date-wheel.md +30 -0
- package/guidelines/components/icon.md +29 -0
- package/guidelines/components/inline-notification.md +30 -0
- package/guidelines/components/list-item.md +30 -0
- package/guidelines/components/list.md +30 -0
- package/guidelines/components/loading-indicator.md +30 -0
- package/guidelines/components/menu.md +57 -0
- package/guidelines/components/passcode.md +35 -0
- package/guidelines/components/radio.md +62 -0
- package/guidelines/components/tabs.md +30 -0
- package/guidelines/components/text-field.md +68 -0
- package/guidelines/components/toast.md +30 -0
- package/guidelines/components/toggle.md +30 -0
- package/guidelines/components/top-navigation.md +30 -0
- package/guidelines/foundations/colors.md +43 -0
- package/guidelines/foundations/radius.md +16 -0
- package/guidelines/foundations/spacing.md +16 -0
- package/guidelines/guidelines.md +36 -0
- package/guidelines/overview-components.md +16 -0
- package/guidelines/overview-icons.md +18 -0
- package/guidelines/overview-setup.md +15 -0
- package/package.json +1 -1
- package/public/vite.svg +1 -0
- package/src/App.css +42 -0
- package/src/App.jsx +6328 -0
- package/src/assets/fonts/inter_bold.otf +0 -0
- package/src/assets/fonts/inter_italic.otf +0 -0
- package/src/assets/fonts/inter_medium.otf +0 -0
- package/src/assets/fonts/inter_regular.otf +0 -0
- package/src/assets/fonts/inter_semi_bold.otf +0 -0
- package/src/assets/fonts/space_grotesk_bold.otf +0 -0
- package/src/assets/fonts/space_grotesk_medium.otf +0 -0
- package/src/assets/fonts/space_grotesk_regular.otf +0 -0
- package/src/assets/fonts/space_grotesk_semi_bold.otf +0 -0
- package/src/assets/icons/Style=Line-1.svg +5 -0
- package/src/assets/icons/Style=Line-2.svg +5 -0
- package/src/assets/icons/Style=Line-3.svg +5 -0
- package/src/assets/icons/Style=Line.svg +5 -0
- package/src/assets/icons/Style=Solid.svg +7 -0
- package/src/assets/icons/line/Style=Line-1.svg +5 -0
- package/src/assets/icons/line/Style=Line-2.svg +5 -0
- package/src/assets/icons/line/Style=Line-3.svg +5 -0
- package/src/assets/icons/line/Style=Line.svg +5 -0
- package/src/assets/icons/line/arrow_circle_down.svg +5 -0
- package/src/assets/icons/line/arrow_circle_down_left_ltr.svg +5 -0
- package/src/assets/icons/line/arrow_circle_down_right_ltr.svg +5 -0
- package/src/assets/icons/line/arrow_circle_left_ltr.svg +5 -0
- package/src/assets/icons/line/arrow_circle_right.svg +3 -0
- package/src/assets/icons/line/arrow_circle_right_ltr.svg +5 -0
- package/src/assets/icons/line/arrow_circle_up.svg +5 -0
- package/src/assets/icons/line/arrow_circle_up_left_ltr.svg +5 -0
- package/src/assets/icons/line/arrow_circle_up_right_ltr.svg +5 -0
- package/src/assets/icons/line/arrow_narrow_down.svg +5 -0
- package/src/assets/icons/line/arrow_narrow_down_left_ltr.svg +5 -0
- package/src/assets/icons/line/arrow_narrow_down_left_vturn.svg +5 -0
- package/src/assets/icons/line/arrow_narrow_down_right_ltr.svg +5 -0
- package/src/assets/icons/line/arrow_narrow_left_ltr.svg +5 -0
- package/src/assets/icons/line/arrow_narrow_up.svg +5 -0
- package/src/assets/icons/line/arrow_narrow_up_left_ltr.svg +5 -0
- package/src/assets/icons/line/arrow_narrow_up_right_ltr.svg +5 -0
- package/src/assets/icons/line/arrow_turn_down_right_ltr.svg +5 -0
- package/src/assets/icons/line/arrows_down.svg +5 -0
- package/src/assets/icons/line/arrows_left_ltr.svg +5 -0
- package/src/assets/icons/line/arrows_right_ltr.svg +5 -0
- package/src/assets/icons/line/arrows_up.svg +5 -0
- package/src/assets/icons/line/chevron-selector-vertical.svg +5 -0
- package/src/assets/icons/line/chevron_down.svg +5 -0
- package/src/assets/icons/line/chevron_down_double.svg +5 -0
- package/src/assets/icons/line/chevron_left_double_ltr.svg +5 -0
- package/src/assets/icons/line/chevron_left_ltr.svg +5 -0
- package/src/assets/icons/line/chevron_right_double_ltr.svg +5 -0
- package/src/assets/icons/line/chevron_right_ltr.svg +5 -0
- package/src/assets/icons/line/chevron_selector_vertical.svg +5 -0
- package/src/assets/icons/line/chevron_up.svg +5 -0
- package/src/assets/icons/line/chevron_up_double.svg +5 -0
- package/src/assets/icons/line/coin_swap.svg +3 -0
- package/src/assets/icons/line/credit_card_edit.svg +5 -0
- package/src/assets/icons/line/dev.svg +5 -0
- package/src/assets/icons/line/expand_01.svg +5 -0
- package/src/assets/icons/line/expand_02.svg +5 -0
- package/src/assets/icons/line/flip_backward_ltr.svg +5 -0
- package/src/assets/icons/line/flip_forward_ltr.svg +5 -0
- package/src/assets/icons/line/home_05.svg +3 -0
- package/src/assets/icons/line/infinity.svg +5 -0
- package/src/assets/icons/line/minimise.svg +6 -0
- package/src/assets/icons/line/moon_01.svg +3 -0
- package/src/assets/icons/line/paint.svg +3 -0
- package/src/assets/icons/line/plus_circle.svg +3 -0
- package/src/assets/icons/line/refresh.svg +5 -0
- package/src/assets/icons/line/reset.svg +5 -0
- package/src/assets/icons/line/reverse_left_ltr.svg +5 -0
- package/src/assets/icons/line/reverse_right_ltr.svg +5 -0
- package/src/assets/icons/line/safe_01.svg +3 -0
- package/src/assets/icons/line/search.svg +3 -0
- package/src/assets/icons/line/shield_star.svg +3 -0
- package/src/assets/icons/line/sun.svg +3 -0
- package/src/assets/icons/line/switch_horizontal.svg +5 -0
- package/src/assets/icons/line/switch_vertical.svg +5 -0
- package/src/assets/icons/solid/arrow_circle_right.svg +3 -0
- package/src/assets/icons/solid/coin_swap.svg +6 -0
- package/src/assets/icons/solid/credit_card_edit.svg +6 -0
- package/src/assets/icons/solid/safe_01.svg +5 -0
- package/src/assets/images/New user_gold.png +0 -0
- package/src/assets/images/Sheet-1.png +0 -0
- package/src/assets/images/Sheet.png +0 -0
- package/src/assets/logos/botim_credit_dark.svg +22 -0
- package/src/assets/logos/botim_credit_light.svg +31 -0
- package/src/assets/logos/botim_invest_dark.svg +22 -0
- package/src/assets/logos/botim_invest_light.svg +31 -0
- package/src/assets/logos/botim_main_dark.svg +18 -0
- package/src/assets/logos/botim_main_light.svg +17 -0
- package/src/assets/logos/botim_money_dark.svg +26 -0
- package/src/assets/logos/botim_money_light.svg +28 -0
- package/src/assets/logos/botim_pay_dark.svg +24 -0
- package/src/assets/logos/botim_pay_light.svg +35 -0
- package/src/assets/react.svg +1 -0
- package/src/design-system/components/action-sheet/ActionSheet.jsx +3 -0
- package/src/design-system/components/avatar/Avatar.jsx +3 -0
- package/src/design-system/components/badge/Badge.jsx +68 -0
- package/src/design-system/components/bottom-navigation/BottomNavigation.jsx +3 -0
- package/src/design-system/components/bottom-sheet/BottomSheet.jsx +3 -0
- package/src/design-system/components/button/Button.jsx +310 -0
- package/src/design-system/components/button-group/ButtonGroup.jsx +150 -0
- package/src/design-system/components/card/Card.jsx +3 -0
- package/src/design-system/components/checkbox/Checkbox.jsx +3 -0
- package/src/design-system/components/chips/Chips.jsx +3 -0
- package/src/design-system/components/confirm-sheet/ConfirmSheet.jsx +3 -0
- package/src/design-system/components/date-picker/DatePicker.jsx +3 -0
- package/src/design-system/components/date-wheel/DateWheel.jsx +3 -0
- package/src/design-system/components/digit-field/DigitField.jsx +191 -0
- package/src/design-system/components/icon/Icon.jsx +154 -0
- package/src/design-system/components/inline-notification/InlineNotification.jsx +3 -0
- package/src/design-system/components/list/List.jsx +3 -0
- package/src/design-system/components/list-item/ListItem.jsx +3 -0
- package/src/design-system/components/loading-indicator/LoadingIndicator.jsx +3 -0
- package/src/design-system/components/logo/AppLogo.jsx +35 -0
- package/src/design-system/components/logo/BrandingLogo.jsx +39 -0
- package/src/design-system/components/logo/Logo.jsx +39 -0
- package/src/design-system/components/menu/Menu.jsx +100 -0
- package/src/design-system/components/menu/MenuItem.jsx +184 -0
- package/src/design-system/components/passcode/Passcode.jsx +165 -0
- package/src/design-system/components/radio/Radio.jsx +135 -0
- package/src/design-system/components/section-header-footer/SectionHeaderFooter.jsx +7 -0
- package/src/design-system/components/tabs/Tabs.jsx +3 -0
- package/src/design-system/components/text-field/TextField.jsx +308 -0
- package/src/design-system/components/toast/Toast.jsx +3 -0
- package/src/design-system/components/toggle/Toggle.jsx +3 -0
- package/src/design-system/components/top-navigation/TopNavigation.jsx +3 -0
- package/src/design-system/theme/ThemeContext.jsx +11 -0
- package/src/design-system/tokens/primitives/colors.json +122 -0
- package/src/design-system/tokens/primitives/radius.json +9 -0
- package/src/design-system/tokens/primitives/sizes.json +10 -0
- package/src/design-system/tokens/primitives/spacing.json +10 -0
- package/src/design-system/tokens/semantic/colors.dark.json +139 -0
- package/src/design-system/tokens/semantic/colors.light.json +139 -0
- package/src/design-system/tokens/semantic/spacing.json +18 -0
- package/src/index.css +99 -0
- package/src/main.jsx +10 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Passcode
|
|
2
|
+
|
|
3
|
+
AI-ready documentation for passcode dots.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Passcode fields display masked digits as dots while a user types a numeric code.
|
|
8
|
+
|
|
9
|
+
## Configurable properties (from Figma)
|
|
10
|
+
|
|
11
|
+
| Property | Default value | Configurable values |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| State | Enabled | Enabled, Error, Disabled |
|
|
14
|
+
| Typing state | To type | To type, Typing, Typed |
|
|
15
|
+
|
|
16
|
+
## Layout & constraints
|
|
17
|
+
|
|
18
|
+
- Dot size: 16px
|
|
19
|
+
- Gap between dots: 24px
|
|
20
|
+
- Default length: 6 digits
|
|
21
|
+
|
|
22
|
+
## Design tokens
|
|
23
|
+
|
|
24
|
+
- Enabled idle: `background/neutral/tertiary`
|
|
25
|
+
- Enabled active: `text icon/functional/link`
|
|
26
|
+
- Error idle: `Input/error/bg`
|
|
27
|
+
- Error active: `text icon/functional/danger`
|
|
28
|
+
- Disabled idle: `background/neutral/disabled`
|
|
29
|
+
- Disabled active: `text icon/neutral/disabled`
|
|
30
|
+
|
|
31
|
+
## Behavior
|
|
32
|
+
|
|
33
|
+
- Clicking focuses the hidden input and enables typing.
|
|
34
|
+
- Dots fill as digits are entered.
|
|
35
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Radio
|
|
2
|
+
|
|
3
|
+
AI-ready documentation for the radio button component.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Radio buttons show a single-select choice with selected/unselected states.
|
|
8
|
+
|
|
9
|
+
## Configurable properties (from Figma)
|
|
10
|
+
|
|
11
|
+
| Property | Default value | Configurable values |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| Selected | true | true, false |
|
|
14
|
+
| State | Enabled | Enabled, Disabled |
|
|
15
|
+
|
|
16
|
+
## Layout & constraints
|
|
17
|
+
|
|
18
|
+
- Container size: 24px
|
|
19
|
+
- Indicator size: 20px
|
|
20
|
+
|
|
21
|
+
## Design tokens
|
|
22
|
+
|
|
23
|
+
- Enabled selected: `radio/active/selected`
|
|
24
|
+
- Enabled unselected: `radio/active/unselected`
|
|
25
|
+
- Disabled selected: `radio/disabled/selected`
|
|
26
|
+
- Disabled unselected: `radio/disabled/unselected`
|
|
27
|
+
|
|
28
|
+
## Behavior
|
|
29
|
+
|
|
30
|
+
- Clicking selects the radio.
|
|
31
|
+
- Disabled state blocks interaction.
|
|
32
|
+
|
|
33
|
+
# radio
|
|
34
|
+
|
|
35
|
+
## Overview
|
|
36
|
+
|
|
37
|
+
Describe the purpose of the component and where it is used.
|
|
38
|
+
|
|
39
|
+
## Anatomy
|
|
40
|
+
|
|
41
|
+
List the key parts and slots of the component.
|
|
42
|
+
|
|
43
|
+
## Usage guidelines
|
|
44
|
+
|
|
45
|
+
- When to use
|
|
46
|
+
- When not to use
|
|
47
|
+
|
|
48
|
+
## Behavior
|
|
49
|
+
|
|
50
|
+
Document states, interactions, and motion notes.
|
|
51
|
+
|
|
52
|
+
## Accessibility
|
|
53
|
+
|
|
54
|
+
Note keyboard, focus, and contrast requirements.
|
|
55
|
+
|
|
56
|
+
## Content guidelines
|
|
57
|
+
|
|
58
|
+
Provide copy and content rules.
|
|
59
|
+
|
|
60
|
+
## Do and don't
|
|
61
|
+
|
|
62
|
+
Add visuals or bullet lists for correct and incorrect usage.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# taUs
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Describe the purpose of the component and where it is used.
|
|
6
|
+
|
|
7
|
+
## Anatomy
|
|
8
|
+
|
|
9
|
+
List the key parts and slots of the component.
|
|
10
|
+
|
|
11
|
+
## Usage guidelines
|
|
12
|
+
|
|
13
|
+
- When to use
|
|
14
|
+
- When not to use
|
|
15
|
+
|
|
16
|
+
## Behavior
|
|
17
|
+
|
|
18
|
+
Document states, interactions, and motion notes.
|
|
19
|
+
|
|
20
|
+
## Accessibility
|
|
21
|
+
|
|
22
|
+
Note keyboard, focus, and contrast requirements.
|
|
23
|
+
|
|
24
|
+
## Content guidelines
|
|
25
|
+
|
|
26
|
+
Provide copy and content rules.
|
|
27
|
+
|
|
28
|
+
## Do and don't
|
|
29
|
+
|
|
30
|
+
Add visuals or bullet lists for correct and incorrect usage.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Text field
|
|
2
|
+
|
|
3
|
+
AI-ready documentation for the text field component and its nested slots.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Text fields collect short text input and can include labels, supporting text, prefix text, and an inline action.
|
|
8
|
+
|
|
9
|
+
## Anatomy
|
|
10
|
+
|
|
11
|
+
- Label area (label + optional)
|
|
12
|
+
- Text field base
|
|
13
|
+
- Leading icon slot
|
|
14
|
+
- Action button slot
|
|
15
|
+
- Prefix text
|
|
16
|
+
- Main text (hint or entered)
|
|
17
|
+
- Clear button (typing)
|
|
18
|
+
- Trailing icon slot
|
|
19
|
+
- Supporting text area
|
|
20
|
+
|
|
21
|
+
## Configurable properties (from Figma)
|
|
22
|
+
|
|
23
|
+
| Property | Default value | Configurable values |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| Show label area | true | true, false |
|
|
26
|
+
| Show supporting text area | true | true, false |
|
|
27
|
+
| State | Enabled | Enabled, Error, Disabled |
|
|
28
|
+
| Typing state | To type | To type, Typing, Typed |
|
|
29
|
+
|
|
30
|
+
## Nested properties
|
|
31
|
+
|
|
32
|
+
- `labelText` and `showOptional`
|
|
33
|
+
- `supportingText`
|
|
34
|
+
- `prefixText`, `hintText`, `valueText`
|
|
35
|
+
- `showLeadingIcon`, `showTrailingIcon`
|
|
36
|
+
- `showActionButton`, `actionLabel`, `showActionTrailingIcon`
|
|
37
|
+
- `showClearButton`
|
|
38
|
+
|
|
39
|
+
## Layout & constraints
|
|
40
|
+
|
|
41
|
+
- Base height: 48px
|
|
42
|
+
- Padding: 16px horizontal, 12px vertical
|
|
43
|
+
- Corner radius: 24px
|
|
44
|
+
- Gap between items: 8px
|
|
45
|
+
- Label/supporting text spacing: 8px
|
|
46
|
+
- Content should stay within the base container (no overflow).
|
|
47
|
+
|
|
48
|
+
## Design tokens
|
|
49
|
+
|
|
50
|
+
- Enabled background: `background/neutral/secondary`
|
|
51
|
+
- Typing background: `background/neutral/tertiary`
|
|
52
|
+
- Error background: `Input/error/bg`
|
|
53
|
+
- Disabled background: `background/neutral/disabled`
|
|
54
|
+
- Text: `text icon/neutral/primary`
|
|
55
|
+
- Placeholder: `text icon/neutral/placeholder`
|
|
56
|
+
- Supporting text: `text icon/neutral/secondary` or `text icon/functional/danger`
|
|
57
|
+
|
|
58
|
+
## Behavior
|
|
59
|
+
|
|
60
|
+
- “To type” shows hint text.
|
|
61
|
+
- “Typing” shows caret and clear button.
|
|
62
|
+
- “Typed” shows entered text without caret.
|
|
63
|
+
- Disabled state dims label, text, and action button.
|
|
64
|
+
|
|
65
|
+
## Accessibility
|
|
66
|
+
|
|
67
|
+
- Provide a visible label or aria-label.
|
|
68
|
+
- Ensure error supporting text describes how to fix the issue.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# toast
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Describe the purpose of the component and where it is used.
|
|
6
|
+
|
|
7
|
+
## Anatomy
|
|
8
|
+
|
|
9
|
+
List the key parts and slots of the component.
|
|
10
|
+
|
|
11
|
+
## Usage guidelines
|
|
12
|
+
|
|
13
|
+
- When to use
|
|
14
|
+
- When not to use
|
|
15
|
+
|
|
16
|
+
## Behavior
|
|
17
|
+
|
|
18
|
+
Document states, interactions, and motion notes.
|
|
19
|
+
|
|
20
|
+
## Accessibility
|
|
21
|
+
|
|
22
|
+
Note keyboard, focus, and contrast requirements.
|
|
23
|
+
|
|
24
|
+
## Content guidelines
|
|
25
|
+
|
|
26
|
+
Provide copy and content rules.
|
|
27
|
+
|
|
28
|
+
## Do and don't
|
|
29
|
+
|
|
30
|
+
Add visuals or bullet lists for correct and incorrect usage.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# toggle
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Describe the purpose of the component and where it is used.
|
|
6
|
+
|
|
7
|
+
## Anatomy
|
|
8
|
+
|
|
9
|
+
List the key parts and slots of the component.
|
|
10
|
+
|
|
11
|
+
## Usage guidelines
|
|
12
|
+
|
|
13
|
+
- When to use
|
|
14
|
+
- When not to use
|
|
15
|
+
|
|
16
|
+
## Behavior
|
|
17
|
+
|
|
18
|
+
Document states, interactions, and motion notes.
|
|
19
|
+
|
|
20
|
+
## Accessibility
|
|
21
|
+
|
|
22
|
+
Note keyboard, focus, and contrast requirements.
|
|
23
|
+
|
|
24
|
+
## Content guidelines
|
|
25
|
+
|
|
26
|
+
Provide copy and content rules.
|
|
27
|
+
|
|
28
|
+
## Do and don't
|
|
29
|
+
|
|
30
|
+
Add visuals or bullet lists for correct and incorrect usage.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# top navigation
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Describe the purpose of the component and where it is used.
|
|
6
|
+
|
|
7
|
+
## Anatomy
|
|
8
|
+
|
|
9
|
+
List the key parts and slots of the component.
|
|
10
|
+
|
|
11
|
+
## Usage guidelines
|
|
12
|
+
|
|
13
|
+
- When to use
|
|
14
|
+
- When not to use
|
|
15
|
+
|
|
16
|
+
## Behavior
|
|
17
|
+
|
|
18
|
+
Document states, interactions, and motion notes.
|
|
19
|
+
|
|
20
|
+
## Accessibility
|
|
21
|
+
|
|
22
|
+
Note keyboard, focus, and contrast requirements.
|
|
23
|
+
|
|
24
|
+
## Content guidelines
|
|
25
|
+
|
|
26
|
+
Provide copy and content rules.
|
|
27
|
+
|
|
28
|
+
## Do and don't
|
|
29
|
+
|
|
30
|
+
Add visuals or bullet lists for correct and incorrect usage.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Color Foundations
|
|
2
|
+
|
|
3
|
+
This foundation captures the *primitive* color palette from Figma. These values
|
|
4
|
+
are raw brand colors that will later map to semantic tokens (e.g. text, surface,
|
|
5
|
+
border, interactive). Keep primitives stable; only semantic tokens should change
|
|
6
|
+
when UI meaning or usage evolves.
|
|
7
|
+
|
|
8
|
+
## Source of truth
|
|
9
|
+
|
|
10
|
+
Primitives live in `src/design-system/tokens/primitives/colors.json`.
|
|
11
|
+
Semantic tokens live in:
|
|
12
|
+
|
|
13
|
+
- `src/design-system/tokens/semantic/colors.light.json`
|
|
14
|
+
- `src/design-system/tokens/semantic/colors.dark.json`
|
|
15
|
+
|
|
16
|
+
### How we use primitives
|
|
17
|
+
|
|
18
|
+
1. **Define primitives once** (this file) from Figma variables.
|
|
19
|
+
2. **Create semantic tokens** by mapping primitives to use-cases:
|
|
20
|
+
- `color.text.primary`
|
|
21
|
+
- `color.surface.neutral`
|
|
22
|
+
- `color.border.subtle`
|
|
23
|
+
- `color.interactive.primary`
|
|
24
|
+
3. **Component styles** consume semantic tokens only.
|
|
25
|
+
|
|
26
|
+
### Light and dark mode setup
|
|
27
|
+
|
|
28
|
+
- **Light mode** values are stored in `colors.light.json`.
|
|
29
|
+
- **Dark mode** values are stored in `colors.dark.json`.
|
|
30
|
+
- At runtime, we expose semantic tokens as CSS variables on `:root` (light) and
|
|
31
|
+
override them on `[data-theme="dark"]`. Components read the variables instead
|
|
32
|
+
of hardcoded hex values.
|
|
33
|
+
|
|
34
|
+
### Why this structure
|
|
35
|
+
|
|
36
|
+
- Aligns designers and devs on the same palette.
|
|
37
|
+
- Allows refactoring meaning without changing brand palette.
|
|
38
|
+
- Supports themes by remapping semantics, not primitives.
|
|
39
|
+
|
|
40
|
+
## Notes
|
|
41
|
+
|
|
42
|
+
- Opacity values are stored as hex with alpha (e.g. `#0505051a` for 10%).
|
|
43
|
+
- Figma variable names were normalized to camelCase keys for JSON.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Radius Foundation
|
|
2
|
+
|
|
3
|
+
Radius tokens define how rounded components and surfaces feel. Nova uses the
|
|
4
|
+
`radius-*` scale from Figma to keep the UI consistent.
|
|
5
|
+
|
|
6
|
+
## Rules
|
|
7
|
+
|
|
8
|
+
- Use `radius-xs`–`radius-md` for compact controls.
|
|
9
|
+
- Use `radius-lg`–`radius-xl` for cards and sheets.
|
|
10
|
+
- Use `radius-xxl` for hero surfaces and large containers.
|
|
11
|
+
|
|
12
|
+
## Examples
|
|
13
|
+
|
|
14
|
+
- Buttons: `radius-md`
|
|
15
|
+
- Cards: `radius-lg`
|
|
16
|
+
- Modals / sheets: `radius-xl`
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Spacing Foundation
|
|
2
|
+
|
|
3
|
+
Spacing tokens define the rhythm of layouts, padding, and gaps. Nova uses the
|
|
4
|
+
`space-*` scale from Figma to keep screens aligned and predictable.
|
|
5
|
+
|
|
6
|
+
## Rules
|
|
7
|
+
|
|
8
|
+
- Use only spacing tokens for padding and margins.
|
|
9
|
+
- Prefer smaller steps in dense UI, larger steps in marketing or empty layouts.
|
|
10
|
+
- Avoid custom pixel values unless documenting a new token.
|
|
11
|
+
|
|
12
|
+
## Examples
|
|
13
|
+
|
|
14
|
+
- Cards: use `md` or `lg` for internal padding.
|
|
15
|
+
- Lists: use `xs` or `sm` for vertical spacing between rows.
|
|
16
|
+
- Sections: use `xl`+ for separations between major blocks.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
This project has access to a custom Design System called Nova. Files in the guidelines directory show how to use Nova.
|
|
2
|
+
|
|
3
|
+
Always read:
|
|
4
|
+
- All files with a name that starts overview-
|
|
5
|
+
- All files in the guidelines/design-tokens folder
|
|
6
|
+
|
|
7
|
+
Read the files in the guidelines/components directory when you want to use the component with that name. For example, if you want to use Toast, read guidelines/components/toast.md. Additional context can be found by reading the code for the corresponding component in src/design-system/components/.
|
|
8
|
+
|
|
9
|
+
## Component Usage Guidelines - READ THIS FIRST
|
|
10
|
+
|
|
11
|
+
IMPORTANT: Always prefer to use components from Nova if they exist. For example, prefer to use a Button component from Nova, rather than regular button components.
|
|
12
|
+
|
|
13
|
+
IMPORTANT: Follow these steps IN ORDER before writing any code:
|
|
14
|
+
|
|
15
|
+
Step 1: Read Overview Files (REQUIRED)
|
|
16
|
+
Read ALL files with a name that starts with "overview-" in the guidelines directory:
|
|
17
|
+
- overview-setup.md
|
|
18
|
+
- overview-components.md
|
|
19
|
+
- overview-icons.md
|
|
20
|
+
(And any other overview-*.md files)
|
|
21
|
+
|
|
22
|
+
Step 2: Read Design Tokens (REQUIRED)
|
|
23
|
+
Read ALL files in the guidelines/design-tokens/ folder. Do NOT skip this step.
|
|
24
|
+
|
|
25
|
+
Step 3: Plan what components you need to use (REQUIRED)
|
|
26
|
+
|
|
27
|
+
Step 4: Read Component Guidelines BEFORE Using Components (REQUIRED)
|
|
28
|
+
BEFORE using ANY component, you MUST read its guidelines file first:
|
|
29
|
+
- Using Button? → Read guidelines/components/button.md FIRST
|
|
30
|
+
- Using Toast? → Read guidelines/components/toast.md FIRST
|
|
31
|
+
- Using TextField? → Read guidelines/components/text-field.md FIRST
|
|
32
|
+
|
|
33
|
+
Step 5: Plan what icons you need to use (REQUIRED)
|
|
34
|
+
Before using ANY icon, you must check to see if that icon exists in the Nova package. If it doesn't, pick a different icon and verify the new icon.
|
|
35
|
+
|
|
36
|
+
DO NOT write code using a component until you have read its specific guidelines.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Overview: Components
|
|
2
|
+
|
|
3
|
+
Nova provides a wide range of components to build consistent user interfaces.
|
|
4
|
+
|
|
5
|
+
## Available Components
|
|
6
|
+
All component guidelines can be found in `guidelines/components/`.
|
|
7
|
+
|
|
8
|
+
Key components include:
|
|
9
|
+
- Button
|
|
10
|
+
- TextField
|
|
11
|
+
- Toast
|
|
12
|
+
- Card
|
|
13
|
+
- Avatar
|
|
14
|
+
- And many more...
|
|
15
|
+
|
|
16
|
+
Always check the specific guideline file before using a component.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Overview: Icons
|
|
2
|
+
|
|
3
|
+
Nova uses a custom icon set. Icons are available as SVG files in `src/assets/icons/`.
|
|
4
|
+
|
|
5
|
+
## Icon Styles
|
|
6
|
+
- **Line**: Outline icons.
|
|
7
|
+
- **Solid**: Filled icons.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
Use the `Icon` component to render icons.
|
|
11
|
+
Example:
|
|
12
|
+
```jsx
|
|
13
|
+
import { Icon } from './design-system/components/icon/Icon';
|
|
14
|
+
|
|
15
|
+
<Icon name="search" style="line" />
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Before using an icon, verify its existence in `src/assets/icons/`.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Overview: Setup
|
|
2
|
+
|
|
3
|
+
Nova is the design system for this project. It is built with React and Tailwind CSS.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
The components are located in `src/design-system/components`.
|
|
7
|
+
Foundations are in `src/design-system/foundations`.
|
|
8
|
+
Tokens are in `src/design-system/tokens`.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
To use a component, import it from its directory in `src/design-system/components`.
|
|
12
|
+
Example:
|
|
13
|
+
```jsx
|
|
14
|
+
import { Button } from './design-system/components/button/Button';
|
|
15
|
+
```
|
package/package.json
CHANGED
package/public/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/src/App.css
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#root {
|
|
2
|
+
max-width: 1280px;
|
|
3
|
+
margin: 0 auto;
|
|
4
|
+
padding: 2rem;
|
|
5
|
+
text-align: center;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.logo {
|
|
9
|
+
height: 6em;
|
|
10
|
+
padding: 1.5em;
|
|
11
|
+
will-change: filter;
|
|
12
|
+
transition: filter 300ms;
|
|
13
|
+
}
|
|
14
|
+
.logo:hover {
|
|
15
|
+
filter: drop-shadow(0 0 2em #646cffaa);
|
|
16
|
+
}
|
|
17
|
+
.logo.react:hover {
|
|
18
|
+
filter: drop-shadow(0 0 2em #61dafbaa);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@keyframes logo-spin {
|
|
22
|
+
from {
|
|
23
|
+
transform: rotate(0deg);
|
|
24
|
+
}
|
|
25
|
+
to {
|
|
26
|
+
transform: rotate(360deg);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
31
|
+
a:nth-of-type(2) .logo {
|
|
32
|
+
animation: logo-spin infinite 20s linear;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.card {
|
|
37
|
+
padding: 2em;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.read-the-docs {
|
|
41
|
+
color: #888;
|
|
42
|
+
}
|