onecart-ui 0.2.6 → 0.2.8
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/README.md +4 -2
- package/dist/index.js +21 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mobile.js +19 -14
- package/dist/index.mobile.js.map +1 -1
- package/icons/Icons.stories.d.ts +0 -1
- package/icons/Icons.stories.d.ts.map +1 -1
- package/icons/Icons.stories.js +180 -161
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -118,13 +118,15 @@ function MyComponent() {
|
|
|
118
118
|
Typography components are available for both web and mobile platforms:
|
|
119
119
|
|
|
120
120
|
**Web (React):**
|
|
121
|
+
|
|
121
122
|
```typescript
|
|
122
|
-
import { Display, Heading, Body, Utility } from
|
|
123
|
+
import { Display, Heading, Body, Utility } from "onecart-ui";
|
|
123
124
|
```
|
|
124
125
|
|
|
125
126
|
**Mobile (React Native):**
|
|
127
|
+
|
|
126
128
|
```typescript
|
|
127
|
-
import { Display, Heading, Body, Utility } from
|
|
129
|
+
import { Display, Heading, Body, Utility } from "onecart-ui/mobile";
|
|
128
130
|
```
|
|
129
131
|
|
|
130
132
|
#### Display Component
|
package/dist/index.js
CHANGED
|
@@ -85,8 +85,14 @@ const UTILITY_LINK_LINE_HEIGHT = "20px";
|
|
|
85
85
|
const UTILITY_LINK_FONT_SIZE = "14px";
|
|
86
86
|
const UTILITY_LINK_LETTER_SPACING = "0%";
|
|
87
87
|
const UTILITY_LINK_TEXT_DECORATION = "underline";
|
|
88
|
+
const UTILITY_CAPTION_FONT_WEIGHT = "book";
|
|
89
|
+
const UTILITY_CAPTION_LINE_HEIGHT = "16px";
|
|
90
|
+
const UTILITY_CAPTION_FONT_SIZE = "12px";
|
|
91
|
+
const UTILITY_CAPTION_LETTER_SPACING = "0%";
|
|
92
|
+
const UTILITY_CAPTION_TEXT_DECORATION = "none";
|
|
88
93
|
const FONT_FAMILIES_CAMPTON$1 = "Campton";
|
|
89
94
|
const MEDIUM$1 = 500;
|
|
95
|
+
const SEMI_BOLD = 600;
|
|
90
96
|
const BOOK = "book";
|
|
91
97
|
|
|
92
98
|
// Facade: curated subset of raw Figma tokens for button usage
|
|
@@ -4758,7 +4764,8 @@ const Button = ({ label, type = "primary", size = "large", disabled = false, lef
|
|
|
4758
4764
|
const getBaseStyles = () => {
|
|
4759
4765
|
const baseStyle = {
|
|
4760
4766
|
display: isIconOnly ? "inline-flex" : "flex",
|
|
4761
|
-
width:
|
|
4767
|
+
width: fullWidth ? "100%" : "auto",
|
|
4768
|
+
minWidth: isIconOnly ? "auto" : "9.375rem",
|
|
4762
4769
|
height: size === "large" ? "2.75rem" : size === "medium" ? "2.25rem" : "2rem",
|
|
4763
4770
|
padding: type === "ghost"
|
|
4764
4771
|
? String(buttonTokens.spacing.none)
|
|
@@ -4941,7 +4948,7 @@ const typographyTokens = {
|
|
|
4941
4948
|
fontFamily: String(FONT_FAMILIES_CAMPTON$1),
|
|
4942
4949
|
fontSize: px(DISPLAY_2XL_FONT_SIZE),
|
|
4943
4950
|
lineHeight: px(DISPLAY_2XL_LINE_HEIGHT),
|
|
4944
|
-
fontWeight: String(
|
|
4951
|
+
fontWeight: String(SEMI_BOLD),
|
|
4945
4952
|
color: String(NEUTRAL_80$1),
|
|
4946
4953
|
letterSpacing: String(DISPLAY_2XL_LETTER_SPACING),
|
|
4947
4954
|
textDecoration: String(DISPLAY_2XL_TEXT_DECORATION),
|
|
@@ -4950,7 +4957,7 @@ const typographyTokens = {
|
|
|
4950
4957
|
fontFamily: String(FONT_FAMILIES_CAMPTON$1),
|
|
4951
4958
|
fontSize: px(DISPLAY_XL_FONT_SIZE),
|
|
4952
4959
|
lineHeight: px(DISPLAY_XL_LINE_HEIGHT),
|
|
4953
|
-
fontWeight: String(
|
|
4960
|
+
fontWeight: String(SEMI_BOLD),
|
|
4954
4961
|
color: String(NEUTRAL_80$1),
|
|
4955
4962
|
letterSpacing: String(DISPLAY_XL_LETTER_SPACING),
|
|
4956
4963
|
textDecoration: String(DISPLAY_XL_TEXT_DECORATION),
|
|
@@ -4960,7 +4967,7 @@ const typographyTokens = {
|
|
|
4960
4967
|
fontFamily: String(FONT_FAMILIES_CAMPTON$1),
|
|
4961
4968
|
fontSize: px(HEADING_XL_FONT_SIZE),
|
|
4962
4969
|
lineHeight: px(HEADING_XL_LINE_HEIGHT),
|
|
4963
|
-
fontWeight: String(
|
|
4970
|
+
fontWeight: String(SEMI_BOLD),
|
|
4964
4971
|
color: String(NEUTRAL_80$1),
|
|
4965
4972
|
letterSpacing: String(HEADING_XL_LETTER_SPACING),
|
|
4966
4973
|
textDecoration: String(HEADING_XL_TEXT_DECORATION),
|
|
@@ -4969,7 +4976,7 @@ const typographyTokens = {
|
|
|
4969
4976
|
fontFamily: String(FONT_FAMILIES_CAMPTON$1),
|
|
4970
4977
|
fontSize: px(HEADING_LG_FONT_SIZE),
|
|
4971
4978
|
lineHeight: px(HEADING_LG_LINE_HEIGHT),
|
|
4972
|
-
fontWeight: String(
|
|
4979
|
+
fontWeight: String(SEMI_BOLD),
|
|
4973
4980
|
color: String(NEUTRAL_80$1),
|
|
4974
4981
|
letterSpacing: String(HEADING_LG_LETTER_SPACING),
|
|
4975
4982
|
textDecoration: String(HEADING_LG_TEXT_DECORATION),
|
|
@@ -4978,7 +4985,7 @@ const typographyTokens = {
|
|
|
4978
4985
|
fontFamily: String(FONT_FAMILIES_CAMPTON$1),
|
|
4979
4986
|
fontSize: px(HEADING_MD_FONT_SIZE),
|
|
4980
4987
|
lineHeight: px(HEADING_MD_LINE_HEIGHT),
|
|
4981
|
-
fontWeight: String(
|
|
4988
|
+
fontWeight: String(SEMI_BOLD),
|
|
4982
4989
|
color: String(NEUTRAL_80$1),
|
|
4983
4990
|
letterSpacing: String(HEADING_MD_LETTER_SPACING),
|
|
4984
4991
|
textDecoration: String(HEADING_MD_TEXT_DECORATION),
|
|
@@ -4987,7 +4994,7 @@ const typographyTokens = {
|
|
|
4987
4994
|
fontFamily: String(FONT_FAMILIES_CAMPTON$1),
|
|
4988
4995
|
fontSize: px(HEADING_SM_FONT_SIZE),
|
|
4989
4996
|
lineHeight: px(HEADING_SM_LINE_HEIGHT),
|
|
4990
|
-
fontWeight: String(
|
|
4997
|
+
fontWeight: String(SEMI_BOLD),
|
|
4991
4998
|
color: String(NEUTRAL_80$1),
|
|
4992
4999
|
letterSpacing: String(HEADING_SM_LETTER_SPACING),
|
|
4993
5000
|
textDecoration: String(HEADING_SM_TEXT_DECORATION),
|
|
@@ -4996,7 +5003,7 @@ const typographyTokens = {
|
|
|
4996
5003
|
fontFamily: String(FONT_FAMILIES_CAMPTON$1),
|
|
4997
5004
|
fontSize: px(HEADING_XS_FONT_SIZE),
|
|
4998
5005
|
lineHeight: px(HEADING_XS_LINE_HEIGHT),
|
|
4999
|
-
fontWeight: String(
|
|
5006
|
+
fontWeight: String(SEMI_BOLD),
|
|
5000
5007
|
color: String(NEUTRAL_80$1),
|
|
5001
5008
|
letterSpacing: String(HEADING_XS_LETTER_SPACING),
|
|
5002
5009
|
textDecoration: String(HEADING_XS_TEXT_DECORATION),
|
|
@@ -5005,7 +5012,7 @@ const typographyTokens = {
|
|
|
5005
5012
|
fontFamily: String(FONT_FAMILIES_CAMPTON$1),
|
|
5006
5013
|
fontSize: px(HEADING_2XS_FONT_SIZE),
|
|
5007
5014
|
lineHeight: px(HEADING_2XS_LINE_HEIGHT),
|
|
5008
|
-
fontWeight: String(
|
|
5015
|
+
fontWeight: String(SEMI_BOLD),
|
|
5009
5016
|
color: String(NEUTRAL_80$1),
|
|
5010
5017
|
letterSpacing: String(HEADING_2XS_LETTER_SPACING),
|
|
5011
5018
|
textDecoration: String(HEADING_2XS_TEXT_DECORATION),
|
|
@@ -5068,12 +5075,12 @@ const typographyTokens = {
|
|
|
5068
5075
|
},
|
|
5069
5076
|
labelSm: {
|
|
5070
5077
|
fontFamily: String(FONT_FAMILIES_CAMPTON$1),
|
|
5071
|
-
fontSize: px(
|
|
5072
|
-
lineHeight: px(
|
|
5073
|
-
fontWeight: String(
|
|
5078
|
+
fontSize: px(UTILITY_CAPTION_FONT_SIZE),
|
|
5079
|
+
lineHeight: px(UTILITY_CAPTION_LINE_HEIGHT),
|
|
5080
|
+
fontWeight: String(UTILITY_CAPTION_FONT_WEIGHT),
|
|
5074
5081
|
color: String(NEUTRAL_80$1),
|
|
5075
|
-
letterSpacing: String(
|
|
5076
|
-
textDecoration: String(
|
|
5082
|
+
letterSpacing: String(UTILITY_CAPTION_LETTER_SPACING),
|
|
5083
|
+
textDecoration: String(UTILITY_CAPTION_TEXT_DECORATION),
|
|
5077
5084
|
},
|
|
5078
5085
|
};
|
|
5079
5086
|
|