@vtex/faststore-plugin-buyer-portal 1.3.27 → 1.3.29

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 (38) hide show
  1. package/CHANGELOG.md +16 -2
  2. package/package.json +1 -1
  3. package/src/features/addresses/components/AddRecipientsDrawer/AddRecipientsDrawer.tsx +20 -2
  4. package/src/features/addresses/components/CreateAddressDrawer/CreateAddressDrawer.tsx +50 -4
  5. package/src/features/addresses/components/DeleteAddressDrawer/DeleteAddressDrawer.tsx +26 -2
  6. package/src/features/addresses/components/DeleteAddressLocationDrawer/DeleteAddressLocationDrawer.tsx +29 -3
  7. package/src/features/addresses/components/DeleteRecipientAddressDrawer/DeleteRecipientAddressDrawer.tsx +24 -2
  8. package/src/features/addresses/components/EditAddressDrawer/EditAddressDrawer.tsx +28 -2
  9. package/src/features/addresses/components/EditAddressLocationDrawer/EditAddressLocationDrawer.tsx +30 -4
  10. package/src/features/addresses/components/EditRecipientAddressDrawer/EditRecipientAddressDrawer.tsx +30 -2
  11. package/src/features/addresses/components/LocationsDrawer/LocationsDrawer.tsx +29 -2
  12. package/src/features/budgets/components/BudgetDeleteDrawer/BudgetDeleteDrawer.tsx +32 -4
  13. package/src/features/budgets/components/CreateBudgetDrawer/CreateBudgetDrawer.tsx +59 -4
  14. package/src/features/budgets/components/EditBudgetDrawer/EditBudgetDrawer.tsx +28 -1
  15. package/src/features/buying-policies/components/AddBuyingPolicyDrawer/AddBuyingPolicyDrawer.tsx +48 -5
  16. package/src/features/buying-policies/components/DeleteBuyingPolicyDrawer/DeleteBuyingPolicyDrawer.tsx +28 -2
  17. package/src/features/buying-policies/components/UpdateBuyingPolicyDrawer/UpdateBuyingPolicyDrawer.tsx +49 -5
  18. package/src/features/custom-fields/components/CreateCustomFieldValueDrawer/CreateCustomFieldValueDrawer.tsx +60 -5
  19. package/src/features/custom-fields/components/DeleteCustomFieldValueDrawer/DeleteCustomFieldValueDrawer.tsx +61 -5
  20. package/src/features/custom-fields/components/UpdateCustomFieldValueDrawer/UpdateCustomFieldValueDrawer.tsx +32 -3
  21. package/src/features/org-units/components/CreateOrgUnitDrawer/CreateOrgUnitDrawer.tsx +18 -0
  22. package/src/features/org-units/components/DeleteOrgUnitDrawer/DeleteOrgUnitDrawer.tsx +28 -0
  23. package/src/features/org-units/components/UpdateOrgUnitDrawer/UpdateOrgUnitDrawer.tsx +28 -0
  24. package/src/features/shared/hooks/analytics/types.ts +14 -0
  25. package/src/features/shared/hooks/analytics/useAnalytics.ts +249 -0
  26. package/src/features/shared/hooks/index.ts +1 -0
  27. package/src/features/shared/services/logger/analytics/analytics.ts +101 -0
  28. package/src/features/shared/services/logger/analytics/constants.ts +83 -0
  29. package/src/features/shared/services/logger/analytics/types.ts +108 -0
  30. package/src/features/shared/services/logger/index.ts +1 -0
  31. package/src/features/shared/utils/constants.ts +1 -1
  32. package/src/features/users/components/CreateUserDrawer/CreateUserDrawer.tsx +24 -0
  33. package/src/features/users/components/DeleteUserDrawer/DeleteUserDrawer.tsx +23 -2
  34. package/src/features/users/components/UpdateUserDrawer/UpdateUserDrawer.tsx +45 -4
  35. package/src/themes/colors.scss +10 -0
  36. package/src/themes/layouts.scss +4 -0
  37. package/src/themes/tokens.scss +169 -0
  38. package/src/themes/typography.scss +76 -0
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Analytics event categories
3
+ */
4
+ export type EventCategory =
5
+ | "click"
6
+ | "view"
7
+ | "apiAnswer"
8
+ | "webVitals"
9
+ | "creation"
10
+ | "edition"
11
+ | "error"
12
+ | "timing"
13
+ | "interaction";
14
+
15
+ /**
16
+ * Analytics event fields
17
+ */
18
+ export interface DataIngestionApiFields {
19
+ /** The type of the event */
20
+ event_category?: EventCategory;
21
+ /** The name of the event. Has to be unique through the app. */
22
+ event_name: string;
23
+ /** Additional informations */
24
+ /** Time spent on page */
25
+ time_on_page?: number;
26
+ /** Additional metadata about the event */
27
+ metadata?: Record<string, unknown>;
28
+ /** Entity type (e.g., 'budget', 'buying_policy') */
29
+ entity_type?: string;
30
+ /** Entity ID */
31
+ entity_id?: string;
32
+ /** Is this a new entity? */
33
+ is_new?: boolean;
34
+ /** Duration in milliseconds */
35
+ duration_ms?: number;
36
+ /** Step name for multi-step flows */
37
+ step_name?: string;
38
+ /** Flow name for multi-step flows */
39
+ flow_name?: string;
40
+ /** Component type for interactions */
41
+ component_type?: string;
42
+ /** Action performed */
43
+ action?: string;
44
+ }
45
+
46
+ /**
47
+ * Internal params for data ingestion API
48
+ */
49
+ export interface DataIngestionApiParams {
50
+ [key: string]: string | number | boolean | object | undefined;
51
+ workspace?: string;
52
+ }
53
+
54
+ /**
55
+ * Step timing properties
56
+ */
57
+ export interface StepTimingProperties {
58
+ flow_name: string;
59
+ step_name: string;
60
+ from_step?: string;
61
+ to_step?: string;
62
+ duration_ms: number;
63
+ step_index?: number;
64
+ total_steps?: number;
65
+ }
66
+
67
+ /**
68
+ * Error tracking properties
69
+ */
70
+ export interface ErrorEventProperties {
71
+ error_message: string;
72
+ error_type?: string;
73
+ error_stack?: string;
74
+ entity_type?: string;
75
+ entity_id?: string;
76
+ is_new_entity: boolean;
77
+ operation?: string; // create, update, delete
78
+ }
79
+
80
+ /**
81
+ * Interaction properties
82
+ */
83
+ export interface InteractionEventProperties {
84
+ component_type: string;
85
+ component_id?: string;
86
+ action: string;
87
+ selected_option?: string;
88
+ metadata?: Record<string, unknown>;
89
+ }
90
+
91
+ /**
92
+ * Generic entity creation properties
93
+ */
94
+ export interface EntityCreatedProperties {
95
+ entity_type: string;
96
+ entity_id?: string;
97
+ properties: Record<string, unknown>;
98
+ }
99
+
100
+ /**
101
+ * Generic entity edition properties
102
+ */
103
+ export interface EntityEditedProperties {
104
+ entity_type: string;
105
+ entity_id: string;
106
+ changed_fields?: string[];
107
+ properties: Record<string, unknown>;
108
+ }
@@ -2,3 +2,4 @@ export * from "./types";
2
2
  export * from "./constants";
3
3
  export * from "./context";
4
4
  export * from "./otlp-logger.service";
5
+ export * from "./analytics/analytics";
@@ -13,4 +13,4 @@ export const LOCAL_STORAGE_LOCATION_EDIT_KEY = "bp_hide_edit_location_confirm";
13
13
  export const LOCAL_STORAGE_RECIPIENT_EDIT_KEY =
14
14
  "bp_hide_edit_recipient_confirm";
15
15
 
16
- export const CURRENT_VERSION = "1.3.27";
16
+ export const CURRENT_VERSION = "1.3.29";
@@ -12,6 +12,8 @@ import {
12
12
  Icon,
13
13
  InputText,
14
14
  } from "../../../shared/components";
15
+ import { useAnalytics } from "../../../shared/hooks";
16
+ import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
15
17
  import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
16
18
  import { maskPhoneNumber } from "../../../shared/utils/phoneNumber";
17
19
  import { useAddUserToOrgUnit } from "../../hooks";
@@ -31,6 +33,11 @@ export const CreateUserDrawer = ({
31
33
  }: CreateUserDrawerProps) => {
32
34
  const { pushToast } = useUI();
33
35
  const router = useRouter();
36
+ const { trackEntityCreated, trackEntityCreateError } = useAnalytics({
37
+ entityType: "user",
38
+ defaultTimerName: "user_creation",
39
+ shouldTrackDefaultTimer: true,
40
+ });
34
41
  const [drawerState, setDrawerState] = useState<
35
42
  "CREATE_USER" | "USER_ALREADY_EXISTS"
36
43
  >("CREATE_USER");
@@ -74,6 +81,15 @@ export const CreateUserDrawer = ({
74
81
  };
75
82
 
76
83
  const handleAddUserSuccess = ({ user }: { user: { id: string } }) => {
84
+ trackEntityCreated(ANALYTICS_EVENTS.USER_CREATED, "user", {
85
+ user_name: name,
86
+ user_email: email,
87
+ user_phone: phone,
88
+ roles_count: roles.length,
89
+ role_ids: roles,
90
+ org_unit_id: orgUnitId,
91
+ });
92
+
77
93
  pushToast({
78
94
  message: "User successfully added",
79
95
  status: "INFO",
@@ -112,6 +128,14 @@ export const CreateUserDrawer = ({
112
128
  };
113
129
  };
114
130
 
131
+ trackEntityCreateError(ANALYTICS_EVENTS.USER_CREATE_ERROR, err, {
132
+ org_unit_id: orgUnitId,
133
+ error_type:
134
+ error.code === "USER_ALREADY_EXISTS"
135
+ ? "user_already_exists"
136
+ : "unknown",
137
+ });
138
+
115
139
  setUserAlreadyInUse({
116
140
  ...error.user,
117
141
  orgUnit: error.orgUnit,
@@ -8,6 +8,8 @@ import {
8
8
  InputText,
9
9
  type BasicDrawerProps,
10
10
  } from "../../../shared/components";
11
+ import { useAnalytics } from "../../../shared/hooks";
12
+ import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
11
13
  import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
12
14
  import { useRemoveUserFromOrgUnit } from "../../hooks";
13
15
 
@@ -26,10 +28,22 @@ export const DeleteUserDrawer = ({
26
28
  const [userNameConfirmation, setUserNameConfirmation] = useState("");
27
29
 
28
30
  const { pushToast } = useUI();
29
-
30
31
  const { orgUnit } = useOrgUnitByUser(user.id);
32
+ const { trackEvent } = useAnalytics({
33
+ entityType: "user",
34
+ entityId: user.id,
35
+ defaultTimerName: "user_delete",
36
+ shouldTrackDefaultTimer: true,
37
+ });
31
38
 
32
39
  const handleRemoveSuccess = () => {
40
+ trackEvent(ANALYTICS_EVENTS.USER_DELETED, {
41
+ user_id: user.id,
42
+ user_name: user.name,
43
+ org_unit_id: orgUnit?.id,
44
+ entity_type: "user",
45
+ });
46
+
33
47
  pushToast({
34
48
  message: "User successfully deleted",
35
49
  status: "INFO",
@@ -52,7 +66,14 @@ export const DeleteUserDrawer = ({
52
66
  const { removeUserFromOrgUnit, isRemoveUserFromOrgUnitLoading } =
53
67
  useRemoveUserFromOrgUnit({
54
68
  onSuccess: handleRemoveSuccess,
55
- onError: () => {
69
+ onError: (error) => {
70
+ trackEvent(ANALYTICS_EVENTS.USER_DELETE_ERROR, {
71
+ entity_id: user.id,
72
+ user_name: user.name,
73
+ error_message: error instanceof Error ? error.message : String(error),
74
+ org_unit_id: orgUnit?.id,
75
+ });
76
+
56
77
  pushToast({
57
78
  message: "An error occurred while deleting the user",
58
79
  status: "ERROR",
@@ -1,4 +1,4 @@
1
- import { useState } from "react";
1
+ import { useRef, useState } from "react";
2
2
 
3
3
  import { Skeleton, useUI } from "@faststore/ui";
4
4
 
@@ -10,6 +10,8 @@ import {
10
10
  ErrorMessage,
11
11
  InputText,
12
12
  } from "../../../shared/components";
13
+ import { useAnalytics } from "../../../shared/hooks";
14
+ import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
13
15
  import { maskPhoneNumber } from "../../../shared/utils/phoneNumber";
14
16
  import { useGetUserById, useUpdateUser } from "../../hooks";
15
17
 
@@ -29,16 +31,25 @@ export const UpdateUserDrawer = ({
29
31
  ...props
30
32
  }: UpdateUserDrawerProps) => {
31
33
  const { pushToast } = useUI();
34
+ const { trackEntityEdited, trackEntityEditError } = useAnalytics({
35
+ entityType: "user",
36
+ entityId: userId,
37
+ defaultTimerName: "user_edit",
38
+ shouldTrackDefaultTimer: true,
39
+ });
40
+ const initialRolesRef = useRef<string[]>([]);
32
41
 
33
42
  const { isUserLoading } = useGetUserById(
34
43
  { orgUnitId, userId },
35
44
  {
36
45
  onSuccess: (data) => {
46
+ const userRoles = data?.roles ? data.roles : [];
47
+ initialRolesRef.current = userRoles;
37
48
  setForm({
38
49
  name: data?.name ?? "",
39
50
  email: data?.email ?? "",
40
51
  phone: data?.phone ?? "",
41
- roles: data?.roles ? data.roles : [],
52
+ roles: userRoles,
42
53
  });
43
54
  },
44
55
  onError: () => {
@@ -74,6 +85,16 @@ export const UpdateUserDrawer = ({
74
85
  };
75
86
 
76
87
  const handleUpdateUserSuccess = () => {
88
+ trackEntityEdited(ANALYTICS_EVENTS.USER_EDITED, {
89
+ user_id: userId,
90
+ user_name: name,
91
+ user_phone: phone,
92
+ old_roles: initialRolesRef.current,
93
+ new_roles: roles,
94
+ roles_count: roles.length,
95
+ org_unit_id: orgUnitId,
96
+ });
97
+
77
98
  pushToast({
78
99
  message: "User successfully updated",
79
100
  status: "INFO",
@@ -84,7 +105,17 @@ export const UpdateUserDrawer = ({
84
105
 
85
106
  const { updateUser, isUpdateUserLoading } = useUpdateUser({
86
107
  onSuccess: handleUpdateUserSuccess,
87
- onError: () => {
108
+ onError: (error) => {
109
+ trackEntityEditError(
110
+ ANALYTICS_EVENTS.USER_EDIT_ERROR,
111
+ "user",
112
+ userId,
113
+ error,
114
+ {
115
+ org_unit_id: orgUnitId,
116
+ }
117
+ );
118
+
88
119
  pushToast({
89
120
  message: "Failed to update user",
90
121
  status: "ERROR",
@@ -94,7 +125,17 @@ export const UpdateUserDrawer = ({
94
125
 
95
126
  const { updateRoles, isUpdateRolesLoading } = useUpdateRoles({
96
127
  onSuccess: handleUpdateUserSuccess,
97
- onError: () => {
128
+ onError: (error) => {
129
+ trackEntityEditError(
130
+ ANALYTICS_EVENTS.USER_EDIT_ERROR,
131
+ "user",
132
+ userId,
133
+ error,
134
+ {
135
+ org_unit_id: orgUnitId,
136
+ }
137
+ );
138
+
98
139
  pushToast({
99
140
  message: "Failed to update user",
100
141
  status: "ERROR",
@@ -0,0 +1,10 @@
1
+ // Mixin para aplicar cor de texto
2
+ @mixin bp-text-color($color-name: 'neutral-8') {
3
+ color: var(--fs-bp-color-#{$color-name});
4
+ }
5
+
6
+ // Mixin para aplicar cor de fundo
7
+ @mixin bp-bg-color($color-name: 'neutral-0') {
8
+ background-color: var(--fs-bp-color-#{$color-name});
9
+ }
10
+
@@ -1,3 +1,7 @@
1
+ // Tokens
2
+ @import "./tokens.scss";
3
+ @import "./typography.scss";
4
+
1
5
  // Global
2
6
  @import "../features/shared/layouts/GlobalLayout/global-layout.scss";
3
7
 
@@ -0,0 +1,169 @@
1
+ :root {
2
+ // Font size
3
+ --fs-bp-text-size-0: .75rem;
4
+ --fs-bp-text-size-1: .875rem;
5
+ --fs-bp-text-size-2: 1rem;
6
+ --fs-bp-text-size-3: 1.25rem;
7
+ --fs-bp-text-size-4: 1.5rem;
8
+ --fs-bp-text-size-5: 1.75rem;
9
+ --fs-bp-text-size-6: 1.875rem;
10
+ --fs-bp-text-size-7: 2rem;
11
+ --fs-bp-text-size-8: 2.125rem;
12
+ --fs-bp-text-size-9: 2.25rem;
13
+ --fs-bp-text-size-10: 2.5rem;
14
+
15
+ // Font size - semantic
16
+ --fs-bp-text-size-base: var(--fs-bp-text-size-2);
17
+ --fs-bp-text-caption: var(--fs-bp-text-size-0);
18
+ --fs-bp-text-body: var(--fs-bp-text-size-1);
19
+ --fs-bp-text-body-big: var(--fs-bp-text-size-2);
20
+ --fs-bp-text-display-1: var(--fs-bp-text-size-8);
21
+ --fs-bp-text-display-2: var(--fs-bp-text-size-7);
22
+ --fs-bp-text-display-3: var(--fs-bp-text-size-6);
23
+ --fs-bp-text-display-4: var(--fs-bp-text-size-5);
24
+ --fs-bp-text-display-5: var(--fs-bp-text-size-4);
25
+ --fs-bp-text-display-6: var(--fs-bp-text-size-3);
26
+
27
+ @media (min-width: 768px) {
28
+ --fs-bp-text-size-6: 2rem;
29
+ --fs-bp-text-size-7: 2.5rem;
30
+ --fs-bp-text-size-8: 3rem;
31
+ --fs-bp-text-size-9: 3.5rem;
32
+ --fs-bp-text-size-10: 5.25rem;
33
+ }
34
+
35
+ // Weight
36
+ --fs-bp-weight-regular: 400;
37
+ --fs-bp-weight-medium: 500;
38
+ --fs-bp-weight-semibold: 600;
39
+ --fs-bp-weight-bold: 700;
40
+
41
+ // Letter spacing
42
+ --fs-bp-letter-spacing-0: 0;
43
+ --fs-bp-letter-spacing-1: -0.01em;
44
+ --fs-bp-letter-spacing-2: -0.02em;
45
+ --fs-bp-letter-spacing-3: -0.04em;
46
+
47
+ // Line height
48
+ --fs-bp-line-height-base: 1.2;
49
+
50
+ // Colors - neutral
51
+ --fs-bp-color-neutral-0: #FFFFFF;
52
+ --fs-bp-color-neutral-1: #F5F5F5;
53
+ --fs-bp-color-neutral-2: #EBEBEB;
54
+ --fs-bp-color-neutral-3: #E0E0E0;
55
+ --fs-bp-color-neutral-4: #D6D6D6;
56
+ --fs-bp-color-neutral-5: #ADADAD;
57
+ --fs-bp-color-neutral-6: #858585;
58
+ --fs-bp-color-neutral-7: #5C5C5C;
59
+ --fs-bp-color-neutral-8: #1F1F1F;
60
+ --fs-bp-color-neutral-9: #000000;
61
+
62
+ // Colors - accent
63
+ --fs-bp-color-accent-0: #F1F8FD;
64
+ --fs-bp-color-accent-1: #CBE9FF;
65
+ --fs-bp-color-accent-2: #0366DD;
66
+
67
+ // Colors - success
68
+ --fs-bp-color-success-0: #E9FCE3;
69
+ --fs-bp-color-success-1: #AFF79E;
70
+ --fs-bp-color-success-2: #08A822;
71
+
72
+ // Colors - critical
73
+ --fs-bp-color-critical-0: #FDF6F5;
74
+ --fs-bp-color-critical-1: #FFDFD9;
75
+ --fs-bp-color-critical-2: #D31A15;
76
+
77
+ // Colors - warning
78
+ --fs-bp-color-warning-0: #FDF5E9;
79
+ --fs-bp-color-warning-1: #FFE0AE;
80
+ --fs-bp-color-warning-2: #F78612;
81
+
82
+ --fs-bp-color-brand: var(--fs-bp-color-accent-2);
83
+ --fs-bp-color-white: var(--fs-bp-color-neutral-0);
84
+ --fs-bp-color-black: var(--fs-bp-color-neutral-9);
85
+
86
+ // Border radius
87
+ --fs-bp-border-radius-0: 0;
88
+ --fs-bp-border-radius-1: .25rem;
89
+ --fs-bp-border-radius-2: .5rem;
90
+ --fs-bp-border-radius-3: .75rem;
91
+ --fs-bp-border-radius-4: 1.25rem;
92
+ --fs-bp-border-radius-full: 100000rem;
93
+
94
+ // Spacing
95
+ --fs-bp-spacing-0: 0;
96
+ --fs-bp-spacing-1: .25rem;
97
+ --fs-bp-spacing-2: .5rem;
98
+ --fs-bp-spacing-3: .75rem;
99
+ --fs-bp-spacing-4: 1rem;
100
+ --fs-bp-spacing-5: 1.25rem;
101
+ --fs-bp-spacing-6: 1.5rem;
102
+ --fs-bp-spacing-7: 1.75rem;
103
+ --fs-bp-spacing-8: 2rem;
104
+ --fs-bp-spacing-9: 2.5rem;
105
+ --fs-bp-spacing-10: 3rem;
106
+ --fs-bp-spacing-11: 3.5rem;
107
+ --fs-bp-spacing-12: 3.75rem;
108
+ --fs-bp-spacing-13: 4.5rem;
109
+ --fs-bp-spacing-14: 5rem;
110
+ --fs-bp-spacing-15: 5.5rem;
111
+ --fs-bp-spacing-16: 6rem;
112
+
113
+ // Margins
114
+ --fs-bp-margin-0: var(--fs-bp-spacing-0);
115
+ --fs-bp-margin-1: var(--fs-bp-spacing-1);
116
+ --fs-bp-margin-2: var(--fs-bp-spacing-2);
117
+ --fs-bp-margin-3: var(--fs-bp-spacing-3);
118
+ --fs-bp-margin-4: var(--fs-bp-spacing-4);
119
+ --fs-bp-margin-5: var(--fs-bp-spacing-5);
120
+ --fs-bp-margin-6: var(--fs-bp-spacing-6);
121
+ --fs-bp-margin-7: var(--fs-bp-spacing-7);
122
+ --fs-bp-margin-8: var(--fs-bp-spacing-8);
123
+ --fs-bp-margin-9: var(--fs-bp-spacing-9);
124
+ --fs-bp-margin-10: var(--fs-bp-spacing-10);
125
+ --fs-bp-margin-11: var(--fs-bp-spacing-11);
126
+ --fs-bp-margin-12: var(--fs-bp-spacing-12);
127
+ --fs-bp-margin-13: var(--fs-bp-spacing-13);
128
+ --fs-bp-margin-14: var(--fs-bp-spacing-14);
129
+ --fs-bp-margin-15: var(--fs-bp-spacing-15);
130
+ --fs-bp-margin-16: var(--fs-bp-spacing-16);
131
+
132
+ // Paddings
133
+ --fs-bp-padding-0: var(--fs-bp-spacing-0);
134
+ --fs-bp-padding-1: var(--fs-bp-spacing-1);
135
+ --fs-bp-padding-2: var(--fs-bp-spacing-2);
136
+ --fs-bp-padding-3: var(--fs-bp-spacing-3);
137
+ --fs-bp-padding-4: var(--fs-bp-spacing-4);
138
+ --fs-bp-padding-5: var(--fs-bp-spacing-5);
139
+ --fs-bp-padding-6: var(--fs-bp-spacing-6);
140
+ --fs-bp-padding-7: var(--fs-bp-spacing-7);
141
+ --fs-bp-padding-8: var(--fs-bp-spacing-8);
142
+ --fs-bp-padding-9: var(--fs-bp-spacing-9);
143
+ --fs-bp-padding-10: var(--fs-bp-spacing-10);
144
+ --fs-bp-padding-11: var(--fs-bp-spacing-11);
145
+ --fs-bp-padding-12: var(--fs-bp-spacing-12);
146
+ --fs-bp-padding-13: var(--fs-bp-spacing-13);
147
+ --fs-bp-padding-14: var(--fs-bp-spacing-14);
148
+ --fs-bp-padding-15: var(--fs-bp-spacing-15);
149
+ --fs-bp-padding-16: var(--fs-bp-spacing-16);
150
+
151
+ // Gap
152
+ --fs-bp-gap-0: var(--fs-bp-spacing-0);
153
+ --fs-bp-gap-1: var(--fs-bp-spacing-1);
154
+ --fs-bp-gap-2: var(--fs-bp-spacing-2);
155
+ --fs-bp-gap-3: var(--fs-bp-spacing-3);
156
+ --fs-bp-gap-4: var(--fs-bp-spacing-4);
157
+ --fs-bp-gap-5: var(--fs-bp-spacing-5);
158
+ --fs-bp-gap-6: var(--fs-bp-spacing-6);
159
+ --fs-bp-gap-7: var(--fs-bp-spacing-7);
160
+ --fs-bp-gap-8: var(--fs-bp-spacing-8);
161
+ --fs-bp-gap-9: var(--fs-bp-spacing-9);
162
+ --fs-bp-gap-10: var(--fs-bp-spacing-10);
163
+ --fs-bp-gap-11: var(--fs-bp-spacing-11);
164
+ --fs-bp-gap-12: var(--fs-bp-spacing-12);
165
+ --fs-bp-gap-13: var(--fs-bp-spacing-13);
166
+ --fs-bp-gap-14: var(--fs-bp-spacing-14);
167
+ --fs-bp-gap-15: var(--fs-bp-spacing-15);
168
+ --fs-bp-gap-16: var(--fs-bp-spacing-16);
169
+ }
@@ -0,0 +1,76 @@
1
+ $typography: (
2
+ 'caption': (
3
+ size: var(--fs-bp-text-caption),
4
+ weight: var(--fs-bp-weight-regular),
5
+ spacing: var(--fs-bp-letter-spacing-0),
6
+ line-height: var(--fs-bp-line-height-base),
7
+ ),
8
+ 'body': (
9
+ size: var(--fs-bp-text-body),
10
+ weight: var(--fs-bp-weight-regular),
11
+ spacing: var(--fs-bp-letter-spacing-1),
12
+ line-height: var(--fs-bp-line-height-base),
13
+ ),
14
+ 'emphasis': (
15
+ size: var(--fs-bp-text-body),
16
+ weight: var(--fs-bp-weight-medium),
17
+ spacing: var(--fs-bp-letter-spacing-1),
18
+ line-height: var(--fs-bp-line-height-base),
19
+ ),
20
+ 'action': (
21
+ size: var(--fs-bp-text-body),
22
+ weight: var(--fs-bp-weight-semibold),
23
+ spacing: var(--fs-bp-letter-spacing-1),
24
+ line-height: var(--fs-bp-line-height-base),
25
+ ),
26
+ 'body-big': (
27
+ size: var(--fs-bp-text-body-big),
28
+ weight: var(--fs-bp-weight-regular),
29
+ spacing: var(--fs-bp-letter-spacing-2),
30
+ line-height: var(--fs-bp-line-height-base),
31
+ ),
32
+ 'display-1': (
33
+ size: var(--fs-bp-text-display-1),
34
+ weight: var(--fs-bp-weight-semibold),
35
+ spacing: var(--fs-bp-letter-spacing-2),
36
+ line-height: var(--fs-bp-line-height-base),
37
+ ),
38
+ 'display-2': (
39
+ size: var(--fs-bp-text-display-2),
40
+ weight: var(--fs-bp-weight-semibold),
41
+ spacing: var(--fs-bp-letter-spacing-2),
42
+ line-height: var(--fs-bp-line-height-base),
43
+ ),
44
+ 'display-3': (
45
+ size: var(--fs-bp-text-display-3),
46
+ weight: var(--fs-bp-weight-semibold),
47
+ spacing: var(--fs-bp-letter-spacing-2),
48
+ line-height: var(--fs-bp-line-height-base),
49
+ ),
50
+ 'display-4': (
51
+ size: var(--fs-bp-text-display-4),
52
+ weight: var(--fs-bp-weight-semibold),
53
+ spacing: var(--fs-bp-letter-spacing-2),
54
+ line-height: var(--fs-bp-line-height-base),
55
+ ),
56
+ 'display-5': (
57
+ size: var(--fs-bp-text-display-5),
58
+ weight: var(--fs-bp-weight-semibold),
59
+ spacing: var(--fs-bp-letter-spacing-2),
60
+ line-height: var(--fs-bp-line-height-base),
61
+ ),
62
+ 'display-6': (
63
+ size: var(--fs-bp-text-display-6),
64
+ weight: var(--fs-bp-weight-semibold),
65
+ spacing: var(--fs-bp-letter-spacing-2),
66
+ line-height: var(--fs-bp-line-height-base),
67
+ ),
68
+ );
69
+
70
+ @mixin text-style($type) {
71
+ $style: map-get($typography, $type);
72
+ font-size: map-get($style, size);
73
+ font-weight: map-get($style, weight);
74
+ line-height: map-get($style, line-height);
75
+ letter-spacing: map-get($style, spacing);
76
+ }