@vtex/faststore-plugin-buyer-portal 1.1.95 → 1.1.97

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 (58) hide show
  1. package/package.json +1 -1
  2. package/src/features/addresses/components/AddressLocationsList/AddressLocationsList.tsx +28 -39
  3. package/src/features/addresses/components/AddressRecipientsList/AddressRecipientsList.tsx +42 -42
  4. package/src/features/addresses/layouts/AddressDetailsLayout/address-details-layout.scss +285 -286
  5. package/src/features/addresses/layouts/AddressesLayout/AddressesLayout.tsx +26 -29
  6. package/src/features/addresses/layouts/AddressesLayout/addresses-layout.scss +144 -151
  7. package/src/features/budgets/components/BudgetAllocationsSelection/BudgetAllocationsSelection.tsx +61 -57
  8. package/src/features/budgets/components/BudgetAllocationsSelection/budget-allocations-selection.scss +131 -232
  9. package/src/features/budgets/components/BudgetAllocationsTable/BudgetAllocationsTable.tsx +104 -91
  10. package/src/features/budgets/components/BudgetAllocationsTable/budget-allocations-table.scss +80 -182
  11. package/src/features/budgets/components/BudgetsTable/BudgetsTable.tsx +90 -107
  12. package/src/features/budgets/components/BudgetsTable/budgets-table.scss +128 -126
  13. package/src/features/budgets/layouts/BudgetsLayout/BudgetsLayout.tsx +0 -15
  14. package/src/features/buying-policies/components/AddBuyingPolicyDrawer/AddBuyingPolicyDrawer.tsx +4 -0
  15. package/src/features/buying-policies/components/BasicBuyingPolicyDrawer/BasicBuyingPolicyDrawer.tsx +35 -4
  16. package/src/features/buying-policies/components/BasicBuyingPolicyDrawer/basic-buying-policy-drawer.scss +2 -1
  17. package/src/features/buying-policies/components/BudgetCriteriaSelector/BudgetCriteriaSelector.tsx +113 -0
  18. package/src/features/buying-policies/components/BudgetCriteriaSelector/budget-criteria-selector.scss +139 -0
  19. package/src/features/buying-policies/components/BudgetCriteriaSelector/index.ts +4 -0
  20. package/src/features/buying-policies/components/BuyingPolicyDropdownMenu/BuyingPolicyDropdownMenu.tsx +5 -0
  21. package/src/features/buying-policies/components/UpdateBuyingPolicyDrawer/UpdateBuyingPolicyDrawer.tsx +5 -0
  22. package/src/features/buying-policies/layouts/BuyingPoliciesLayout/BuyingPoliciesLayout.tsx +66 -46
  23. package/src/features/buying-policies/layouts/BuyingPoliciesLayout/buying-policies-layout.scss +64 -70
  24. package/src/features/buying-policies/utils/index.ts +4 -1
  25. package/src/features/buying-policies/utils/orderFieldsCriteriaOptions.ts +12 -9
  26. package/src/features/collections/components/CollectionsTable/CollectionsTable.tsx +12 -18
  27. package/src/features/collections/components/CollectionsTable/collections-table.scss +138 -118
  28. package/src/features/collections/components/table/AddCollectionsDrawerTable.tsx +48 -54
  29. package/src/features/collections/components/table/add-collections-drawer-table.scss +57 -56
  30. package/src/features/credit-cards/layouts/CreditCardsLayout/CreditCardLayout.tsx +55 -61
  31. package/src/features/credit-cards/layouts/CreditCardsLayout/credit-card-layout.scss +63 -153
  32. package/src/features/payment-methods/components/AddPaymentMethodsDrawer/AddPaymentMethodsDrawer.tsx +58 -49
  33. package/src/features/payment-methods/components/AddPaymentMethodsDrawer/add-payment-methods-drawer.scss +58 -63
  34. package/src/features/payment-methods/layouts/PaymentMethodsLayout/PaymentMethodsLayout.tsx +15 -12
  35. package/src/features/roles/layout/RoleDetailsLayout/RoleDetailsLayout.tsx +57 -26
  36. package/src/features/roles/layout/RoleDetailsLayout/role-details-layout.scss +77 -0
  37. package/src/features/roles/layout/RolesLayout/RolesLayout.tsx +4 -12
  38. package/src/features/roles/layout/RolesLayout/roles-layout.scss +8 -22
  39. package/src/features/shared/components/CustomField/table/CustomFieldTable.tsx +67 -110
  40. package/src/features/shared/components/CustomField/table/custom-field-table.scss +39 -144
  41. package/src/features/shared/components/IconBookmarked/IconBookmarked.tsx +9 -0
  42. package/src/features/shared/components/IconBookmarked/icon-bookmarked.scss +9 -0
  43. package/src/features/shared/components/Table/Table.tsx +7 -2
  44. package/src/features/shared/components/Table/TableCell/TableCell.tsx +15 -3
  45. package/src/features/shared/components/Table/TableCell/table-cell.scss +34 -0
  46. package/src/features/shared/components/Table/TableHead/TableHead.tsx +34 -6
  47. package/src/features/shared/components/Table/TableHead/table-head.scss +53 -49
  48. package/src/features/shared/components/Table/TableLoading/TableLoading.tsx +16 -6
  49. package/src/features/shared/components/Table/TableLoading/table-loading.scss +13 -8
  50. package/src/features/shared/components/Table/TableRow/TableRow.tsx +65 -42
  51. package/src/features/shared/components/Table/TableRow/table-row.scss +104 -68
  52. package/src/features/shared/components/Table/table.scss +11 -6
  53. package/src/features/shared/components/Table/utils/tableColumns.ts +30 -33
  54. package/src/features/shared/components/index.ts +1 -0
  55. package/src/features/users/layouts/UsersLayout/UsersLayout.tsx +20 -27
  56. package/src/pages/budgets.tsx +1 -1
  57. package/src/pages/buying-policies.tsx +14 -1
  58. package/src/themes/layouts.scss +1 -0
@@ -0,0 +1,77 @@
1
+ [data-fs-role-details-page] {
2
+ @import "../../../shared/components/Table/table.scss";
3
+
4
+ [data-fs-bp-role-details-row] {
5
+ [data-fs-bp-table-row-title-cell] {
6
+ padding-left: var(--fs-spacing-0);
7
+
8
+ @include media(">phonemid") {
9
+ padding-left: var(--fs-spacing-2);
10
+ }
11
+
12
+ @include media(">tablet") {
13
+ padding-left: calc(var(--fs-spacing-4) - var(--fs-spacing-0));
14
+ }
15
+ }
16
+
17
+ [data-fs-bp-table-row-actions] {
18
+ padding-right: var(--fs-spacing-0);
19
+
20
+ @include media(">phonemid") {
21
+ padding-right: var(--fs-spacing-2);
22
+ }
23
+
24
+ @include media(">tablet") {
25
+ padding-right: calc(var(--fs-spacing-4) - var(--fs-spacing-0));
26
+ }
27
+ }
28
+
29
+ [data-fs-bp-check-icon] {
30
+ color: #08a822;
31
+ }
32
+ }
33
+ [data-fs-bp-table-row] {
34
+ [data-fs-bp-table-row-title-cell] {
35
+ [data-fs-bp-table-row-title-content] {
36
+ display: block;
37
+ padding: var(--fs-spacing-0) 0;
38
+
39
+ @include media(">tablet") {
40
+ display: flex;
41
+ padding: 0;
42
+ }
43
+ }
44
+
45
+ [data-fs-bp-role-details-label] {
46
+ font-size: var(--fs-text-size-0);
47
+ font-weight: var(--fs-text-weight-regular);
48
+ line-height: 120%;
49
+ color: #5c5c5c;
50
+ white-space: nowrap;
51
+ overflow: hidden;
52
+ text-overflow: ellipsis;
53
+
54
+ @include media(">phonemid") {
55
+ font-size: var(--fs-text-size-1);
56
+ line-height: calc(var(--fs-spacing-4) - var(--fs-spacing-0));
57
+ font-weight: var(--fs-text-weight-medium);
58
+ letter-spacing: -0.01em;
59
+ color: #000000;
60
+ }
61
+ }
62
+
63
+ [data-fs-bp-role-details-description] {
64
+ font-size: var(--fs-text-size-1);
65
+ line-height: calc(var(--fs-spacing-4) - var(--fs-spacing-0));
66
+ font-weight: var(--fs-text-weight-regular);
67
+ letter-spacing: -0.01em;
68
+ color: #1f1f1f;
69
+ margin-top: var(--fs-spacing-0);
70
+
71
+ @include media(">tablet") {
72
+ display: none;
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
@@ -1,11 +1,11 @@
1
1
  import { HeaderInside } from "../../../shared/components";
2
2
  import { Table } from "../../../shared/components/Table/Table";
3
+ import { getTableColumns } from "../../../shared/components/Table/utils/tableColumns";
3
4
  import { useBuyerPortal } from "../../../shared/hooks";
4
5
  import { GlobalLayout } from "../../../shared/layouts";
5
6
  import { OrgUnitTabsLayout } from "../../../shared/layouts/OrgUnitTabsLayout/OrgUnitTabLayout";
6
7
  import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
7
8
 
8
- import type { TableColumn } from "../../../shared/components/Table/TableHead/TableHead";
9
9
  import type { RolePermission } from "../../types";
10
10
 
11
11
  export type RolesLayoutProps = {
@@ -19,23 +19,15 @@ export const RolesLayout = ({
19
19
  }: RolesLayoutProps) => {
20
20
  const { currentOrgUnit } = useBuyerPortal();
21
21
 
22
- const configTable: Array<TableColumn> = [
23
- {
24
- key: "name",
25
- label: "Name",
26
- align: "left",
27
- colspan: 2,
28
- size: "large",
29
- },
30
- ];
22
+ const columns = getTableColumns({});
31
23
 
32
24
  return (
33
25
  <GlobalLayout>
34
26
  <OrgUnitTabsLayout pageName="Organization">
35
27
  <section data-fs-bp-roles-section>
36
28
  <HeaderInside title="Roles" />
37
- <Table>
38
- <Table.Head columns={configTable} />
29
+ <Table layoutFixed>
30
+ <Table.Head columns={columns} />
39
31
  <Table.Body>
40
32
  {Object.keys(rolesAndPermissions).map((role) => (
41
33
  <Table.Row
@@ -1,27 +1,13 @@
1
1
  [data-fs-bp-roles-section] {
2
- @import "../../../shared/components/Table/table.scss";
2
+ @import "../../../shared/components/Table/table.scss";
3
3
 
4
- @import "../../../shared/components/HeaderInside/header-inside.scss";
4
+ @import "../../../shared/components/HeaderInside/header-inside.scss";
5
5
 
6
- @import "../../../shared/components/InternalSearch/internal-search.scss";
7
- @import "../../../shared/components/Tag/tag.scss";
8
- @import "../../../shared/components/InternalTopbar/internal-top-bar.scss";
6
+ @import "../../../shared/components/InternalSearch/internal-search.scss";
7
+ @import "../../../shared/components/Tag/tag.scss";
8
+ @import "../../../shared/components/InternalTopbar/internal-top-bar.scss";
9
9
 
10
- [data-fs-bp-table-row-icon] {
11
- color: #0366dd;
12
- }
13
-
14
- [data-fs-bp-check-icon] {
15
- color: #08a822;
16
- }
17
-
18
- [data-fs-bp-table-row] td {
19
- span {
20
- padding: 1rem;
21
- }
22
- }
23
-
24
- [data-fs-bp-table-row] [data-fs-bp-table-cell] {
25
- padding: 1rem;
26
- }
10
+ [data-fs-bp-table-row-icon] {
11
+ color: #0366dd;
12
+ }
27
13
  }
@@ -1,16 +1,9 @@
1
- import {
2
- Dropdown,
3
- DropdownItem,
4
- Skeleton,
5
- TableCell,
6
- TableRow,
7
- Tooltip,
8
- useUI,
9
- } from "@faststore/ui";
1
+ import { DropdownItem, IconButton, Tooltip, useUI } from "@faststore/ui";
10
2
 
11
3
  import { BasicDropdownMenu } from "../../BasicDropdownMenu/BasicDropdownMenu";
12
- import { BasicDropdownMenuTrigger } from "../../BasicDropdownMenu/BasicDropdownMenuTrigger";
4
+ import { EmptyState } from "../../EmptyState/EmptyState";
13
5
  import { Icon } from "../../Icon";
6
+ import { IconBookmarked } from "../../IconBookmarked/IconBookmarked";
14
7
  import { Table } from "../../Table/Table";
15
8
  import { getTableColumns } from "../../Table/utils/tableColumns";
16
9
 
@@ -68,120 +61,84 @@ export const CustomFieldTable = ({
68
61
  actions.addDefaultValue(data.id);
69
62
  }
70
63
 
64
+ const columns = getTableColumns({ actionsLength: 2 });
65
+
71
66
  return (
72
67
  <div data-fs-bp-custom-fields-table>
73
- <Table>
74
- <Table.Head columns={getTableColumns({ withActions: true })} />
75
-
68
+ {!loading && !data.length && (
69
+ <EmptyState title="No results found" iconName="TableEdit" />
70
+ )}
71
+ <Table layoutFixed>
72
+ <Table.Head columns={columns} />
76
73
  <Table.Body>
77
- {loading &&
78
- Array.from({ length: 10 }).map((option, index) => (
79
- <TableRow key={index}>
80
- <TableCell>
81
- <Skeleton size={{ width: "99%", height: "1.875rem" }} />
82
- </TableCell>
83
- <TableCell align="right">
84
- <Skeleton size={{ width: "99%", height: "1.875rem" }} />
85
- </TableCell>
86
- <TableCell align="right">
87
- <Skeleton size={{ width: "99%", height: "1.875rem" }} />
88
- </TableCell>
89
- <TableCell align="right">
90
- <Skeleton size={{ width: "99%", height: "1.875rem" }} />
91
- </TableCell>
92
- </TableRow>
93
- ))}
94
-
95
- {!loading &&
96
- !!data.length &&
74
+ {loading ? (
75
+ <Table.Loading columns={columns.length} />
76
+ ) : (
97
77
  data.map((option, index) => (
98
78
  <Table.Row
79
+ key={`${option.id}-${index}`}
80
+ title={option.value}
99
81
  iconName="TableEdit"
100
82
  iconSize={24}
101
- title={option.value}
102
83
  searchTerm={searchTerm}
103
- key={`${option.id}-${index}`}
104
- defaultItemIcon={
84
+ actionIcons={
105
85
  option.isDefault ? (
106
- <div data-fs-bp-table-row-default-icon>
107
- <Tooltip
108
- content="Unset as default"
109
- placement="top-center"
110
- >
111
- <Icon
112
- onClick={() => toggleDefaultItem(option)}
113
- name="Bookmark"
114
- width={20}
115
- height={20}
116
- />
117
- </Tooltip>
118
- </div>
119
- ) : (
120
- <br />
121
- )
86
+ <Tooltip content="Unset as default" placement="top-center">
87
+ <IconButton
88
+ data-fs-bp-custom-field-icon-btn
89
+ icon={<IconBookmarked />}
90
+ aria-label="Unset as default"
91
+ onClick={() => toggleDefaultItem(option)}
92
+ />
93
+ </Tooltip>
94
+ ) : null
122
95
  }
123
96
  dropdownMenu={
124
- <Dropdown data-fs-bp-dropdown>
125
- <BasicDropdownMenuTrigger
126
- data-fs-bp-custom-field-dropdown-trigger
97
+ <BasicDropdownMenu>
98
+ <DropdownItem
99
+ onClick={() => {
100
+ actions.rename();
101
+ actions.itemToSelect(option);
102
+ }}
103
+ >
104
+ <Icon name="FormatSize" /> <span>Rename</span>
105
+ </DropdownItem>
106
+ <DropdownItem onClick={() => toggleDefaultItem(option)}>
107
+ <Icon
108
+ name={
109
+ option.isDefault ? "BookmarkRemove" : "BookmarkAdd"
110
+ }
111
+ />{" "}
112
+ <span>
113
+ {option.isDefault
114
+ ? "Unset as default"
115
+ : "Set as default"}
116
+ </span>
117
+ </DropdownItem>
118
+ <BasicDropdownMenu.Separator />
119
+ <DropdownItem
120
+ onClick={() => {
121
+ actions.delete();
122
+ actions.itemToSelect(option);
123
+ actions.isOnlyDeleting(false);
124
+ }}
127
125
  >
128
- <Icon name="MoreVert" />
129
- </BasicDropdownMenuTrigger>
130
- <BasicDropdownMenu>
131
- <DropdownItem
132
- onClick={() => {
133
- actions.rename();
134
- actions.itemToSelect(option);
135
- }}
136
- >
137
- <Icon name="FormatSize" /> <span>Rename</span>
138
- </DropdownItem>
139
- <DropdownItem onClick={() => toggleDefaultItem(option)}>
140
- <Icon
141
- name={
142
- option.isDefault ? "BookmarkRemove" : "BookmarkAdd"
143
- }
144
- />{" "}
145
- <span>
146
- {option.isDefault
147
- ? "Unset as default"
148
- : "Set as default"}
149
- </span>
150
- </DropdownItem>
151
- <BasicDropdownMenu.Separator />
152
- <DropdownItem
153
- onClick={() => {
154
- actions.delete();
155
- actions.itemToSelect(option);
156
- actions.isOnlyDeleting(false);
157
- }}
158
- >
159
- <Icon name="CircleRemove" />{" "}
160
- <span>Remove from unit</span>
161
- </DropdownItem>
162
- <DropdownItem
163
- data-fs-bp-custom-fields-dropdown-item-danger
164
- onClick={() => {
165
- actions.removeFromUnit();
166
- actions.itemToSelect(option);
167
- actions.isOnlyDeleting(true);
168
- }}
169
- >
170
- <Icon name="Delete" /> <span>Delete</span>
171
- </DropdownItem>
172
- </BasicDropdownMenu>
173
- </Dropdown>
126
+ <Icon name="CircleRemove" /> <span>Remove from unit</span>
127
+ </DropdownItem>
128
+ <DropdownItem
129
+ data-fs-bp-dropdown-menu-item-mode="danger"
130
+ onClick={() => {
131
+ actions.removeFromUnit();
132
+ actions.itemToSelect(option);
133
+ actions.isOnlyDeleting(true);
134
+ }}
135
+ >
136
+ <Icon name="Delete" /> <span>Delete</span>
137
+ </DropdownItem>
138
+ </BasicDropdownMenu>
174
139
  }
175
140
  />
176
- ))}
177
-
178
- {!loading && !data.length && (
179
- <TableRow>
180
- <div data-fs-bp-custom-fields-empty-state>
181
- <Icon name="TableEdit" />
182
- <p>No results found</p>
183
- </div>
184
- </TableRow>
141
+ ))
185
142
  )}
186
143
  </Table.Body>
187
144
  </Table>
@@ -1,146 +1,41 @@
1
1
  [data-fs-bp-custom-fields-table] {
2
- @import "@faststore/ui/src/components/molecules/Table/styles.scss";
3
- @import "@faststore/ui/src/components/atoms/Skeleton/styles.scss";
4
- @import "@faststore/ui/src/components/atoms/Button/styles.scss";
5
- @import "@faststore/ui/src/components/molecules/Tooltip/styles.scss";
6
-
7
- @import "../../../../shared/components/Table/table.scss";
8
- @import "../../Toast/toast.scss";
9
-
10
- [data-fs-table] {
11
- overflow-x: visible;
12
- }
13
-
14
- [data-fs-bp-table-row] td {
15
- padding: var(--fs-spacing-1) 0;
16
- }
17
-
18
- [data-fs-table-head="true"] {
19
- [data-fs-table-row="true"] {
20
- border-bottom: var(--fs-border-width) solid #d6d6d6;
21
-
22
- [data-fs-table-cell="header"] {
23
- height: var(--fs-spacing-6);
24
- padding: 0;
25
-
26
- font-weight: var(--fs-text-weight-regular);
27
- color: #5c5c5c;
28
- font-size: var(--fs-text-size-1);
29
- }
30
- }
31
- }
32
-
33
- [data-fs-table-body="true"] {
34
- [data-fs-table-row="true"] {
35
- &:hover {
36
- background-color: #f5f5f5;
37
- transition: background 0.2s;
38
- }
39
-
40
- &:last-child {
41
- border-bottom: var(--fs-border-width) solid #d6d6d6;
42
- }
43
-
44
- [data-fs-table-cell] {
45
- height: 3.5rem;
46
- font-weight: var(--fs-text-weight-medium);
47
- color: #1f1f1f;
48
- font-size: var(--fs-text-size-1);
49
- padding: 0;
50
-
51
- [data-fs-icon] {
52
- display: inline-block;
53
- color: #0366dd;
54
- width: var(--fs-spacing-4);
55
- height: var(--fs-spacing-4);
56
- margin: 0;
57
- }
58
-
59
- [data-fs-button] {
60
- width: 3rem;
61
- height: 3rem;
62
-
63
- &[data-fs-bp-custom-fields-dropdown-button] {
64
- &:hover {
65
- cursor: pointer;
66
- }
67
- }
68
-
69
- [data-fs-button-wrapper] {
70
- border-radius: var(--fs-border-radius-pill);
71
- padding: 0;
72
- }
73
- }
74
-
75
- &:first-child {
76
- width: var(--fs-spacing-6);
77
- text-align: center;
78
-
79
- > svg {
80
- margin: 0;
81
- }
82
- }
83
- }
84
- }
85
-
86
- [data-fs-bp-custom-field-dropdown-trigger] {
87
- &[data-fs-bp-basic-dropdown-menu-trigger] {
88
- [data-fs-icon] {
89
- color: #1f1f1f;
90
- }
91
- }
92
- }
93
- }
94
-
95
- [data-fs-skeleton] {
96
- display: inline-block;
97
- padding-top: var(--fs-spacing-0)
98
- }
99
-
100
- [data-fs-bp-table-row-default-icon] {
101
- display: flex;
102
- justify-content: flex-end;
103
- color: #0366dd;
104
- }
105
-
106
- [data-fs-tooltip] {
107
- --fs-tooltip-background: #1f1f1f;
108
-
109
- [data-fs-tooltip-wrapper] {
110
- position: absolute;
111
- }
112
- }
113
-
114
- [data-fs-bp-custom-fields-empty-state] {
115
- display: flex;
116
- flex-direction: column;
117
- justify-content: center;
118
- align-items: center;
119
- gap: var(--fs-spacing-1);
120
- height: 18.75rem;
121
-
122
- color: #858585;
123
- font-weight: var(--fs-text-weight-semibold);
124
-
125
- [data-fs-icon] {
126
- width: var(--fs-spacing-6);
127
- height: var(--fs-spacing-6);
128
- margin: 0;
129
- }
130
- }
131
- }
132
-
133
- [data-fs-bp-basic-dropdown-menu] {
134
- &[data-fs-dropdown-menu] {
135
- [data-fs-bp-custom-fields-dropdown-item-danger] {
136
- &[data-fs-dropdown-item] {
137
- color: #d31a15;
138
-
139
- &:hover,
140
- [data-fs-icon] {
141
- color: #d31a15;
142
- }
143
- }
144
- }
145
- }
2
+ @import "@faststore/ui/src/components/molecules/Table/styles.scss";
3
+ @import "@faststore/ui/src/components/atoms/Skeleton/styles.scss";
4
+ @import "@faststore/ui/src/components/atoms/Button/styles.scss";
5
+
6
+ @import "../../../../shared/components/Table/table.scss";
7
+ @import "../../Toast/toast.scss";
8
+ @import "../../IconBookmarked/icon-bookmarked.scss";
9
+ @import "../../EmptyState/empty-state.scss";
10
+
11
+ [data-fs-tooltip] {
12
+ --fs-tooltip-background: #1f1f1f;
13
+
14
+ [data-fs-tooltip-wrapper] {
15
+ position: absolute;
16
+ }
17
+ }
18
+
19
+ [data-fs-bp-custom-fields-empty-state] {
20
+ display: flex;
21
+ flex-direction: column;
22
+ justify-content: center;
23
+ align-items: center;
24
+ gap: var(--fs-spacing-1);
25
+ height: 18.75rem;
26
+
27
+ color: #858585;
28
+ font-weight: var(--fs-text-weight-semibold);
29
+
30
+ [data-fs-icon] {
31
+ width: var(--fs-spacing-6);
32
+ height: var(--fs-spacing-6);
33
+ margin: 0;
34
+ }
35
+ }
36
+
37
+ [data-fs-bp-custom-field-icon-btn] {
38
+ --fs-button-height: var(--fs-spacing-6);
39
+ --fs-button-border-radius: 50%;
40
+ }
146
41
  }
@@ -0,0 +1,9 @@
1
+ import Icon from "../Icon/Icon";
2
+
3
+ export const IconBookmarked = () => {
4
+ return (
5
+ <span data-fs-bp-icon-bookmarked>
6
+ <Icon name="Bookmark" width={20} height={20} />
7
+ </span>
8
+ );
9
+ };
@@ -0,0 +1,9 @@
1
+ [data-fs-bp-icon-bookmarked] {
2
+ display: inline-flex;
3
+ flex: none;
4
+ align-items: center;
5
+ width: var(--fs-spacing-6);
6
+ height: var(--fs-spacing-6);
7
+ color: #0366dd;
8
+ justify-content: center;
9
+ }
@@ -6,10 +6,15 @@ import { TableRow } from "./TableRow/TableRow";
6
6
 
7
7
  export type TableProps = {
8
8
  children: React.ReactNode;
9
+ layoutFixed?: boolean;
9
10
  };
10
11
 
11
- export const Table = ({ children }: TableProps) => {
12
- return <table data-fs-bp-table>{children}</table>;
12
+ export const Table = ({ children, layoutFixed = false }: TableProps) => {
13
+ return (
14
+ <table data-fs-bp-table data-fs-bp-table-layout-fixed={layoutFixed}>
15
+ {children}
16
+ </table>
17
+ );
13
18
  };
14
19
 
15
20
  Table.Head = TableHead;
@@ -1,7 +1,19 @@
1
1
  import type { ComponentProps } from "react";
2
2
 
3
- export type TableCellProps = ComponentProps<"td">;
3
+ export type TableCellProps = {
4
+ align?: "left" | "center" | "right";
5
+ hideOnScreenSize?: "phonemid" | "tablet";
6
+ } & ComponentProps<"td">;
4
7
 
5
- export const TableCell = ({ ...otherProps }) => (
6
- <td data-fs-bp-table-cell {...otherProps} />
8
+ export const TableCell = ({
9
+ align = "left",
10
+ hideOnScreenSize,
11
+ ...otherProps
12
+ }: TableCellProps) => (
13
+ <td
14
+ data-fs-bp-table-cell
15
+ data-fs-bp-table-cell-align={align}
16
+ data-fs-bp-table-cell-hide-on-screen-size={hideOnScreenSize || undefined}
17
+ {...otherProps}
18
+ />
7
19
  );
@@ -0,0 +1,34 @@
1
+ [data-fs-bp-table-cell] {
2
+ padding: var(--fs-spacing-1) 0;
3
+ font-size: var(--fs-text-size-1);
4
+ color: #1f1f1f;
5
+ position: relative;
6
+ height: var(--fs-spacing-8);
7
+
8
+ &[data-fs-bp-table-cell-align="center"] {
9
+ text-align: center;
10
+ justify-content: center;
11
+ }
12
+
13
+ &[data-fs-bp-table-cell-align="left"] {
14
+ text-align: left;
15
+ justify-content: flex-start;
16
+ }
17
+
18
+ &[data-fs-bp-table-cell-align="right"] {
19
+ text-align: right;
20
+ justify-content: flex-end;
21
+ }
22
+
23
+ &[data-fs-bp-table-cell-hide-on-screen-size="phonemid"] {
24
+ @include media("<=phonemid") {
25
+ display: none;
26
+ }
27
+ }
28
+
29
+ &[data-fs-bp-table-cell-hide-on-screen-size="tablet"] {
30
+ @include media("<=tablet") {
31
+ display: none;
32
+ }
33
+ }
34
+ }