jp-composter 0.1.0

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 (194) hide show
  1. package/dist/index.d.mts +997 -0
  2. package/dist/index.d.ts +997 -0
  3. package/dist/index.js +36837 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/index.mjs +36778 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +66 -0
  8. package/src/SliceUI/IconMoon.tsx +33 -0
  9. package/src/SliceUI/assets/Anatomy diagram copy.svg +19 -0
  10. package/src/SliceUI/assets/Anatomy diagram.svg +19 -0
  11. package/src/SliceUI/assets/Anatomycheck.svg +15 -0
  12. package/src/SliceUI/assets/Anatomyinput.svg +32 -0
  13. package/src/SliceUI/assets/Checkbox.jpg +0 -0
  14. package/src/SliceUI/assets/Diagram copy.svg +15 -0
  15. package/src/SliceUI/assets/Diagram.jpg +0 -0
  16. package/src/SliceUI/assets/Diagram.svg +15 -0
  17. package/src/SliceUI/assets/Frame 5 copy.png +0 -0
  18. package/src/SliceUI/assets/Frame 5.png +0 -0
  19. package/src/SliceUI/assets/Frame 65.png +0 -0
  20. package/src/SliceUI/assets/Frame_65.png +0 -0
  21. package/src/SliceUI/assets/Icon copy.svg +3 -0
  22. package/src/SliceUI/assets/Icon.svg +3 -0
  23. package/src/SliceUI/assets/Icon_Bridging copy.svg +39 -0
  24. package/src/SliceUI/assets/Icon_Bridging.svg +39 -0
  25. package/src/SliceUI/assets/Icon_Consistent copy.svg +39 -0
  26. package/src/SliceUI/assets/Icon_Consistent.svg +39 -0
  27. package/src/SliceUI/assets/Icon_Plug copy.svg +38 -0
  28. package/src/SliceUI/assets/Icon_Plug.svg +38 -0
  29. package/src/SliceUI/assets/Icon_Reusable copy.svg +39 -0
  30. package/src/SliceUI/assets/Icon_Reusable.svg +39 -0
  31. package/src/SliceUI/assets/Layer_1.png +0 -0
  32. package/src/SliceUI/assets/accessibility.png +0 -0
  33. package/src/SliceUI/assets/accessibility.svg +1 -0
  34. package/src/SliceUI/assets/addon-library.png +0 -0
  35. package/src/SliceUI/assets/assets.png +0 -0
  36. package/src/SliceUI/assets/avif-test-image.avif +0 -0
  37. package/src/SliceUI/assets/bridging.svg +13 -0
  38. package/src/SliceUI/assets/consistent.svg +11 -0
  39. package/src/SliceUI/assets/context.png +0 -0
  40. package/src/SliceUI/assets/discord.svg +1 -0
  41. package/src/SliceUI/assets/docs.png +0 -0
  42. package/src/SliceUI/assets/figma-plugin.png +0 -0
  43. package/src/SliceUI/assets/github.svg +1 -0
  44. package/src/SliceUI/assets/resources/Anatomy diagram.svg +19 -0
  45. package/src/SliceUI/assets/resources/Anatomycheck.svg +15 -0
  46. package/src/SliceUI/assets/resources/Anatomyinput.svg +32 -0
  47. package/src/SliceUI/assets/resources/Diagram.svg +15 -0
  48. package/src/SliceUI/assets/resources/Frame 5.png +0 -0
  49. package/src/SliceUI/assets/resources/Frame 65.png +0 -0
  50. package/src/SliceUI/assets/resources/Icon.svg +3 -0
  51. package/src/SliceUI/assets/resources/Icon_Bridging.svg +39 -0
  52. package/src/SliceUI/assets/resources/Icon_Consistent.svg +39 -0
  53. package/src/SliceUI/assets/resources/Icon_Plug.svg +38 -0
  54. package/src/SliceUI/assets/resources/Icon_Reusable.svg +39 -0
  55. package/src/SliceUI/assets/resources/fonts/FontIcon.json +150 -0
  56. package/src/SliceUI/assets/resources/fonts/Lato-Black.ttf +0 -0
  57. package/src/SliceUI/assets/resources/fonts/Lato-Bold.ttf +0 -0
  58. package/src/SliceUI/assets/resources/fonts/Lato-Heavy.ttf +0 -0
  59. package/src/SliceUI/assets/resources/fonts/Lato-Medium.ttf +0 -0
  60. package/src/SliceUI/assets/resources/fonts/Lato-Regular.ttf +0 -0
  61. package/src/SliceUI/assets/resources/fonts/Lato.woff2 +0 -0
  62. package/src/SliceUI/assets/resources/fonts/icomoon.eot +0 -0
  63. package/src/SliceUI/assets/resources/fonts/icomoon.svg +601 -0
  64. package/src/SliceUI/assets/resources/fonts/icomoon.ttf +0 -0
  65. package/src/SliceUI/assets/resources/fonts/icomoon.woff +0 -0
  66. package/src/SliceUI/assets/resources/fonts/selection.json +1 -0
  67. package/src/SliceUI/assets/share.png +0 -0
  68. package/src/SliceUI/assets/styling.png +0 -0
  69. package/src/SliceUI/assets/testing.png +0 -0
  70. package/src/SliceUI/assets/theming.png +0 -0
  71. package/src/SliceUI/assets/tutorials.svg +1 -0
  72. package/src/SliceUI/assets/youtube.svg +1 -0
  73. package/src/SliceUI/automation/helper.ts +29 -0
  74. package/src/SliceUI/avatar/Avatar.tsx +237 -0
  75. package/src/SliceUI/avatar/Token.ts +116 -0
  76. package/src/SliceUI/avatar/Type.ts +36 -0
  77. package/src/SliceUI/avatar/helper.ts +53 -0
  78. package/src/SliceUI/badge/Badge.tsx +308 -0
  79. package/src/SliceUI/badge/Token.ts +202 -0
  80. package/src/SliceUI/badge/Type.ts +46 -0
  81. package/src/SliceUI/badge/helper.ts +39 -0
  82. package/src/SliceUI/button/Button.tsx +243 -0
  83. package/src/SliceUI/button/Token.ts +138 -0
  84. package/src/SliceUI/button/Type.ts +34 -0
  85. package/src/SliceUI/button/helper.ts +125 -0
  86. package/src/SliceUI/checkbox/Checkbox.tsx +176 -0
  87. package/src/SliceUI/checkbox/Token.ts +128 -0
  88. package/src/SliceUI/checkbox/Type.ts +35 -0
  89. package/src/SliceUI/chip/Chip.tsx +290 -0
  90. package/src/SliceUI/chip/Token.ts +151 -0
  91. package/src/SliceUI/chip/Type.ts +43 -0
  92. package/src/SliceUI/chip/helper.ts +40 -0
  93. package/src/SliceUI/colors/Pallete.ts +151 -0
  94. package/src/SliceUI/colors/Token.ts +110 -0
  95. package/src/SliceUI/colors/Type.ts +56 -0
  96. package/src/SliceUI/contextProvider/context.tsx +108 -0
  97. package/src/SliceUI/divider/Divider.tsx +109 -0
  98. package/src/SliceUI/divider/Token.ts +18 -0
  99. package/src/SliceUI/divider/Type.ts +26 -0
  100. package/src/SliceUI/icon/CustomIcon.ts +4 -0
  101. package/src/SliceUI/icon/IcoMoonIcon.tsx +11 -0
  102. package/src/SliceUI/icon/Icon.tsx +38 -0
  103. package/src/SliceUI/icon/Token.ts +14 -0
  104. package/src/SliceUI/icon/Type.ts +13 -0
  105. package/src/SliceUI/icon/selection.json +1 -0
  106. package/src/SliceUI/input/Input.tsx +573 -0
  107. package/src/SliceUI/input/ToDo.md +99 -0
  108. package/src/SliceUI/input/Token.ts +372 -0
  109. package/src/SliceUI/input/Type.ts +109 -0
  110. package/src/SliceUI/input/components/InputPortal.tsx +211 -0
  111. package/src/SliceUI/input/components/NativeBottomSheet.tsx +296 -0
  112. package/src/SliceUI/input/components/SelectChip.tsx +185 -0
  113. package/src/SliceUI/input/components/SelectList.tsx +173 -0
  114. package/src/SliceUI/input/components/SelectListItem.tsx +377 -0
  115. package/src/SliceUI/input/components/SelectScrollbarStyle.ts +44 -0
  116. package/src/SliceUI/input/hooks/useCustomScrollbar.ts +17 -0
  117. package/src/SliceUI/input/hooks/useInputState.ts +41 -0
  118. package/src/SliceUI/input/hooks/useLabelAnimation.ts +132 -0
  119. package/src/SliceUI/input/hooks/useOutsideClick.ts +38 -0
  120. package/src/SliceUI/input/hooks/useSelectLogic.ts +338 -0
  121. package/src/SliceUI/input/utils/inputUtils.ts +120 -0
  122. package/src/SliceUI/input/utils/selectUtils.ts +85 -0
  123. package/src/SliceUI/input/utils/styleUtils.ts +50 -0
  124. package/src/SliceUI/input/variants/CurrencyInput/CurrencyInput.tsx +16 -0
  125. package/src/SliceUI/input/variants/CurrencyInput/NativeCurrencyInput.tsx +181 -0
  126. package/src/SliceUI/input/variants/CurrencyInput/WebCurrencyInput.tsx +163 -0
  127. package/src/SliceUI/input/variants/CurrencyInput/types.ts +17 -0
  128. package/src/SliceUI/input/variants/PhoneInput/NativePhoneInput.tsx +189 -0
  129. package/src/SliceUI/input/variants/PhoneInput/PhoneInput.tsx +16 -0
  130. package/src/SliceUI/input/variants/PhoneInput/WebPhoneInput.tsx +291 -0
  131. package/src/SliceUI/input/variants/PhoneInput/types.ts +22 -0
  132. package/src/SliceUI/input/variants/SelectInput/SelectInput.tsx +407 -0
  133. package/src/SliceUI/input/variants/SelectInput/types.ts +34 -0
  134. package/src/SliceUI/input/variants/TextInput.tsx +68 -0
  135. package/src/SliceUI/layout/Box.tsx +38 -0
  136. package/src/SliceUI/layout/Center.tsx +38 -0
  137. package/src/SliceUI/layout/Divider.tsx +37 -0
  138. package/src/SliceUI/layout/Grid.tsx +75 -0
  139. package/src/SliceUI/layout/PageContainer.tsx +60 -0
  140. package/src/SliceUI/layout/ScrollContainer.tsx +72 -0
  141. package/src/SliceUI/layout/Spacer.tsx +54 -0
  142. package/src/SliceUI/layout/Stack.tsx +97 -0
  143. package/src/SliceUI/layout/StickyHeader.tsx +71 -0
  144. package/src/SliceUI/radio/RadioButton.tsx +130 -0
  145. package/src/SliceUI/radio/Token.ts +197 -0
  146. package/src/SliceUI/radio/Type.ts +35 -0
  147. package/src/SliceUI/react-native.config.js +3 -0
  148. package/src/SliceUI/responsive/Type.ts +7 -0
  149. package/src/SliceUI/responsive/helper.ts +53 -0
  150. package/src/SliceUI/switch/Switch.tsx +119 -0
  151. package/src/SliceUI/switch/Token.ts +205 -0
  152. package/src/SliceUI/switch/Type.ts +26 -0
  153. package/src/SliceUI/tab/TabItem.tsx +204 -0
  154. package/src/SliceUI/tab/Tabs.tsx +110 -0
  155. package/src/SliceUI/tab/Token.ts +282 -0
  156. package/src/SliceUI/tab/Type.ts +66 -0
  157. package/src/SliceUI/tab/helper.ts +53 -0
  158. package/src/SliceUI/table/Table.tsx +388 -0
  159. package/src/SliceUI/table/TableCell.tsx +158 -0
  160. package/src/SliceUI/table/TableFooter.tsx +353 -0
  161. package/src/SliceUI/table/TableHeader.tsx +247 -0
  162. package/src/SliceUI/table/TableRow.tsx +218 -0
  163. package/src/SliceUI/table/Token.ts +252 -0
  164. package/src/SliceUI/table/Type.ts +213 -0
  165. package/src/SliceUI/table/helper.ts +376 -0
  166. package/src/SliceUI/table/index.ts +53 -0
  167. package/src/SliceUI/theme/dummyColors.tsx +7 -0
  168. package/src/SliceUI/theme/theme.ts +107 -0
  169. package/src/SliceUI/typography/BaseTypographyToken.ts +62 -0
  170. package/src/SliceUI/typography/FoundationToken.ts +48 -0
  171. package/src/SliceUI/typography/Token.ts +228 -0
  172. package/src/SliceUI/typography/Type.ts +20 -0
  173. package/src/SliceUI/typography/Typography.tsx +99 -0
  174. package/src/SliceUI/values/BorderRadius.ts +17 -0
  175. package/src/SliceUI/values/BorderWidth.ts +7 -0
  176. package/src/SliceUI/values/Dimension.ts +35 -0
  177. package/src/SliceUI/values/IconSizes.ts +13 -0
  178. package/src/SliceUI/values/Spacing.ts +22 -0
  179. package/src/declarations.d.ts +8 -0
  180. package/src/index.tsx +119 -0
  181. package/src/stories/Colors.mdx +1418 -0
  182. package/src/stories/Dimensions.mdx +60 -0
  183. package/src/stories/GetStarted.mdx +90 -0
  184. package/src/stories/Introduction.mdx +136 -0
  185. package/src/stories/Shape.mdx +126 -0
  186. package/src/stories/Spacing.mdx +104 -0
  187. package/src/stories/Typography.mdx +454 -0
  188. package/src/stories/Utils.mdx +277 -0
  189. package/src/stories/story-components/AddIcon.js +13 -0
  190. package/src/stories/story-components/RectangleWithBox.jsx +51 -0
  191. package/src/stories/story-components/RoundedRectangle.jsx +18 -0
  192. package/src/stories/story-components/RoundedWithWhiteInside.jsx +33 -0
  193. package/src/stories/story-components/WhiteRoundedRectangle.jsx +107 -0
  194. package/src/stories/story-components/svgPaths.js +126 -0
@@ -0,0 +1,60 @@
1
+ import React from 'react';
2
+ import {Meta} from '@storybook/addon-docs/blocks';
3
+ import {dimensions} from '../SliceUI/values/Dimension.ts';
4
+
5
+ <Meta title="Tokens/Dimensions" />
6
+
7
+ # Dimensions
8
+
9
+ <h3 style={{fontWeight: 'normal', fontFamily: 'Lato'}}>
10
+ Slice’s dimension system is built for consistency, clarity, and flexibility
11
+ across all screens. We use a set of predefined values — mainly 2px, 4px, 8px,
12
+ and 16px — to keep spacing and sizing predictable and scalable. This helps
13
+ create clean layouts and makes collaboration smoother between design and
14
+ development.
15
+ </h3>
16
+
17
+ ---
18
+
19
+ # Core
20
+
21
+ <table
22
+ style={{
23
+ borderCollapse: 'separate',
24
+ borderSpacing: 0,
25
+ width: '100%',
26
+ border: '1px solid var(--border-light, #E6E6E6)',
27
+ borderRadius: '24px',
28
+ overflow: 'hidden',
29
+ }}>
30
+ <thead>
31
+ <tr style={{backgroundColor: '#f9f9f9'}}>
32
+ <th
33
+ style={{
34
+ padding: '12px 16px',
35
+ fontSize: '18px',
36
+ textAlign: 'left',
37
+ }}>
38
+ Title
39
+ </th>
40
+ <th
41
+ style={{
42
+ padding: '12px 16px',
43
+ fontSize: '18px',
44
+ textAlign: 'left',
45
+ }}>
46
+ Value
47
+ </th>
48
+ </tr>
49
+ </thead>
50
+ <tbody>
51
+ {Object.entries(dimensions).map(([key, value]) => (
52
+ <tr key={key} style={{backgroundColor: '#fff'}}>
53
+ <td style={{padding: '12px 16px'}}>
54
+ {key.replace(/^dimension/, 'Dimension-')}
55
+ </td>
56
+ <td style={{padding: '12px 16px'}}>{`${value}px`}</td>
57
+ </tr>
58
+ ))}
59
+ </tbody>
60
+ </table>
@@ -0,0 +1,90 @@
1
+ import {Meta} from '@storybook/addon-docs/blocks';
2
+
3
+ <Meta title="Getting started" />
4
+
5
+ Welcome! Whether you're a designer or a developer, this guide will help you get started and connect you to the essential resources you need.
6
+
7
+ ## Table of Contents
8
+
9
+ - [Design Resources](#design-resources)
10
+
11
+ - [Figma](#figma)
12
+ - [UI/UX Design Guidelines](https://brand.foodhub.com/uiux_standards/)
13
+ - [Design Assets](https://brand.foodhub.com/uiux_standards/)
14
+
15
+ - [Development Resources](#development-resources)
16
+ - [Coding Standards](#coding-standards)
17
+ - [Version Control](#version-control)
18
+ - [Development Tools](#development-tools)
19
+
20
+ ---
21
+
22
+ ## Design Resources
23
+
24
+ ### Figma
25
+
26
+ [Figma](https://www.figma.com/) is a collaborative design and prototyping tool. It's the heart of the design process, allowing designers to work together seamlessly.
27
+
28
+ - **Get Access**: If you're not already part of the Figma project, request access from the project lead or manager.
29
+
30
+ ### UI/UX Design Guidelines
31
+
32
+ Before you dive into designing, familiarize yourself with our UI/UX design guidelines. They provide valuable insights into our design philosophy and standards.
33
+
34
+ - [UI/UX Guidelines Document](https://brand.foodhub.com/uiux_standards/)
35
+
36
+ ### Design Assets
37
+
38
+ All the essential design assets like logos, icons, and brand guidelines can be found in the Figma project. Ensure you have access and familiarize yourself with these assets for consistency.
39
+
40
+ ---
41
+
42
+ ## Development Resources
43
+
44
+ ### Coding Standards
45
+
46
+ Maintaining a consistent code style is essential for collaborative development. Our coding standards document will guide you on best practices.
47
+
48
+ - [Coding Standards Document](https://your-coding-standards-link.com)
49
+
50
+ ### Version Control
51
+
52
+ We use Git for version control. Make sure you have Git installed and are familiar with its basics.
53
+
54
+ ### Development Tools
55
+
56
+ Your development environment is critical. Here are some tools and resources to help you set up your workspace:
57
+
58
+ - **Code Editor**: We recommend using [Visual Studio Code](https://code.visualstudio.com/) for development. It's highly customizable and supports a wide range of extensions.
59
+
60
+ - **Package Manager**: [npm](https://www.npmjs.com/) is the package manager we use for JavaScript projects. Install it to manage project dependencies.
61
+
62
+ ---
63
+
64
+ ## Food Hub Components
65
+
66
+ Building a design system for Food Hub involves creating reusable components that ensure consistency across the application. These components are the building blocks of our user interface.
67
+
68
+ ### Component Library
69
+
70
+ Our component library includes all the essential UI elements like buttons, forms, modals, and more. Each component is designed to be reusable and customizable.
71
+
72
+ - **Access the Library**: The component library is available in our Figma project. Make sure you have access to view and use these components.
73
+
74
+ ### Design Tokens
75
+
76
+ Design tokens are the core values that define our design system, such as colors, typography, spacing, and more. They ensure consistency and scalability across different platforms.
77
+
78
+ - **Color Tokens**: Define the primary, secondary, and neutral colors used in the application.
79
+ - **Typography Tokens**: Define font families, sizes, weights, and line heights.
80
+ - **Spacing Tokens**: Define the spacing scale used for margins and paddings.
81
+
82
+ ### Important Resources
83
+
84
+ To get started with building and using the Food Hub design system, refer to the following resources:
85
+
86
+ - [Component Library Documentation](https://your-component-library-link.com)
87
+ - [Design Tokens Documentation](http://localhost:6006/?path=/docs/design-tokens--docs)
88
+ - [Design System Guidelines](https://your-design-system-guidelines-link.com)
89
+
90
+ These resources will provide you with the necessary information to understand and implement the design system effectively.
@@ -0,0 +1,136 @@
1
+ import {Meta} from '@storybook/addon-docs/blocks';
2
+
3
+ import Frame_5 from '../SliceUI/assets/Frame 5.png';
4
+ import Layer1 from '../SliceUI/assets/Icon_Plug.svg';
5
+ import bridging from '../SliceUI/assets/Icon_Bridging.svg';
6
+ import consistent from '../SliceUI/assets/Icon_Consistent.svg';
7
+ import reusable from '../SliceUI/assets/Icon_Reusable.svg';
8
+
9
+ <Meta title="Introduction" />
10
+
11
+ ## <h1 style={{color:'#111'}}>Introduction</h1>
12
+
13
+ <img
14
+ src={Frame_5}
15
+ alt="A wall of logos representing different styling technologies"
16
+ />
17
+ <div style={{ padding: '32px 0px 0px 0px' }}>
18
+
19
+ <h1 style={{color: '#111'}}>What is Slice?</h1>
20
+
21
+ <h3 style={{fontWeight: 'normal',fontFamily:'Lato'}}>Slice is our Design System — a central source for reusable design patterns,
22
+ components, and assets. It helps teams collaborate better and move faster by sharing a common language and process.</h3>
23
+ <div style={{ padding: '20px 0px ', display: 'flex', flexDirection: 'column', gap: '20px' }}>
24
+ <div style={{
25
+ border: '1px solid #E6E6E6',
26
+ borderRadius: '20px',
27
+ padding: '24px 24px 8px 8px',
28
+ display: 'flex',
29
+ gap: '8px',
30
+ alignItems: 'center',
31
+ justifyContent: 'left'
32
+ }}>
33
+ <img
34
+ src={Layer1}
35
+ alt="Plug and Play Icon"
36
+ style={{
37
+ width: '88px',
38
+ height: '88px',
39
+ objectFit: 'contain'
40
+ }}
41
+ />
42
+ <div>
43
+ <h3>Plug-and-play</h3>
44
+ <p style={{marginTop:'-1px'}}><span>The Styleguide helps us move faster by taking care of the basics, so we can focus on bigger challenges. While every tool takes a little time to learn, we’ve built ready-to-use components with smart defaults to make it easy to get started. These components take more time to build upfront, but they save a lot of time later. You can customize them if you need to — but you don't have to.</span></p>
45
+ </div>
46
+ </div>
47
+
48
+ <div style={{
49
+ border: '1px solid #E6E6E6',
50
+ borderRadius: '20px',
51
+ padding: '24px 24px 8px 8px',
52
+ display: 'flex',
53
+ gap: '8px',
54
+ alignItems: 'center',
55
+ justifyContent: 'left'
56
+ }}>
57
+ <img
58
+ src={bridging}
59
+ alt="Bridging Icon"
60
+ style={{
61
+ width: '88px',
62
+ height: '88px',
63
+ objectFit: 'contain'
64
+ }}
65
+ />
66
+ <div>
67
+ <h3 >Bridging</h3>
68
+ <p style={{marginTop:'-1px'}}><span>With teams moving at lightning speed and working autonomously, it’s not always easy to prioritize crafting the best experience. Styleguide ensures every team can deliver consistent, high-quality experiences—while also strengthening collaboration between designers and developers.</span></p>
69
+ </div>
70
+ </div>
71
+
72
+ <div style={{
73
+ border: '1px solid #E6E6E6',
74
+ borderRadius: '20px',
75
+ padding: '24px 24px 8px 8px',
76
+ display: 'flex',
77
+ gap: '8px',
78
+ alignItems: 'center',
79
+ justifyContent: 'left'
80
+ }}>
81
+ <img
82
+ src={consistent}
83
+ alt="Consistent Icon"
84
+ style={{
85
+ width: '88px',
86
+ height: '88px',
87
+ objectFit: 'contain'
88
+ }}
89
+ />
90
+ <div>
91
+ <h3>Consistent</h3>
92
+ <p style={{marginTop:'-1px'}}><span>Being consistent has an impact much beyond brand presence and a better sense of quality. Reusing interaction and visual patterns makes for a more fluid experience using Foodhub products, and this arguably improves user experience. A Design System is the main tool for promoting alignment and improving consistency in whatever it touches.</span></p>
93
+ </div>
94
+ </div>
95
+
96
+ <div style={{
97
+ border: '1px solid #E6E6E6',
98
+ borderRadius: '20px',
99
+ padding: '24px 24px 8px 8px',
100
+ display: 'flex',
101
+ gap: '8px',
102
+ alignItems: 'center',
103
+ justifyContent: 'left'
104
+ }}>
105
+ <img
106
+ src={reusable}
107
+ alt="Reusable Icon"
108
+ style={{
109
+ width: '88px',
110
+ height: '88px',
111
+ objectFit: 'contain'
112
+ }}
113
+ />
114
+ <div>
115
+ <h3>Reusable</h3>
116
+ <p style={{marginTop:'-1px'}}><span>The impact of the work you put in a component is multiplied by the number of projects are reusing it — and this number grows every day! From a company-level, a culture of reusability reduces code redundancy and increases overall quality with well-tested, bullet-proof solutions.</span></p>
117
+ </div>
118
+ </div>
119
+
120
+ </div>
121
+ </div>
122
+
123
+ # Two worlds, one system
124
+
125
+ <div>
126
+ <p>
127
+ <span>
128
+ Slice is fuels two distinct worlds with one shared system: CM (Client
129
+ Management) and CO (Consumer Ordering). Each of them serves very different
130
+ users, with different contexts and needs, which implies in their own
131
+ guidelines and principles. While lots of atomic components are easily
132
+ shared between these worlds, others were designed with those principles in
133
+ mind and would even feel weird elsewhere — which is good!
134
+ </span>
135
+ </p>
136
+ </div>
@@ -0,0 +1,126 @@
1
+ import { Meta } from '@storybook/addon-docs/blocks';
2
+
3
+ <Meta title="Tokens/Shape" />
4
+
5
+ # Shape tokens
6
+ <h3 style={{fontWeight: 'normal',fontFamily:'Lato'}}>Slice’s shape tokens define corner radius and border width to bring consistency to how elements look and feel. By standardizing these values, we create a more unified visual style across buttons, cards, inputs, and other UI components.</h3>
7
+ ---
8
+
9
+ # Corner radius
10
+
11
+ <table
12
+ style={{
13
+ borderCollapse: 'separate',
14
+ borderSpacing: 0,
15
+ width: '100%',
16
+ borderRadius: '24px',
17
+ overflow: 'hidden',
18
+ border: '1px solid #ccc',
19
+ }}
20
+ >
21
+ <thead style={{backgroundColor: '#f9f9f9', textAlign: 'left' }}>
22
+ <tr>
23
+ <th style={{ padding: '12px 16px', fontWeight: '600' ,width:'50%'}}>
24
+ Title
25
+ </th>
26
+ <th style={{ padding: '12px 16px', fontWeight: '600',width:'50%' }}>
27
+ Value
28
+ </th>
29
+ </tr>
30
+ </thead>
31
+ <tbody>
32
+ {[
33
+ { token: 'border-radius-0', value: 'Dimension-00 (0 px)' },
34
+ { token: 'border-radius-30', value: 'Dimension-04 (8 px)' },
35
+ { token: 'border-radius-40', value: 'Dimension-06 (12 px)' },
36
+ { token: 'border-radius-50', value: 'Dimension-08 (16 px)' },
37
+ { token: 'border-radius-60', value: 'Dimension-10 (20 px)' },
38
+ { token: 'border-radius-70', value: 'Dimension-12 (24 px)' },
39
+ { token: 'border-radius-80', value: 'Dimension-14 (28 px)' },
40
+ { token: 'border-radius-90', value: 'Dimension-16 (32 px)' },
41
+ { token: 'border-radius-full', value: 'Dimension-100 (1000 px)' },
42
+ ].map(({ token, value }, i, arr) => {
43
+ const isLast = i === arr.length - 1;
44
+ return (
45
+ <tr key={token} style={{ backgroundColor: '#fff' }}>
46
+ <td
47
+ style={{
48
+ padding: '12px 16px',
49
+ borderBottom: isLast ? 'none' : '1px solid #ccc',
50
+ borderBottomRadius: isLast ? '24px' : 0,
51
+ }}
52
+ >
53
+ {token}
54
+ </td>
55
+ <td
56
+ style={{
57
+ padding: '12px 16px',
58
+ borderBottom: isLast ? 'none' : '1px solid #ccc',
59
+ borderBottomRadius: isLast ? '24px' : 0,
60
+ }}
61
+ >
62
+ {value}
63
+ </td>
64
+ </tr>
65
+ );
66
+ })}
67
+ </tbody>
68
+
69
+ </table>
70
+
71
+ # Border width
72
+ <table
73
+ style={{
74
+ borderCollapse: 'collapse',
75
+ borderSpacing: 0,
76
+ width: '100%',
77
+ borderRadius: '24px',
78
+ overflow: 'hidden',
79
+ }}
80
+ >
81
+ <thead style={{backgroundColor: '#f9f9f9', textAlign: 'left' }}>
82
+ <tr>
83
+ <th style={{ padding: '12px 16px', fontWeight: '600',width:'50%' }}>
84
+ Title
85
+ </th>
86
+ <th style={{ padding: '12px 16px', fontWeight: '600',width:'50%' }}>
87
+ Value
88
+ </th>
89
+ </tr>
90
+ </thead>
91
+ <tbody>
92
+ {[
93
+ { token: 'border-width-0', value: '0 px' },
94
+ { token: 'border-width-10', value: '1 px' },
95
+ { token: 'border-width-15', value: '1.5 px' },
96
+ { token: 'border-width-20', value: '2 px' },
97
+ { token: 'border-width-40', value: '4 px' },
98
+
99
+ ].map(({ token, value }, i, arr) => {
100
+ const isLast = i === arr.length - 1;
101
+ return (
102
+ <tr key={token} style={{ backgroundColor: '#fff' }}>
103
+ <td
104
+ style={{
105
+ padding: '12px 16px',
106
+ borderBottom: isLast ? 'none' : '1px solid #ccc',
107
+ borderBottomRadius: isLast ? '24px' : 0,
108
+ }}
109
+ >
110
+ {token}
111
+ </td>
112
+ <td
113
+ style={{
114
+ padding: '12px 16px',
115
+ borderBottom: isLast ? 'none' : '1px solid #ccc',
116
+ borderBottomRadius: isLast ? '24px' : 0,
117
+ }}
118
+ >
119
+ {value}
120
+ </td>
121
+ </tr>
122
+ );
123
+ })}
124
+ </tbody>
125
+
126
+ </table>
@@ -0,0 +1,104 @@
1
+ import {Meta} from '@storybook/addon-docs/blocks';
2
+
3
+ <Meta title="Tokens/Spacing" />
4
+
5
+ # Spacing tokens
6
+
7
+ <h3 style={{fontWeight: 'normal', fontFamily: 'Lato'}}>
8
+ Slice’s spacing tokens help maintain consistent padding and margins across the
9
+ product. Built on a base scale of 2px, 4px, 8px, and 16px, they make it easy
10
+ to create clean, organized layouts while improving alignment and rhythm in the
11
+ interface.
12
+ </h3>{' '}
13
+
14
+ ---
15
+
16
+ <table
17
+ style={{
18
+ borderCollapse: 'separate',
19
+ borderSpacing: 0,
20
+ width: '100%',
21
+ borderRadius: '24px',
22
+ overflow: 'hidden',
23
+ border: '1px solid #ccc',
24
+ }}
25
+ >
26
+ <thead style={{ backgroundColor: '#f9f9f9', textAlign: 'left' }}>
27
+ <tr>
28
+ <th style={{ padding: '12px 16px', fontWeight: '600', fontSize: '14px' }}>Title</th>
29
+ <th style={{ padding: '12px 16px', fontWeight: '600', fontSize: '14px' }}>Value</th>
30
+ <th style={{ padding: '12px 16px', fontWeight: '600', fontSize: '14px' }}>Example</th>
31
+ </tr>
32
+ </thead>
33
+ <tbody>
34
+ {
35
+ // First 13 rows
36
+ Array.from({ length: 13 }).map((_, i) => {
37
+ const title = i * 50;
38
+ const value = `Dimension-${i.toString().padStart(2, '0')} (${i * 2}px)`;
39
+
40
+ // Only show the bar if i > 0
41
+ const showBar = i !== 0;
42
+
43
+ // Bar width increases by 2px per row starting from 2px at i = 1
44
+ const boxWidth = i * 2;
45
+
46
+ return (
47
+ <tr key={i} style={{ backgroundColor: '#fff' }}>
48
+ <td style={{ padding: '12px 16px', borderTop: '1px solid #eee' }}>
49
+ space-{title}
50
+ </td>
51
+ <td style={{ padding: '12px 16px', borderTop: '1px solid #eee' }}>
52
+ {value}
53
+ </td>
54
+ <td style={{ padding: '12px 16px', borderTop: '1px solid #eee' }}>
55
+ {
56
+ showBar ? (
57
+ <div
58
+ style={{
59
+ width: `${boxWidth}px`,
60
+ height: '40px',
61
+ background: 'var(--blue-200, #B5BDF4)',
62
+ }}
63
+ />
64
+ ) : null
65
+ }
66
+ </td>
67
+ </tr>
68
+ );
69
+ })
70
+
71
+ }
72
+
73
+ {
74
+ // Last 5 custom rows
75
+ [
76
+ { title: 'space-800', value: 'Dimension-16 (32 px)', width: 32 },
77
+ { title: 'space-900', value: 'Dimension-19 (48 px)', width: 48 },
78
+ { title: 'space-1000', value: 'Dimension-21 (64 px)', width: 64 },
79
+ { title: 'space-1200', value: 'Dimension-25 (96 px)', width: 96 },
80
+ { title: 'space-1400', value: 'Dimension-29 (160 px)', width: 160 }
81
+ ].map((row, i) => (
82
+
83
+ <tr key={`custom-${i}`} style={{backgroundColor: '#fff'}}>
84
+ <td style={{padding: '12px 16px', borderTop: '1px solid #eee'}}>
85
+ {row.title}
86
+ </td>
87
+ <td style={{padding: '12px 16px', borderTop: '1px solid #eee'}}>
88
+ {row.value}
89
+ </td>
90
+ <td style={{padding: '12px 16px', borderTop: '1px solid #eee'}}>
91
+ <div
92
+ style={{
93
+ width: `${row.width}px`,
94
+ height: '40px',
95
+ background: 'var(--blue-200, #B5BDF4)',
96
+ }}
97
+ />
98
+ </td>
99
+ </tr>
100
+ )) }
101
+
102
+ </tbody>
103
+
104
+ </table>