@licklist/design 0.78.19 → 0.78.21
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/.storybook/main.cjs +55 -6
- package/.storybook/preview.jsx +77 -7
- package/dist/Maintenance/Maintenance.scss.js +6 -0
- package/dist/Maintenance/MaintenancePage.d.ts +12 -0
- package/dist/Maintenance/MaintenancePage.d.ts.map +1 -0
- package/dist/Maintenance/MaintenancePage.js +98 -0
- package/dist/Maintenance/SkeletonSidebar.d.ts +5 -0
- package/dist/Maintenance/SkeletonSidebar.d.ts.map +1 -0
- package/dist/Maintenance/SkeletonSidebar.js +101 -0
- package/dist/PageNotFound/PageNotFound.d.ts +10 -0
- package/dist/PageNotFound/PageNotFound.d.ts.map +1 -0
- package/dist/PageNotFound/PageNotFound.js +42 -0
- package/dist/PageNotFound/index.d.ts +2 -0
- package/dist/PageNotFound/index.d.ts.map +1 -0
- package/dist/UnderMaintenance/UnderMaintenance.d.ts +4 -0
- package/dist/UnderMaintenance/UnderMaintenance.d.ts.map +1 -0
- package/dist/UnderMaintenance/UnderMaintenance.js +39 -0
- package/dist/UnderMaintenance/UnderMaintenance.scss.js +6 -0
- package/dist/UnderMaintenance/index.d.ts +2 -0
- package/dist/UnderMaintenance/index.d.ts.map +1 -0
- package/dist/auth/Authorizer.d.ts.map +1 -1
- package/dist/auth/Authorizer.js +4 -3
- package/dist/auth/Layout/UserNavDropDown.js +1 -1
- package/dist/auth/Login/LoginComponent.d.ts.map +1 -1
- package/dist/auth/Login/LoginComponent.js +8 -6
- package/dist/auth/Logout/Logout.js +1 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js +4 -3
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js +2 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/notification/components/NotificationPlaceholders.js +1 -1
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +13 -5
- package/dist/provider/provider-details-input/ProviderDetailsInput.js +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.js +7 -3
- package/dist/sortable-tree/SortableTree.js +1 -26
- package/dist/styles/overrides/_functions.scss +1 -1
- package/dist/v2/components/Alert/Alert.d.ts +14 -0
- package/dist/v2/components/Alert/Alert.d.ts.map +1 -0
- package/dist/v2/components/Alert/index.d.ts +3 -0
- package/dist/v2/components/Alert/index.d.ts.map +1 -0
- package/dist/v2/components/Button/Button.d.ts +10 -0
- package/dist/v2/components/Button/Button.d.ts.map +1 -0
- package/dist/v2/components/Button/index.d.ts +3 -0
- package/dist/v2/components/Button/index.d.ts.map +1 -0
- package/dist/v2/components/Colors/Colors.d.ts +21 -0
- package/dist/v2/components/Colors/Colors.d.ts.map +1 -0
- package/dist/v2/components/Colors/index.d.ts +3 -0
- package/dist/v2/components/Colors/index.d.ts.map +1 -0
- package/dist/v2/components/Typography/Typography.d.ts +11 -0
- package/dist/v2/components/Typography/Typography.d.ts.map +1 -0
- package/dist/v2/components/Typography/index.d.ts +3 -0
- package/dist/v2/components/Typography/index.d.ts.map +1 -0
- package/dist/v2/hooks/useAuth.d.ts +4 -0
- package/dist/v2/hooks/useAuth.d.ts.map +1 -0
- package/dist/v2/index.d.ts +56 -0
- package/dist/v2/index.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasAdminSideBar/FigmasAdminSideBar.d.ts +8 -0
- package/dist/v2/navigation/FigmasAdminSideBar/FigmasAdminSideBar.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasAdminSideBar/index.d.ts +3 -0
- package/dist/v2/navigation/FigmasAdminSideBar/index.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasSideBar/FigmasSideBar.d.ts +22 -0
- package/dist/v2/navigation/FigmasSideBar/FigmasSideBar.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasSideBar/index.d.ts +3 -0
- package/dist/v2/navigation/FigmasSideBar/index.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasTopHat/FigmasTopHat.d.ts +15 -0
- package/dist/v2/navigation/FigmasTopHat/FigmasTopHat.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasTopHat/index.d.ts +3 -0
- package/dist/v2/navigation/FigmasTopHat/index.d.ts.map +1 -0
- package/dist/v2/navigation/Navigation/Navigation.d.ts +9 -0
- package/dist/v2/navigation/Navigation/Navigation.d.ts.map +1 -0
- package/dist/v2/navigation/Navigation/index.d.ts +3 -0
- package/dist/v2/navigation/Navigation/index.d.ts.map +1 -0
- package/dist/v2/navigation/NavigationItem/NavigationItem.d.ts +12 -0
- package/dist/v2/navigation/NavigationItem/NavigationItem.d.ts.map +1 -0
- package/dist/v2/navigation/NavigationItem/index.d.ts +3 -0
- package/dist/v2/navigation/NavigationItem/index.d.ts.map +1 -0
- package/dist/v2/navigation/NavigationSection/NavigationSection.d.ts +8 -0
- package/dist/v2/navigation/NavigationSection/NavigationSection.d.ts.map +1 -0
- package/dist/v2/navigation/NavigationSection/index.d.ts +3 -0
- package/dist/v2/navigation/NavigationSection/index.d.ts.map +1 -0
- package/dist/v2/navigation/SideBarToggleLarge/SideBarToggleLarge.d.ts +9 -0
- package/dist/v2/navigation/SideBarToggleLarge/SideBarToggleLarge.d.ts.map +1 -0
- package/dist/v2/navigation/SideBarToggleLarge/index.d.ts +3 -0
- package/dist/v2/navigation/SideBarToggleLarge/index.d.ts.map +1 -0
- package/dist/v2/navigation/SidebarUserElement/SidebarUserElement.d.ts +15 -0
- package/dist/v2/navigation/SidebarUserElement/SidebarUserElement.d.ts.map +1 -0
- package/dist/v2/navigation/SidebarUserElement/index.d.ts +3 -0
- package/dist/v2/navigation/SidebarUserElement/index.d.ts.map +1 -0
- package/dist/v2/navigation/SidebarWithAuth.d.ts +20 -0
- package/dist/v2/navigation/SidebarWithAuth.d.ts.map +1 -0
- package/dist/v2/navigation/TopHatControlDisc/TopHatControlDisc.d.ts +9 -0
- package/dist/v2/navigation/TopHatControlDisc/TopHatControlDisc.d.ts.map +1 -0
- package/dist/v2/navigation/TopHatControlDisc/index.d.ts +3 -0
- package/dist/v2/navigation/TopHatControlDisc/index.d.ts.map +1 -0
- package/dist/v2/navigation/config.d.ts +3 -0
- package/dist/v2/navigation/config.d.ts.map +1 -0
- package/dist/v2/navigation/icons/index.d.ts +12 -0
- package/dist/v2/navigation/icons/index.d.ts.map +1 -0
- package/dist/v2/navigation/index.d.ts +23 -0
- package/dist/v2/navigation/index.d.ts.map +1 -0
- package/dist/v2/types/navigation.d.ts +17 -0
- package/dist/v2/types/navigation.d.ts.map +1 -0
- package/package.json +4 -3
- package/rollup.config.js +13 -0
- package/src/Maintenance/Maintenance.scss +253 -0
- package/src/Maintenance/MaintenancePage.tsx +59 -0
- package/src/Maintenance/SkeletonSidebar.tsx +56 -0
- package/src/PageNotFound/PageNotFound.scss +8 -0
- package/src/PageNotFound/PageNotFound.stories.tsx +23 -0
- package/src/PageNotFound/PageNotFound.tsx +43 -0
- package/src/PageNotFound/index.ts +1 -0
- package/src/UnderMaintenance/UnderMaintenance.scss +6 -0
- package/src/UnderMaintenance/UnderMaintenance.stories.tsx +23 -0
- package/src/UnderMaintenance/UnderMaintenance.tsx +22 -0
- package/src/UnderMaintenance/index.ts +1 -0
- package/src/auth/Auth.stories.tsx +37 -3
- package/src/auth/Authorizer.tsx +3 -2
- package/src/auth/ChangePassword/ChangePassword.stories.tsx +1 -8
- package/src/auth/Layout/UserNavDropDown.tsx +1 -1
- package/src/auth/Login/Login.stories.tsx +1 -6
- package/src/auth/Login/LoginComponent.tsx +7 -5
- package/src/auth/Logout/Logout.stories.tsx +3 -0
- package/src/auth/Logout/Logout.tsx +1 -1
- package/src/auth/Register/Register.stories.tsx +3 -7
- package/src/auth/ResetPassword/ResetPassword.stories.tsx +1 -8
- package/src/auth/Social/Social.stories.tsx +1 -6
- package/src/collapsible-input-group/CollapsibleInputGroup.stories.tsx +72 -4
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +2 -1
- package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.stories.tsx +3 -2
- package/src/events/event-card/EventCard.stories.tsx +3 -2
- package/src/events/event-statistic-modal/EventStatisticModal.stories.tsx +2 -1
- package/src/events/event-venue-map/EventVenueMap.stories.tsx +8 -1
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx +3 -3
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +2 -2
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx +1 -1
- package/src/iframe/custom-fields/components/CustomDateField.stories.tsx +3 -2
- package/src/iframe/event/event-card/IframeEventCard.stories.tsx +7 -5
- package/src/iframe/event/event-card/IframeEventCards.stories.tsx +7 -6
- package/src/iframe/event/event-description/EventDescription.stories.tsx +3 -2
- package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +3 -2
- package/src/iframe/external-modal/ExternalModal.stories.tsx +3 -0
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +5 -0
- package/src/iframe/order-process/components/NavigationSteps/NavigationSteps.stories.tsx +2 -1
- package/src/iframe/order-process/components/PaymentCard/PaymentCard.stories.tsx +2 -1
- package/src/iframe/page/Page.stories.tsx +9 -8
- package/src/iframe/payment/order-items-table/OrderItemsTable.stories.tsx +2 -1
- package/src/iframe/payment/payment-status-header/PaymentStatusHeader.stories.tsx +2 -1
- package/src/index.ts +2 -0
- package/src/logo/Logo.stories.tsx +17 -14
- package/src/modals/confirmation/Confirmation.stories.tsx +2 -1
- package/src/notification/components/NotificationPlaceholders.stories.tsx +4 -0
- package/src/notification/components/NotificationPlaceholders.tsx +1 -1
- package/src/product-set/form/ProductCategoriesControl.tsx +12 -6
- package/src/product-set/form/ProductSetForm.stories.tsx +13 -4
- package/src/provider/location-input/LocationInput.stories.tsx +47 -2
- package/src/provider/provider-details-input/ProviderDetailsInput.stories.tsx +10 -1
- package/src/provider/provider-details-input/ProviderDetailsInput.tsx +1 -1
- package/src/provider/provider-form/ProviderForm.stories.tsx +46 -0
- package/src/provider/venue-form/VenueForm.stories.tsx +49 -0
- package/src/recurrence-input/RecurrenceEndInput.tsx +7 -5
- package/src/recurrence-input/RecurrenceInput.stories.tsx +3 -0
- package/src/resource/form/ResourceForm.stories.tsx +2 -1
- package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +2 -1
- package/src/sales/life-time-sales/LifeTimeSalesChart.stories.tsx +2 -1
- package/src/sales/manual-booking/select-date-type-control/SelectDateTypeControl.stories.tsx +2 -1
- package/src/sales/manual-booking/select-menu/SelectMenu.stories.tsx +2 -1
- package/src/sales/modals/payment-modal/PaymentModal.stories.tsx +3 -2
- package/src/sales/modals/refund-modal/RefundModal.stories.tsx +5 -4
- package/src/sales/payment-form/SalePaymentForm.stories.tsx +3 -2
- package/src/setting/dashboard/snippet-templates/card/SnippetTemplateCard.stories.tsx +2 -1
- package/src/snippet/snippet-template/SnippetTemplate.stories.tsx +2 -1
- package/src/snippet/snippet-template/form/SnippetTemplateForm.stories.tsx +4 -2
- package/src/sortable-tree/SortableTree.tsx +1 -1
- package/src/sortable-tree/SortableTreeItem.stories.tsx +12 -14
- package/src/styles/overrides/_functions.scss +1 -1
- package/src/table/Table.stories.tsx +3 -24
- package/src/tiptap-editor/TipTapMenu/TipTapMenu.stories.tsx +27 -3
- package/src/v2/components/Alert/Alert.scss +186 -0
- package/src/v2/components/Alert/Alert.stories.tsx +176 -0
- package/src/v2/components/Alert/Alert.tsx +62 -0
- package/src/v2/components/Alert/assets/alert-icon.svg +3 -0
- package/src/v2/components/Alert/assets/error-icon.svg +3 -0
- package/src/v2/components/Alert/assets/info-icon.svg +3 -0
- package/src/v2/components/Alert/assets/success-icon.svg +3 -0
- package/src/v2/components/Alert/index.ts +2 -0
- package/src/v2/components/Button/Button.scss +19 -0
- package/src/v2/components/Button/Button.stories.tsx +93 -0
- package/src/v2/components/Button/Button.tsx +37 -0
- package/src/v2/components/Button/index.ts +3 -0
- package/src/v2/components/Colors/Colors.scss +64 -0
- package/src/v2/components/Colors/Colors.stories.tsx +143 -0
- package/src/v2/components/Colors/Colors.tsx +51 -0
- package/src/v2/components/Colors/ColorsAliases.stories.tsx +285 -0
- package/src/v2/components/Colors/Sizes.stories.tsx +141 -0
- package/src/v2/components/Colors/index.ts +2 -0
- package/src/v2/components/Typography/Typography.scss +72 -0
- package/src/v2/components/Typography/Typography.stories.tsx +266 -0
- package/src/v2/components/Typography/Typography.tsx +56 -0
- package/src/v2/components/Typography/index.ts +2 -0
- package/src/v2/hooks/useAuth.ts +40 -0
- package/src/v2/index.ts +105 -0
- package/src/v2/navigation/FigmasAdminSideBar/FigmasAdminSideBar.scss +148 -0
- package/src/v2/navigation/FigmasAdminSideBar/FigmasAdminSideBar.stories.tsx +132 -0
- package/src/v2/navigation/FigmasAdminSideBar/FigmasAdminSideBar.tsx +272 -0
- package/src/v2/navigation/FigmasAdminSideBar/index.ts +2 -0
- package/src/v2/navigation/FigmasSideBar/FigmasSideBar.scss +214 -0
- package/src/v2/navigation/FigmasSideBar/FigmasSideBar.stories.tsx +164 -0
- package/src/v2/navigation/FigmasSideBar/FigmasSideBar.tsx +310 -0
- package/src/v2/navigation/FigmasSideBar/index.ts +2 -0
- package/src/v2/navigation/FigmasTopHat/FigmasTopHat.scss +291 -0
- package/src/v2/navigation/FigmasTopHat/FigmasTopHat.stories.tsx +201 -0
- package/src/v2/navigation/FigmasTopHat/FigmasTopHat.tsx +158 -0
- package/src/v2/navigation/FigmasTopHat/assets/bell-icon.svg +3 -0
- package/src/v2/navigation/FigmasTopHat/assets/disc-icon.svg +4 -0
- package/src/v2/navigation/FigmasTopHat/assets/inbox-icon.svg +3 -0
- package/src/v2/navigation/FigmasTopHat/assets/logo-desktop-1.svg +3 -0
- package/src/v2/navigation/FigmasTopHat/assets/logo-desktop-2.svg +4 -0
- package/src/v2/navigation/FigmasTopHat/assets/user-icon.svg +4 -0
- package/src/v2/navigation/FigmasTopHat/index.ts +2 -0
- package/src/v2/navigation/Navigation/Navigation.scss +15 -0
- package/src/v2/navigation/Navigation/Navigation.stories.tsx +137 -0
- package/src/v2/navigation/Navigation/Navigation.tsx +127 -0
- package/src/v2/navigation/Navigation/index.ts +3 -0
- package/src/v2/navigation/NavigationItem/NavigationItem.scss +61 -0
- package/src/v2/navigation/NavigationItem/NavigationItem.stories.tsx +110 -0
- package/src/v2/navigation/NavigationItem/NavigationItem.tsx +38 -0
- package/src/v2/navigation/NavigationItem/index.ts +3 -0
- package/src/v2/navigation/NavigationSection/NavigationSection.scss +20 -0
- package/src/v2/navigation/NavigationSection/NavigationSection.tsx +19 -0
- package/src/v2/navigation/NavigationSection/index.ts +3 -0
- package/src/v2/navigation/SideBarToggleLarge/SideBarToggleLarge.scss +64 -0
- package/src/v2/navigation/SideBarToggleLarge/SideBarToggleLarge.stories.tsx +183 -0
- package/src/v2/navigation/SideBarToggleLarge/SideBarToggleLarge.tsx +30 -0
- package/src/v2/navigation/SideBarToggleLarge/assets/sidebar-icon.svg +5 -0
- package/src/v2/navigation/SideBarToggleLarge/index.ts +2 -0
- package/src/v2/navigation/SidebarUserElement/SidebarUserElement.scss +148 -0
- package/src/v2/navigation/SidebarUserElement/SidebarUserElement.stories.tsx +342 -0
- package/src/v2/navigation/SidebarUserElement/SidebarUserElement.tsx +113 -0
- package/src/v2/navigation/SidebarUserElement/index.ts +2 -0
- package/src/v2/navigation/SidebarWithAuth.stories.tsx +208 -0
- package/src/v2/navigation/SidebarWithAuth.tsx +49 -0
- package/src/v2/navigation/TopHatControlDisc/TopHatControlDisc.scss +57 -0
- package/src/v2/navigation/TopHatControlDisc/TopHatControlDisc.stories.tsx +153 -0
- package/src/v2/navigation/TopHatControlDisc/TopHatControlDisc.tsx +30 -0
- package/src/v2/navigation/TopHatControlDisc/assets/disc-icon.svg +4 -0
- package/src/v2/navigation/TopHatControlDisc/index.ts +2 -0
- package/src/v2/navigation/config.tsx +150 -0
- package/src/v2/navigation/icons/index.tsx +72 -0
- package/src/v2/navigation/index.ts +23 -0
- package/src/v2/styles/components/Button.scss +168 -0
- package/src/v2/styles/form/NewInput.scss +172 -0
- package/src/v2/styles/index.scss +5 -0
- package/src/v2/styles/navigation/Navigation.scss +17 -0
- package/src/v2/styles/navigation/NavigationItem.scss +86 -0
- package/src/v2/styles/navigation/NavigationSection.scss +26 -0
- package/src/v2/styles/navigation/_index.scss +9 -0
- package/src/v2/styles/tokens/_aliases.scss +199 -0
- package/src/v2/styles/tokens/_colors.scss +121 -0
- package/src/v2/styles/tokens/_sizes.scss +122 -0
- package/src/v2/styles/tokens/_status.scss +108 -0
- package/src/v2/styles/tokens/_typography.scss +146 -0
- package/src/v2/types/navigation.ts +17 -0
- package/src/zone/form/ZoneForm.stories.tsx +2 -1
- package/styles/overrides/_functions.scss +6 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { ColorsShowcase } from './Colors'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'v2/Design System/Colors',
|
|
7
|
+
component: ColorsShowcase,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'padded',
|
|
10
|
+
},
|
|
11
|
+
} as Meta
|
|
12
|
+
|
|
13
|
+
type Story = StoryObj<typeof ColorsShowcase>
|
|
14
|
+
|
|
15
|
+
const purples = {
|
|
16
|
+
title: 'Purples',
|
|
17
|
+
colors: [
|
|
18
|
+
{ name: 'purple.50', hex: '#efe6fd', rgb: 'RGB: 239, 230, 253' },
|
|
19
|
+
{ name: 'purple.100', hex: '#dccefb', rgb: 'RGB: 220, 206, 251' },
|
|
20
|
+
{ name: 'purple.200', hex: '#c49af7', rgb: 'RGB: 196, 154, 247' },
|
|
21
|
+
{ name: 'purple.300', hex: '#a866f3', rgb: 'RGB: 168, 102, 243' },
|
|
22
|
+
{ name: 'purple.400', hex: '#8c33ef', rgb: 'RGB: 140, 51, 239' },
|
|
23
|
+
{ name: 'purple.500', hex: '#7000eb', rgb: 'RGB: 112, 0, 235' },
|
|
24
|
+
{ name: 'purple.600', hex: '#5a00bc', rgb: 'RGB: 90, 0, 188' },
|
|
25
|
+
{ name: 'purple.700', hex: '#450091', rgb: 'RGB: 69, 0, 145' },
|
|
26
|
+
{ name: 'purple.800', hex: '#2f0064', rgb: 'RGB: 47, 0, 100' },
|
|
27
|
+
{ name: 'purple.900', hex: '#1a0036', rgb: 'RGB: 26, 0, 54' },
|
|
28
|
+
],
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const labels = {
|
|
32
|
+
title: 'Labels - Text Colors',
|
|
33
|
+
colors: [
|
|
34
|
+
{ name: 'label.primary', hex: '#121e52', description: 'Main text color' },
|
|
35
|
+
{ name: 'label.secondary', hex: '#626a90', description: 'Secondary text' },
|
|
36
|
+
{ name: 'label.tertiary', hex: '#979db2', description: 'Tertiary text' },
|
|
37
|
+
{ name: 'label.disabled', hex: '#c2c7d4', description: 'Disabled text' },
|
|
38
|
+
{ name: 'label.inverse', hex: '#ffffff', description: 'Text on dark backgrounds' },
|
|
39
|
+
],
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const surfaces = {
|
|
43
|
+
title: 'Surfaces - Background Colors',
|
|
44
|
+
colors: [
|
|
45
|
+
{ name: 'surface.primary', hex: '#ffffff', description: 'Main background' },
|
|
46
|
+
{ name: 'surface.secondary', hex: '#f8f8fa', description: 'Secondary background' },
|
|
47
|
+
{ name: 'surface.tertiary', hex: '#e8e9ef', description: 'Tertiary background' },
|
|
48
|
+
{ name: 'surface.hover', hex: '#f0f0f2', description: 'Hover state' },
|
|
49
|
+
{ name: 'surface.active', hex: '#e8e9ef', description: 'Active state' },
|
|
50
|
+
],
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const borders = {
|
|
54
|
+
title: 'Borders',
|
|
55
|
+
colors: [
|
|
56
|
+
{ name: 'border.primary', hex: '#e8e9ef', description: 'Main border color' },
|
|
57
|
+
{ name: 'border.secondary', hex: '#d4d6dd', description: 'Secondary border' },
|
|
58
|
+
{ name: 'border.focus', hex: '#7000eb', description: 'Focus border' },
|
|
59
|
+
],
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const brand = {
|
|
63
|
+
title: 'Brand Colors',
|
|
64
|
+
colors: [
|
|
65
|
+
{ name: 'primary', hex: '#7000eb', description: 'Main brand color' },
|
|
66
|
+
{ name: 'primary.hover', hex: '#5a00bc', description: 'Hover state' },
|
|
67
|
+
{ name: 'primary.active', hex: '#450091', description: 'Active state' },
|
|
68
|
+
{ name: 'primary.focus', hex: '#8c33ef', description: 'Focus state' },
|
|
69
|
+
],
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const status = {
|
|
73
|
+
title: 'Status Colors (Legacy)',
|
|
74
|
+
colors: [
|
|
75
|
+
{ name: 'success', hex: '#10b981', description: 'Success state' },
|
|
76
|
+
{ name: 'success.light', hex: '#d1fae5', description: 'Success background' },
|
|
77
|
+
{ name: 'error', hex: '#ef4444', description: 'Error state' },
|
|
78
|
+
{ name: 'error.light', hex: '#fee2e2', description: 'Error background' },
|
|
79
|
+
{ name: 'warning', hex: '#f59e0b', description: 'Warning state' },
|
|
80
|
+
{ name: 'warning.light', hex: '#fef3c7', description: 'Warning background' },
|
|
81
|
+
{ name: 'info', hex: '#3b82f6', description: 'Info state' },
|
|
82
|
+
{ name: 'info.light', hex: '#dbeafe', description: 'Info background' },
|
|
83
|
+
],
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const statusTokens = {
|
|
87
|
+
title: 'Status Colors (Figma Alerts & Errors)',
|
|
88
|
+
colors: [
|
|
89
|
+
{ name: 'success.fill', hex: '#2d6b18', description: 'Success fill/icon color' },
|
|
90
|
+
{ name: 'success.background', hex: '#eef9ea', description: 'Success background' },
|
|
91
|
+
{ name: 'success.border', hex: '#c9ecbd', description: 'Success border color' },
|
|
92
|
+
{ name: 'error.fill', hex: '#cc3c35', description: 'Error fill/icon color' },
|
|
93
|
+
{ name: 'error.background', hex: '#fceceb', description: 'Error background' },
|
|
94
|
+
{ name: 'error.border', hex: '#f5c4c2', description: 'Error border color' },
|
|
95
|
+
{ name: 'alert.fill', hex: '#fd7e14', description: 'Alert fill/icon color' },
|
|
96
|
+
{ name: 'alert.background', hex: '#fcf6e7', description: 'Alert background' },
|
|
97
|
+
{ name: 'alert.border', hex: '#f6e3b4', description: 'Alert border color' },
|
|
98
|
+
{ name: 'info.fill', hex: '#0e8ce2', description: 'Info fill/icon color' },
|
|
99
|
+
{ name: 'info.background', hex: '#e7f4fc', description: 'Info background' },
|
|
100
|
+
{ name: 'info.border', hex: '#b4dbf6', description: 'Info border color' },
|
|
101
|
+
],
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export const PurpleScale: Story = {
|
|
105
|
+
render: () => <ColorsShowcase {...purples} />,
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export const Labels: Story = {
|
|
109
|
+
render: () => <ColorsShowcase {...labels} />,
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export const Surfaces: Story = {
|
|
113
|
+
render: () => <ColorsShowcase {...surfaces} />,
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export const Borders: Story = {
|
|
117
|
+
render: () => <ColorsShowcase {...borders} />,
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export const Brand: Story = {
|
|
121
|
+
render: () => <ColorsShowcase {...brand} />,
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export const Status: Story = {
|
|
125
|
+
render: () => <ColorsShowcase {...status} />,
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export const StatusTokens: Story = {
|
|
129
|
+
render: () => <ColorsShowcase {...statusTokens} />,
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export const AllColors: Story = {
|
|
133
|
+
render: () => (
|
|
134
|
+
<div>
|
|
135
|
+
<ColorsShowcase {...purples} />
|
|
136
|
+
<ColorsShowcase {...labels} />
|
|
137
|
+
<ColorsShowcase {...surfaces} />
|
|
138
|
+
<ColorsShowcase {...borders} />
|
|
139
|
+
<ColorsShowcase {...brand} />
|
|
140
|
+
<ColorsShowcase {...status} />
|
|
141
|
+
</div>
|
|
142
|
+
),
|
|
143
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import './Colors.scss'
|
|
3
|
+
|
|
4
|
+
interface ColorSwatchProps {
|
|
5
|
+
name: string
|
|
6
|
+
hex: string
|
|
7
|
+
rgb?: string
|
|
8
|
+
className?: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const ColorSwatch: React.FC<ColorSwatchProps> = ({ name, hex, rgb, className }) => {
|
|
12
|
+
return (
|
|
13
|
+
<div className={`color-swatch ${className || ''}`}>
|
|
14
|
+
<div className="color-swatch__preview" style={{ backgroundColor: hex }} />
|
|
15
|
+
<div className="color-swatch__details">
|
|
16
|
+
<div className="color-swatch__name">{name}</div>
|
|
17
|
+
<div className="color-swatch__hex">{hex}</div>
|
|
18
|
+
{rgb && <div className="color-swatch__rgb">{rgb}</div>}
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface ColorGroup {
|
|
25
|
+
title: string
|
|
26
|
+
colors: {
|
|
27
|
+
name: string
|
|
28
|
+
hex: string
|
|
29
|
+
rgb?: string
|
|
30
|
+
description?: string
|
|
31
|
+
}[]
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const ColorsShowcase: React.FC<ColorGroup> = ({ title, colors }) => {
|
|
35
|
+
return (
|
|
36
|
+
<div className="colors-showcase">
|
|
37
|
+
<h3 className="colors-showcase__title">{title}</h3>
|
|
38
|
+
<div className="colors-showcase__grid">
|
|
39
|
+
{colors.map((color) => (
|
|
40
|
+
<ColorSwatch
|
|
41
|
+
key={color.name}
|
|
42
|
+
name={color.name}
|
|
43
|
+
hex={color.hex}
|
|
44
|
+
rgb={color.rgb}
|
|
45
|
+
className={color.description ? 'color-swatch--with-description' : ''}
|
|
46
|
+
/>
|
|
47
|
+
))}
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'v2/Design System/Color Aliases',
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'padded',
|
|
8
|
+
},
|
|
9
|
+
} as Meta
|
|
10
|
+
|
|
11
|
+
type Story = StoryObj
|
|
12
|
+
|
|
13
|
+
export const Labels: Story = {
|
|
14
|
+
render: () => (
|
|
15
|
+
<div>
|
|
16
|
+
<h2>Label Colors - Text Alias Tokens</h2>
|
|
17
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '16px', marginTop: '24px' }}>
|
|
18
|
+
<div style={{ padding: '16px', backgroundColor: '#ffffff', border: '1px solid #e8e9ef', borderRadius: '8px' }}>
|
|
19
|
+
<div style={{ color: 'var(--labels-main-label-primary, #121e52)', fontSize: '15px', fontWeight: 600, marginBottom: '8px' }}>
|
|
20
|
+
label-primary
|
|
21
|
+
</div>
|
|
22
|
+
<div style={{ fontFamily: 'monospace', fontSize: '14px', color: 'var(--labels-main-label-primary, #121e52)' }}>
|
|
23
|
+
var(--labels-main-label-primary, #121e52)
|
|
24
|
+
</div>
|
|
25
|
+
<div style={{ fontFamily: 'monospace', fontSize: '12px', marginTop: '4px', color: '#626a90' }}>
|
|
26
|
+
#121e52
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div style={{ padding: '16px', backgroundColor: '#ffffff', border: '1px solid #e8e9ef', borderRadius: '8px' }}>
|
|
31
|
+
<div style={{ color: 'var(--labels-main-label-secondary, #626a90)', fontSize: '15px', fontWeight: 600, marginBottom: '8px' }}>
|
|
32
|
+
label-secondary
|
|
33
|
+
</div>
|
|
34
|
+
<div style={{ fontFamily: 'monospace', fontSize: '14px', color: 'var(--labels-main-label-secondary, #626a90)' }}>
|
|
35
|
+
var(--labels-main-label-secondary, #626a90)
|
|
36
|
+
</div>
|
|
37
|
+
<div style={{ fontFamily: 'monospace', fontSize: '12px', marginTop: '4px', color: '#626a90' }}>
|
|
38
|
+
#626a90
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div style={{ padding: '16px', backgroundColor: '#ffffff', border: '1px solid #e8e9ef', borderRadius: '8px' }}>
|
|
43
|
+
<div style={{ color: 'var(--labels-main-label-tertiary, #979db2)', fontSize: '15px', fontWeight: 600, marginBottom: '8px' }}>
|
|
44
|
+
label-tertiary
|
|
45
|
+
</div>
|
|
46
|
+
<div style={{ fontFamily: 'monospace', fontSize: '14px', color: 'var(--labels-main-label-tertiary, #979db2)' }}>
|
|
47
|
+
var(--labels-main-label-tertiary, #979db2)
|
|
48
|
+
</div>
|
|
49
|
+
<div style={{ fontFamily: 'monospace', fontSize: '12px', marginTop: '4px', color: '#626a90' }}>
|
|
50
|
+
#979db2
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div style={{ padding: '16px', backgroundColor: '#ffffff', border: '1px solid #e8e9ef', borderRadius: '8px' }}>
|
|
55
|
+
<div style={{ color: 'var(--labels-main-label-disabled, #c2c7d4)', fontSize: '15px', fontWeight: 600, marginBottom: '8px' }}>
|
|
56
|
+
label-disabled
|
|
57
|
+
</div>
|
|
58
|
+
<div style={{ fontFamily: 'monospace', fontSize: '14px', color: 'var(--labels-main-label-disabled, #c2c7d4)' }}>
|
|
59
|
+
var(--labels-main-label-disabled, #c2c7d4)
|
|
60
|
+
</div>
|
|
61
|
+
<div style={{ fontFamily: 'monospace', fontSize: '12px', marginTop: '4px', color: '#626a90' }}>
|
|
62
|
+
#c2c7d4
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div style={{ padding: '16px', backgroundColor: '#14215a', border: '1px solid #e8e9ef', borderRadius: '8px' }}>
|
|
67
|
+
<div style={{ color: 'var(--labels-main-label-inverse, #ffffff)', fontSize: '15px', fontWeight: 600, marginBottom: '8px' }}>
|
|
68
|
+
label-inverse
|
|
69
|
+
</div>
|
|
70
|
+
<div style={{ fontFamily: 'monospace', fontSize: '14px', color: 'var(--labels-main-label-inverse, #ffffff)' }}>
|
|
71
|
+
var(--labels-main-label-inverse, #ffffff)
|
|
72
|
+
</div>
|
|
73
|
+
<div style={{ fontFamily: 'monospace', fontSize: '12px', marginTop: '4px', color: '#626a90' }}>
|
|
74
|
+
#ffffff
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
),
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export const Surfaces: Story = {
|
|
83
|
+
render: () => (
|
|
84
|
+
<div>
|
|
85
|
+
<h2>Surface Colors - Background Alias Tokens</h2>
|
|
86
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '16px', marginTop: '24px' }}>
|
|
87
|
+
<div style={{ padding: '16px', backgroundColor: 'var(--surfaces-main-background-primary, #ffffff)', border: '1px solid #e8e9ef', borderRadius: '8px' }}>
|
|
88
|
+
<div style={{ color: 'var(--labels-main-label-primary, #121e52)', fontSize: '15px', fontWeight: 600, marginBottom: '8px' }}>
|
|
89
|
+
background-primary
|
|
90
|
+
</div>
|
|
91
|
+
<div style={{ fontFamily: 'monospace', fontSize: '14px', color: 'var(--labels-main-label-primary, #121e52)' }}>
|
|
92
|
+
var(--surfaces-main-background-primary, #ffffff)
|
|
93
|
+
</div>
|
|
94
|
+
<div style={{ fontFamily: 'monospace', fontSize: '12px', marginTop: '4px', color: '#626a90' }}>
|
|
95
|
+
#ffffff
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<div style={{ padding: '16px', backgroundColor: 'var(--surfaces-main-background-secondary, #f8f8fa)', border: '1px solid #e8e9ef', borderRadius: '8px' }}>
|
|
100
|
+
<div style={{ color: 'var(--labels-main-label-primary, #121e52)', fontSize: '15px', fontWeight: 600, marginBottom: '8px' }}>
|
|
101
|
+
background-secondary
|
|
102
|
+
</div>
|
|
103
|
+
<div style={{ fontFamily: 'monospace', fontSize: '14px', color: 'var(--labels-main-label-primary, #121e52)' }}>
|
|
104
|
+
var(--surfaces-main-background-secondary, #f8f8fa)
|
|
105
|
+
</div>
|
|
106
|
+
<div style={{ fontFamily: 'monospace', fontSize: '12px', marginTop: '4px', color: '#626a90' }}>
|
|
107
|
+
#f8f8fa
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
<div style={{ padding: '16px', backgroundColor: 'var(--surfaces-main-background-secondary-hover, #e8e9ef)', border: '1px solid #e8e9ef', borderRadius: '8px' }}>
|
|
112
|
+
<div style={{ color: 'var(--labels-main-label-primary, #121e52)', fontSize: '15px', fontWeight: 600, marginBottom: '8px' }}>
|
|
113
|
+
background-secondary-hover
|
|
114
|
+
</div>
|
|
115
|
+
<div style={{ fontFamily: 'monospace', fontSize: '14px', color: 'var(--labels-main-label-primary, #121e52)' }}>
|
|
116
|
+
var(--surfaces-main-background-secondary-hover, #e8e9ef)
|
|
117
|
+
</div>
|
|
118
|
+
<div style={{ fontFamily: 'monospace', fontSize: '12px', marginTop: '4px', color: '#626a90' }}>
|
|
119
|
+
#e8e9ef
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
),
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export const Borders: Story = {
|
|
128
|
+
render: () => (
|
|
129
|
+
<div>
|
|
130
|
+
<h2>Border Colors - Alias Tokens</h2>
|
|
131
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '16px', marginTop: '24px' }}>
|
|
132
|
+
<div style={{ padding: '16px', backgroundColor: '#ffffff', border: '2px solid var(--borders-main-border-primary, #e8e9ef)', borderRadius: '8px' }}>
|
|
133
|
+
<div style={{ color: 'var(--labels-main-label-primary, #121e52)', fontSize: '15px', fontWeight: 600, marginBottom: '8px' }}>
|
|
134
|
+
border-primary
|
|
135
|
+
</div>
|
|
136
|
+
<div style={{ fontFamily: 'monospace', fontSize: '14px', color: 'var(--labels-main-label-primary, #121e52)' }}>
|
|
137
|
+
var(--borders-main-border-primary, #e8e9ef)
|
|
138
|
+
</div>
|
|
139
|
+
<div style={{ fontFamily: 'monospace', fontSize: '12px', marginTop: '4px', color: '#626a90' }}>
|
|
140
|
+
#e8e9ef
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
),
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export const AdditionalAliases: Story = {
|
|
149
|
+
render: () => (
|
|
150
|
+
<div>
|
|
151
|
+
<h2>Additional Alias Tokens</h2>
|
|
152
|
+
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(2, 1fr)', gap: '16px', marginTop: '24px' }}>
|
|
153
|
+
{/* Labels */}
|
|
154
|
+
<div>
|
|
155
|
+
<h3 style={{ marginBottom: '12px', color: 'var(--labels-main-label-primary, #121e52)', fontSize: '18px', fontWeight: 600 }}>Labels</h3>
|
|
156
|
+
{['primary', 'secondary', 'tertiary', 'disabled', 'inverse'].map((label) => (
|
|
157
|
+
<div key={label} style={{ padding: '8px', backgroundColor: label === 'inverse' ? '#14215a' : '#ffffff', borderRadius: '4px', marginBottom: '8px' }}>
|
|
158
|
+
<div style={{ fontFamily: 'monospace', fontSize: '12px', color: label === 'inverse' ? '#ffffff' : '#121e52' }}>
|
|
159
|
+
--labels-main-label-{label}
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
))}
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
{/* Surfaces */}
|
|
166
|
+
<div>
|
|
167
|
+
<h3 style={{ marginBottom: '12px', color: 'var(--labels-main-label-primary, #121e52)', fontSize: '18px', fontWeight: 600 }}>Surfaces</h3>
|
|
168
|
+
{['primary', 'secondary', 'secondary-hover', 'tertiary', 'active', 'focus'].map((surface) => (
|
|
169
|
+
<div key={surface} style={{ padding: '8px', backgroundColor: '#ffffff', borderRadius: '4px', marginBottom: '8px' }}>
|
|
170
|
+
<div style={{ fontFamily: 'monospace', fontSize: '12px', color: '#121e52' }}>
|
|
171
|
+
--surfaces-main-background-{surface.replace(/-/g, '-')}
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
))}
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
{/* Borders */}
|
|
178
|
+
<div>
|
|
179
|
+
<h3 style={{ marginBottom: '12px', color: 'var(--labels-main-label-primary, #121e52)', fontSize: '18px', fontWeight: 600 }}>Borders</h3>
|
|
180
|
+
{['primary', 'secondary', 'colour-overlay', 'focus'].map((border) => (
|
|
181
|
+
<div key={border} style={{ padding: '8px', backgroundColor: '#ffffff', borderRadius: '4px', marginBottom: '8px' }}>
|
|
182
|
+
<div style={{ fontFamily: 'monospace', fontSize: '12px', color: '#121e52' }}>
|
|
183
|
+
--borders-main-border-{border.replace(/-/g, '-')}
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
))}
|
|
187
|
+
</div>
|
|
188
|
+
|
|
189
|
+
{/* Fills */}
|
|
190
|
+
<div>
|
|
191
|
+
<h3 style={{ marginBottom: '12px', color: 'var(--labels-main-label-primary, #121e52)', fontSize: '18px', fontWeight: 600 }}>Fills</h3>
|
|
192
|
+
{['primary', 'secondary', 'disabled'].map((fill) => (
|
|
193
|
+
<div key={fill} style={{ padding: '8px', backgroundColor: '#ffffff', borderRadius: '4px', marginBottom: '8px' }}>
|
|
194
|
+
<div style={{ fontFamily: 'monospace', fontSize: '12px', color: '#121e52' }}>
|
|
195
|
+
--fills-main-fill-{fill}
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
))}
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
{/* Color Surfaces */}
|
|
202
|
+
<div>
|
|
203
|
+
<h3 style={{ marginBottom: '12px', color: 'var(--labels-main-label-primary, #121e52)', fontSize: '18px', fontWeight: 600 }}>Color Surfaces</h3>
|
|
204
|
+
{['teal', 'orange', 'green', 'red'].map((colour) => (
|
|
205
|
+
<div key={colour} style={{ padding: '8px', backgroundColor: '#ffffff', borderRadius: '4px', marginBottom: '8px' }}>
|
|
206
|
+
<div style={{ fontFamily: 'monospace', fontSize: '12px', color: '#121e52' }}>
|
|
207
|
+
--surfaces-colour-{colour}
|
|
208
|
+
</div>
|
|
209
|
+
</div>
|
|
210
|
+
))}
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
{/* Spacing Shortcuts */}
|
|
214
|
+
<div>
|
|
215
|
+
<h3 style={{ marginBottom: '12px', color: 'var(--labels-main-label-primary, #121e52)', fontSize: '18px', fontWeight: 600 }}>Spacing Shortcuts</h3>
|
|
216
|
+
{['25', '50', '100'].map((spacing) => (
|
|
217
|
+
<div key={spacing} style={{ padding: '8px', backgroundColor: '#ffffff', borderRadius: '4px', marginBottom: '8px' }}>
|
|
218
|
+
<div style={{ fontFamily: 'monospace', fontSize: '12px', color: '#121e52' }}>
|
|
219
|
+
--spacing-{spacing}
|
|
220
|
+
</div>
|
|
221
|
+
</div>
|
|
222
|
+
))}
|
|
223
|
+
</div>
|
|
224
|
+
|
|
225
|
+
{/* Radius Shortcuts */}
|
|
226
|
+
<div>
|
|
227
|
+
<h3 style={{ marginBottom: '12px', color: 'var(--labels-main-label-primary, #121e52)', fontSize: '18px', fontWeight: 600 }}>Radius Shortcuts</h3>
|
|
228
|
+
<div style={{ padding: '8px', backgroundColor: '#ffffff', borderRadius: '4px' }}>
|
|
229
|
+
<div style={{ fontFamily: 'monospace', fontSize: '12px', color: '#121e52' }}>
|
|
230
|
+
--radius-50
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
|
|
235
|
+
{/* Opacity Tokens */}
|
|
236
|
+
<div>
|
|
237
|
+
<h3 style={{ marginBottom: '12px', color: 'var(--labels-main-label-primary, #121e52)', fontSize: '18px', fontWeight: 600 }}>Opacity Aliases</h3>
|
|
238
|
+
{[100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0].map((opacity) => (
|
|
239
|
+
<div key={opacity} style={{ padding: '8px', backgroundColor: '#ffffff', borderRadius: '4px', marginBottom: '8px' }}>
|
|
240
|
+
<div style={{ fontFamily: 'monospace', fontSize: '12px', color: '#121e52' }}>
|
|
241
|
+
--opacity-{opacity}-percent
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
))}
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
</div>
|
|
248
|
+
),
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export const Usage: Story = {
|
|
252
|
+
render: () => (
|
|
253
|
+
<div>
|
|
254
|
+
<h2>Using Color Aliases</h2>
|
|
255
|
+
<div style={{ marginTop: '24px' }}>
|
|
256
|
+
<h3 style={{ marginBottom: '16px', color: 'var(--labels-main-label-primary, #121e52)' }}>In CSS:</h3>
|
|
257
|
+
<pre style={{ background: '#f8f8fa', padding: '16px', borderRadius: '8px', fontFamily: 'monospace', fontSize: '14px' }}>
|
|
258
|
+
{`.my-text {
|
|
259
|
+
color: var(--labels-main-label-primary, #121e52);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.my-background {
|
|
263
|
+
background-color: var(--surfaces-main-background-primary, #ffffff);
|
|
264
|
+
border: 1px solid var(--borders-main-border-primary, #e8e9ef);
|
|
265
|
+
}`}
|
|
266
|
+
</pre>
|
|
267
|
+
</div>
|
|
268
|
+
<div style={{ marginTop: '24px' }}>
|
|
269
|
+
<h3 style={{ marginBottom: '16px', color: 'var(--labels-main-label-primary, #121e52)' }}>In SCSS (using mixins):</h3>
|
|
270
|
+
<pre style={{ background: '#f8f8fa', padding: '16px', borderRadius: '8px', fontFamily: 'monospace', fontSize: '14px' }}>
|
|
271
|
+
{`@import 'styles/tokens/aliases';
|
|
272
|
+
|
|
273
|
+
.my-text {
|
|
274
|
+
@include label-primary;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.my-background {
|
|
278
|
+
@include surface-primary;
|
|
279
|
+
@include border-primary;
|
|
280
|
+
}`}
|
|
281
|
+
</pre>
|
|
282
|
+
</div>
|
|
283
|
+
</div>
|
|
284
|
+
),
|
|
285
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'v2/Design System/Size Tokens',
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'padded',
|
|
8
|
+
},
|
|
9
|
+
} as Meta
|
|
10
|
+
|
|
11
|
+
type Story = StoryObj
|
|
12
|
+
|
|
13
|
+
export const Radius: Story = {
|
|
14
|
+
render: () => (
|
|
15
|
+
<div>
|
|
16
|
+
<h2>Radius Tokens - Border Radius</h2>
|
|
17
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '16px', marginTop: '24px' }}>
|
|
18
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '24px' }}>
|
|
19
|
+
<div style={{ fontFamily: 'Geist Mono', fontSize: '14px', color: '#121e52', minWidth: '50px' }}>
|
|
20
|
+
zero
|
|
21
|
+
</div>
|
|
22
|
+
<div style={{ width: '41px', height: '41px', border: '1px solid #e7e8ea', borderRadius: 'var(--radius-zero)', backgroundColor: '#121e52' }} />
|
|
23
|
+
<div style={{ flex: 1 }} />
|
|
24
|
+
<div style={{ fontFamily: 'Geist', fontSize: '16px', color: '#121e52', textAlign: 'right' }}>0px</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '24px' }}>
|
|
28
|
+
<div style={{ fontFamily: 'Geist Mono', fontSize: '14px', color: '#121e52', minWidth: '50px' }}>
|
|
29
|
+
xs
|
|
30
|
+
</div>
|
|
31
|
+
<div style={{ width: '41px', height: '41px', border: '1px solid #e7e8ea', borderRadius: 'var(--radius-xs)', backgroundColor: '#121e52' }} />
|
|
32
|
+
<div style={{ flex: 1 }} />
|
|
33
|
+
<div style={{ fontFamily: 'Geist', fontSize: '16px', color: '#121e52', textAlign: 'right' }}>1px</div>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '24px' }}>
|
|
37
|
+
<div style={{ fontFamily: 'Geist Mono', fontSize: '14px', color: '#121e52', minWidth: '50px' }}>
|
|
38
|
+
sm
|
|
39
|
+
</div>
|
|
40
|
+
<div style={{ width: '41px', height: '41px', border: '1px solid #e7e8ea', borderRadius: 'var(--radius-sm)', backgroundColor: '#121e52' }} />
|
|
41
|
+
<div style={{ flex: 1 }} />
|
|
42
|
+
<div style={{ fontFamily: 'Geist', fontSize: '16px', color: '#121e52', textAlign: 'right' }}>2px</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '24px' }}>
|
|
46
|
+
<div style={{ fontFamily: 'Geist Mono', fontSize: '14px', color: '#121e52', minWidth: '50px' }}>
|
|
47
|
+
md
|
|
48
|
+
</div>
|
|
49
|
+
<div style={{ width: '41px', height: '41px', border: '1px solid #e7e8ea', borderRadius: 'var(--radius-md)', backgroundColor: '#121e52' }} />
|
|
50
|
+
<div style={{ flex: 1 }} />
|
|
51
|
+
<div style={{ fontFamily: 'Geist', fontSize: '16px', color: '#121e52', textAlign: 'right' }}>4px</div>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '24px' }}>
|
|
55
|
+
<div style={{ fontFamily: 'Geist Mono', fontSize: '14px', color: '#121e52', minWidth: '50px' }}>
|
|
56
|
+
reg
|
|
57
|
+
</div>
|
|
58
|
+
<div style={{ width: '41px', height: '41px', border: '1px solid #e7e8ea', borderRadius: 'var(--radius-reg)', backgroundColor: '#121e52' }} />
|
|
59
|
+
<div style={{ flex: 1 }} />
|
|
60
|
+
<div style={{ fontFamily: 'Geist', fontSize: '16px', color: '#121e52', textAlign: 'right' }}>8px</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '24px' }}>
|
|
64
|
+
<div style={{ fontFamily: 'Geist Mono', fontSize: '14px', color: '#121e52', minWidth: '50px' }}>
|
|
65
|
+
lg
|
|
66
|
+
</div>
|
|
67
|
+
<div style={{ width: '41px', height: '41px', border: '1px solid #e7e8ea', borderRadius: 'var(--radius-lg)', backgroundColor: '#121e52' }} />
|
|
68
|
+
<div style={{ flex: 1 }} />
|
|
69
|
+
<div style={{ fontFamily: 'Geist', fontSize: '16px', color: '#121e52', textAlign: 'right' }}>16px</div>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '24px' }}>
|
|
73
|
+
<div style={{ fontFamily: 'Geist Mono', fontSize: '14px', color: '#121e52', minWidth: '50px' }}>
|
|
74
|
+
xl
|
|
75
|
+
</div>
|
|
76
|
+
<div style={{ width: '41px', height: '41px', border: '1px solid #e7e8ea', borderRadius: 'var(--radius-xl)', backgroundColor: '#121e52' }} />
|
|
77
|
+
<div style={{ flex: 1 }} />
|
|
78
|
+
<div style={{ fontFamily: 'Geist', fontSize: '16px', color: '#121e52', textAlign: 'right' }}>24px</div>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
),
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export const Spacing: Story = {
|
|
86
|
+
render: () => (
|
|
87
|
+
<div>
|
|
88
|
+
<h2>Spacing Tokens</h2>
|
|
89
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '16px', marginTop: '24px' }}>
|
|
90
|
+
{[
|
|
91
|
+
{ token: 'zero', value: '0px' },
|
|
92
|
+
{ token: 'xxs', value: '1px' },
|
|
93
|
+
{ token: 'xs', value: '2px' },
|
|
94
|
+
{ token: 'sm', value: '4px' },
|
|
95
|
+
{ token: 'md', value: '8px' },
|
|
96
|
+
{ token: 'reg', value: '16px' },
|
|
97
|
+
{ token: 'lg', value: '24px' },
|
|
98
|
+
{ token: 'xl', value: '32px' },
|
|
99
|
+
{ token: 'xxl', value: '64px' },
|
|
100
|
+
{ token: 'super', value: '128px' },
|
|
101
|
+
].map(({ token, value }) => (
|
|
102
|
+
<div key={token} style={{ display: 'flex', alignItems: 'center', gap: '24px' }}>
|
|
103
|
+
<div style={{ fontFamily: 'Geist Mono', fontSize: '14px', color: '#121e52', minWidth: '80px' }}>
|
|
104
|
+
{token}
|
|
105
|
+
</div>
|
|
106
|
+
<div style={{ flex: 1, display: 'flex', alignItems: 'center' }}>
|
|
107
|
+
<div style={{ width: '32px', height: '32px', backgroundColor: '#121e52', borderRadius: '4px' }} />
|
|
108
|
+
<div style={{ height: '32px', backgroundColor: '#1f9ab5', opacity: 0.4, width: value, borderLeft: '1px solid #71e6ff', borderRight: '1px solid #71e6ff' }} />
|
|
109
|
+
<div style={{ width: '32px', height: '32px', backgroundColor: '#121e52', borderRadius: '4px' }} />
|
|
110
|
+
</div>
|
|
111
|
+
<div style={{ fontFamily: 'Geist', fontSize: '16px', color: '#121e52', textAlign: 'right', minWidth: '60px' }}>{value}</div>
|
|
112
|
+
</div>
|
|
113
|
+
))}
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
),
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export const Opacity: Story = {
|
|
120
|
+
render: () => (
|
|
121
|
+
<div>
|
|
122
|
+
<h2>Opacity Tokens</h2>
|
|
123
|
+
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(150px, 1fr))', gap: '16px', marginTop: '24px' }}>
|
|
124
|
+
{[100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0].map((opacity) => (
|
|
125
|
+
<div key={opacity} style={{ textAlign: 'center' }}>
|
|
126
|
+
<div style={{ width: '94px', height: '94px', backgroundColor: '#121e52', opacity: `var(--opacity-${opacity})`, border: '1px solid #e8e9ef', borderRadius: '47px', margin: '0 auto 16px' }} />
|
|
127
|
+
<div style={{ fontFamily: 'Geist', fontSize: '15px', fontWeight: 600, color: '#121e52', marginBottom: '8px' }}>
|
|
128
|
+
{opacity}%
|
|
129
|
+
</div>
|
|
130
|
+
<div style={{ fontFamily: 'Geist Mono', fontSize: '14px', color: '#121e52', backgroundColor: '#e8e9ef', padding: '4px 8px', borderRadius: '4px', display: 'inline-block' }}>
|
|
131
|
+
{opacity}
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
))}
|
|
135
|
+
</div>
|
|
136
|
+
<p style={{ marginTop: '24px', fontFamily: 'Geist', fontSize: '18px', color: '#121e52' }}>
|
|
137
|
+
We can interpolate for more refined opacities between the bands eg: 23% = 23 token value.
|
|
138
|
+
</p>
|
|
139
|
+
</div>
|
|
140
|
+
),
|
|
141
|
+
}
|