cross-country 1.2.0 → 1.2.1
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 +6 -56
- package/dist/{Color-6VNJS4EI-Y0aXyIm3.js → Color-6VNJS4EI-oa8lPG4R.js} +159 -146
- package/dist/TwitterLogo.esm-BbkZW6ig.js +578 -0
- package/dist/WithTooltip-V3YHNWJZ-Cvv18Q-Y.js +21 -0
- package/dist/bolt-8-xYMlp-.js +15 -0
- package/dist/{branch-list-DxHKqZ9X.js → branch-list-mBc6h70c.js} +10 -10
- package/dist/{button-themed-pX_3ZLMV.js → button-themed-EN8vdQPe.js} +12 -13
- package/dist/card-9v1cyJcB.js +17 -0
- package/dist/components/atoms/button/pill-button.js +3 -4
- package/dist/components/atoms/checkbox/checkbox.js +4 -5
- package/dist/components/atoms/column/__tests__/column.test.js +16 -9544
- package/dist/components/atoms/column/column.js +11 -12
- package/dist/components/atoms/column/index.js +5 -2
- package/dist/components/atoms/grid/index.d.js +3 -2
- package/dist/components/atoms/grid/index.js +3 -2
- package/dist/components/atoms/image/__story__/image-story.js +4 -2
- package/dist/components/atoms/image/cross-country-image.js +1 -1
- package/dist/components/atoms/image/index.js +5 -2
- package/dist/components/atoms/radio/index.d.js +5 -2
- package/dist/components/atoms/text/input/index.js +5 -2
- package/dist/components/atoms/text/input/text-input.js +1 -1
- package/dist/components/atoms/text/label/index.d.js +5 -2
- package/dist/components/atoms/text/label/index.js +5 -2
- package/dist/components/atoms/text/label/label.js +1 -1
- package/dist/components/atoms/text/span/__stories__/span-story.js +15 -11
- package/dist/components/atoms/text/span/index.js +5 -2
- package/dist/components/atoms/text/span/span.js +1 -1
- package/dist/components/atoms/text/text-area/index.js +5 -2
- package/dist/components/atoms/text/text-area/text-area.js +1 -1
- package/dist/components/index.js +140 -101
- package/dist/components/molecules/day-number/__stories__/day-number-story.js +14 -2
- package/dist/components/molecules/day-number/day-number.js +15 -16
- package/dist/components/molecules/day-number/index.js +15 -2
- package/dist/components/molecules/error/error-story.js +3 -2
- package/dist/components/molecules/error/error.js +1 -1
- package/dist/components/molecules/error/index.js +4 -2
- package/dist/components/molecules/field/__stories__/field-story.js +18 -4
- package/dist/components/molecules/field/field.js +11 -10
- package/dist/components/molecules/field/index.js +17 -2
- package/dist/components/molecules/gold-leaf/__stories___/gold-leaf-story.js +26 -3
- package/dist/components/molecules/gold-leaf/gold-leaf-post/__stories__/gold-leaf-post-story.js +46 -21
- package/dist/components/molecules/gold-leaf/gold-leaf-post/gold-leaf-post.js +15 -14
- package/dist/components/molecules/gold-leaf/gold-leaf-view/__stories__/gold-leaf-view-story.js +26 -4
- package/dist/components/molecules/gold-leaf/gold-leaf-view/__tests__/gold-leaf-view.test.js +38 -13
- package/dist/components/molecules/gold-leaf/gold-leaf-view/gold-leaf-view-controls.js +14 -11
- package/dist/components/molecules/gold-leaf/gold-leaf-view/gold-leaf-view.js +22 -12
- package/dist/components/molecules/gold-leaf/gold-leaf-view/gold-title-image-card.js +22 -14
- package/dist/components/molecules/gold-leaf/gold-leaf-view/golf-leaf-image.js +14 -12
- package/dist/components/molecules/gold-leaf/gold-leaf-view/golf-leaf-view-skeleton.js +2 -3
- package/dist/components/molecules/gold-leaf/gold-leaf-view/index.js +25 -2
- package/dist/components/molecules/gold-leaf/gold-leaf.js +28 -6
- package/dist/components/molecules/gold-leaf/index.js +26 -2
- package/dist/components/molecules/header/Header.js +11 -12
- package/dist/components/molecules/key-value-pairs/__stories__/key-value-pairs-story.js +21 -4
- package/dist/components/molecules/key-value-pairs/__tests__/key-value-pairs.js +24 -7
- package/dist/components/molecules/key-value-pairs/index.js +20 -2
- package/dist/components/molecules/key-value-pairs/key-value-pairs.js +17 -12
- package/dist/components/molecules/listicle/listicle.js +15 -13
- package/dist/components/molecules/loading/__tests__/loading.test.js +11 -7
- package/dist/components/molecules/loading/index.js +4 -2
- package/dist/components/molecules/loading/loading-story.js +3 -2
- package/dist/components/molecules/loading/loading.js +1 -1
- package/dist/components/molecules/log-error-boundary/__stories__/log-error-boundary-story.js +16 -2
- package/dist/components/molecules/log-error-boundary/__tests__/log-error-boundary.test.js +23 -9
- package/dist/components/molecules/log-error-boundary/index.js +14 -2
- package/dist/components/molecules/log-error-boundary/log-error-boundary.js +9 -9
- package/dist/components/molecules/policies/privacy-policy.js +14 -13
- package/dist/components/molecules/policies/terms-of-use.js +14 -13
- package/dist/components/molecules/profile-porthole/__stories__/profile-porthole-story.js +18 -3
- package/dist/components/molecules/profile-porthole/__tests__/profile-porthole.test.js +23 -6
- package/dist/components/molecules/profile-porthole/index.js +18 -2
- package/dist/components/molecules/profile-porthole/profile-porthole.js +30 -14
- package/dist/components/molecules/screen/screen.js +6 -5
- package/dist/components/molecules/tile/corner.js +1 -1
- package/dist/components/molecules/tile/corners.js +27 -24
- package/dist/components/molecules/tile/tile-color.js +13 -12
- package/dist/components/molecules/tile/tile-interactive.js +13 -11
- package/dist/components/molecules/tile/tile.js +23 -8
- package/dist/components/molecules/time-progress/__stories__/progress-story.js +14 -2
- package/dist/components/molecules/time-progress/__tests__/progress.test.js +20 -6
- package/dist/components/molecules/time-progress/index.js +15 -2
- package/dist/components/molecules/time-progress/progress-over-year.js +12 -11
- package/dist/components/molecules/time-progress/progress.js +12 -11
- package/dist/components/organisms/branches/__stories__/branches-story.js +32 -2
- package/dist/components/organisms/branches/__tests__/branch-list.test.js +39 -13
- package/dist/components/organisms/branches/branch-list.js +25 -12
- package/dist/components/organisms/branches/branches.js +27 -11
- package/dist/components/organisms/branches/index.js +33 -2
- package/dist/components/organisms/clusters/cluster.js +9 -9
- package/dist/components/organisms/login/login-feedback-transition.js +18 -15
- package/dist/components/organisms/login/login-fetching-transition.js +19 -15
- package/dist/components/organisms/login/login-fields-transition.js +21 -17
- package/dist/components/organisms/login/login-response-transition.js +15 -13
- package/dist/components/organisms/login/login-submit-transition.js +25 -21
- package/dist/components/organisms/login/login-view.js +33 -24
- package/dist/components/organisms/login/login.js +119 -92
- package/dist/components/organisms/palettes/__stories__/palettes-story.js +23 -2
- package/dist/components/organisms/palettes/index.js +24 -2
- package/dist/components/organisms/palettes/palettes.js +29 -23
- package/dist/components/organisms/worlds/area-of-effect/area-of-affect-story.js +25 -17
- package/dist/components/organisms/worlds/area-of-effect/area-of-affect.js +43 -37
- package/dist/components/organisms/worlds/island/island-story.js +23 -16
- package/dist/components/organisms/worlds/island/island-util.js +43 -37
- package/dist/components/pages/home/__stories__/home-story.js +16 -2
- package/dist/components/pages/home/headwinds/__story__/headwinds-story.js +44 -2
- package/dist/components/pages/home/headwinds/headwinds-header.js +11 -9
- package/dist/components/pages/home/headwinds/headwinds-hero.js +30 -10
- package/dist/components/pages/home/headwinds/headwinds-sidequest.js +90 -13
- package/dist/components/pages/home/headwinds/home.js +48 -21
- package/dist/components/pages/home/headwinds/index.js +45 -2
- package/dist/components/pages/home/home.js +17 -4
- package/dist/components/pages/home/index.js +17 -2
- package/dist/components/pages/profile/headwinds/__stories__/headwinds-profile-story.js +20 -2
- package/dist/components/pages/profile/headwinds/headwinds-profile.js +48 -609
- package/dist/components/pages/profile/headwinds/index.js +21 -2
- package/dist/components/templates/home/__stories__/home-story.js +16 -3
- package/dist/components/templates/home/__tests__/home.test.js +25 -10
- package/dist/components/templates/home/headwinds/__stories__/headwinds-home-story.js +17 -4
- package/dist/components/templates/home/headwinds/headwinds-home.js +9 -9
- package/dist/components/templates/home/headwinds/index.js +16 -2
- package/dist/components/templates/home/home.js +9 -9
- package/dist/components/templates/home/index.js +16 -2
- package/dist/cross-country-image.module-jdnP4cDs.js +6 -0
- package/dist/error.module-ZjH1vsd8.js +6 -0
- package/dist/{feed-util-lOnIbz0U.js → feed-util-rNq8r7fv.js} +1 -1
- package/dist/{form-lkYaaqXo.js → form-nKA0M1D7.js} +2 -3
- package/dist/{formatter-SWP5E3XI-yfKp_PMt.js → formatter-SWP5E3XI-ZD-okItT.js} +18 -3
- package/dist/{frozen-lake-vfIi5C6A.js → frozen-lake-S3o6H5fF.js} +56 -57
- package/dist/{gold-leaf-view-controls-wTiX4339.js → gold-leaf-view-controls--KFoXQHa.js} +9 -9
- package/dist/{gold-leaf-view-dFZIPhIk.js → gold-leaf-view-jpk0Uwnz.js} +12 -12
- package/dist/{headwinds-home.module-Az3LRikv.js → headwinds-home.module-gbIGOMzq.js} +11 -12
- package/dist/index.js +146 -110
- package/dist/{key-value-pairs-obcirXq6.js → key-value-pairs-zP7bsADA.js} +11 -12
- package/dist/label.module-x8pgvLEC.js +6 -0
- package/dist/{link-JBASN63-.js → link-5hZS4l5t.js} +2 -3
- package/dist/{list-item-RJQHSddI.js → list-item-GFGZHtSj.js} +4 -5
- package/dist/loading.module-9nzhvDD8.js +6 -0
- package/dist/{log-error-boundary-story-UA_b7cCa.js → log-error-boundary-story-0cMp5omF.js} +5 -5
- package/dist/{login.module-rJfG7TBM.js → login.module-HI3xoJq9.js} +2 -3
- package/dist/{paragraph-lmIAw0dP.js → paragraph-Kv1xuYrn.js} +1 -2
- package/dist/progress.module-6jcWJ2jN.js +6 -0
- package/dist/{radio-J2rTWIxc.js → radio-oC4Vcp3b.js} +9 -10
- package/dist/row-GEmva9qL.js +9 -0
- package/dist/span.module-LlG4jp2r.js +6 -0
- package/dist/{subheadline-4rCbDmdw.js → subheadline-YoPQ1UWB.js} +7 -8
- package/dist/syntaxhighlighter-V7JZZA35-Qh01Y0DZ.js +21 -0
- package/dist/text-area.module-gGfc9UkE.js +6 -0
- package/dist/text-input.module-gGfc9UkE.js +6 -0
- package/dist/{tile.module-DP9YSKoR.js → tile.module-m1TEwLbT.js} +4 -5
- package/dist/vi.pk4NToBt-RyDZyYxx.js +9540 -0
- package/package.json +3 -1
- package/dist/WithTooltip-V3YHNWJZ-M_OXXx_f.js +0 -6
- package/dist/assets/Header.css +0 -1
- package/dist/assets/button-themed.css +0 -1
- package/dist/assets/card.css +0 -1
- package/dist/assets/checkbox.css +0 -1
- package/dist/assets/cluster.css +0 -1
- package/dist/assets/column.css +0 -1
- package/dist/assets/cross-country-image.css +0 -1
- package/dist/assets/day-number.css +0 -1
- package/dist/assets/error.css +0 -1
- package/dist/assets/field.css +0 -1
- package/dist/assets/form.css +0 -1
- package/dist/assets/frozen-lake.css +0 -1
- package/dist/assets/gold-leaf-post.css +0 -1
- package/dist/assets/golf-leaf-view-skeleton.css +0 -1
- package/dist/assets/headline.css +0 -1
- package/dist/assets/headwinds-home.css +0 -1
- package/dist/assets/island-util.css +0 -1
- package/dist/assets/key-value-pairs.css +0 -1
- package/dist/assets/label.css +0 -1
- package/dist/assets/link.css +0 -1
- package/dist/assets/list-item.css +0 -1
- package/dist/assets/listicle.css +0 -1
- package/dist/assets/loading.css +0 -1
- package/dist/assets/log-error-boundary.css +0 -1
- package/dist/assets/login.css +0 -1
- package/dist/assets/palettes.css +0 -1
- package/dist/assets/paragraph.css +0 -1
- package/dist/assets/pill-button.css +0 -1
- package/dist/assets/progress.css +0 -1
- package/dist/assets/radio.css +0 -1
- package/dist/assets/row.css +0 -1
- package/dist/assets/span.css +0 -1
- package/dist/assets/subheadline.css +0 -1
- package/dist/assets/text-input.css +0 -1
- package/dist/assets/tile.css +0 -1
- package/dist/card-eOKYwCwc.js +0 -18
- package/dist/cross-country-image.module-EYy3iNI0.js +0 -7
- package/dist/error.module-AWfsM9G2.js +0 -7
- package/dist/headline-Q6gGouxT.js +0 -12
- package/dist/label.module-8rYbmS6p.js +0 -7
- package/dist/loading.module-UdCF9luN.js +0 -7
- package/dist/profile-porthole-kE1Ajbv1.js +0 -31
- package/dist/progress.module-gBWAv9oG.js +0 -7
- package/dist/row-pbLQPEmw.js +0 -10
- package/dist/span.module-Kftl2AE4.js +0 -7
- package/dist/syntaxhighlighter-V7JZZA35-WRJWK2an.js +0 -6
- package/dist/text-area.module-NQ-YkZNh.js +0 -7
- package/dist/text-input.module-NQ-YkZNh.js +0 -7
- package/dist/vite.svg +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# cross-country
|
|
2
2
|
|
|
3
|
-
> an atomic react design system for
|
|
3
|
+
> an atomic react design system for personal metrics
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/cross-country) [](https://standardjs.com)
|
|
6
6
|
|
|
@@ -17,13 +17,9 @@ Last Major Update: Dec 13/2023 upgrading to Vite from Webpack
|
|
|
17
17
|
|
|
18
18
|
[Cross Country Storybook via Github Pages](https://headwinds.github.io/cross-country)
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Do you pour over your personal stats from Github, Strava or Spotify? Is your year always in review?! By experimenting with code, you can hone your developer skills while exploring subject matter that interests you.
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
This library is an escape from conversative eCommerce apps, and meant to translate your analog sketch book pages into a digital works that can be shared by other like-minded individuals. Perhaps, they will become some new mixed AR/VR experience?! Perhaps, we'll keep it simple and retro. I'm know I'm not tired of 2D games.
|
|
25
|
-
|
|
26
|
-
The components within this library are designed responsively to be used to write articles; create tile-based games; or even better combine writing, gaming, with a sample dataset and tell a story or converse with an AI.
|
|
22
|
+
In my case, I'm using this library to present metrics about my path as a developer as well as my home energy efficiency and [decarbonization](https://greenbuildingcanada.ca/decarbonize-home/).
|
|
27
23
|
|
|
28
24
|
By wrapping html, each component is augmented for building accessible experiences across screens. A simple page may look like this:
|
|
29
25
|
|
|
@@ -32,24 +28,15 @@ By wrapping html, each component is augmented for building accessible experience
|
|
|
32
28
|
<Page>
|
|
33
29
|
<Column>
|
|
34
30
|
<Paragraph>
|
|
35
|
-
|
|
36
|
-
</Paragraph>
|
|
37
|
-
<Paragraph>
|
|
38
|
-
A simple page may look like this with the default design settings.
|
|
31
|
+
Hello! I'm a developer with a mix of frontend and backend experience.
|
|
39
32
|
</Paragraph>
|
|
40
|
-
|
|
41
|
-
<Column>
|
|
42
|
-
<MyGameOrExperiementHere />
|
|
33
|
+
<Metrics keyValuePairs=[{label: "Frontend", value: 75, type: "percent"}, {label: "Backend", value: 25, type: "percent"}] />
|
|
43
34
|
</Column>
|
|
44
35
|
</Page>
|
|
45
36
|
<Wallpaper />
|
|
46
37
|
</Wrapper>
|
|
47
38
|
```
|
|
48
39
|
|
|
49
|
-
Progress Complete
|
|
50
|
-
|
|
51
|
-
- 35%
|
|
52
|
-
|
|
53
40
|
### Generating New Components
|
|
54
41
|
|
|
55
42
|
I've included a handy NodeJS util file under `generate-component` folder. Instead of copy pasting components to create a new component, you can instead run this command to generate all the files you need to plan & start building out a new component. To use it:
|
|
@@ -85,7 +72,7 @@ When you ready, remember to expose the component in the index.ts file at the roo
|
|
|
85
72
|
|
|
86
73
|
## SCSS to CSS modules
|
|
87
74
|
|
|
88
|
-
Originally, I started with SCSS Module but "downgraded" to CSS to upgrade Node from 12 to 18 and
|
|
75
|
+
Originally, I started with SCSS Module but "downgraded" to CSS to upgrade Node from 12 to 18 and am planning to invest in PostCSS and Tailwind.
|
|
89
76
|
|
|
90
77
|
[n 14.20.1](https://www.npmjs.com/package/n)
|
|
91
78
|
|
|
@@ -149,43 +136,6 @@ now-your-email
|
|
|
149
136
|
npm publish
|
|
150
137
|
```
|
|
151
138
|
|
|
152
|
-
## Usage
|
|
153
|
-
|
|
154
|
-
```jsx
|
|
155
|
-
import React, { Component } from 'react'
|
|
156
|
-
import {Column, Row, Image, Headline, Paragraph, Wolf} from 'cross-country';
|
|
157
|
-
|
|
158
|
-
const data = {
|
|
159
|
-
headline: "My world needs another design system",
|
|
160
|
-
image: {
|
|
161
|
-
url: "https://images.unsplash.com/photo-1512411233342-92208dfe81af?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=934&q=80",
|
|
162
|
-
a11y: "a nice aframe from unsplash",
|
|
163
|
-
width: 300
|
|
164
|
-
},
|
|
165
|
-
wolf: {
|
|
166
|
-
url: "https://images.unsplash.com/photo-1512411233342-92208dfe81af?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=934&q=80",
|
|
167
|
-
text: "K-2SO & Jyn Erso"
|
|
168
|
-
a11y: "K-2SO & Jyn Erso"
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
const {headline, wolf, image } = data;
|
|
172
|
-
|
|
173
|
-
const App = () => (
|
|
174
|
-
<Column>
|
|
175
|
-
<Headline text={headline} />
|
|
176
|
-
<Row>
|
|
177
|
-
<Image {...image} />
|
|
178
|
-
<Column>
|
|
179
|
-
<Wolf config={wolf} />
|
|
180
|
-
</Column>
|
|
181
|
-
</Row>
|
|
182
|
-
</Column>
|
|
183
|
-
)
|
|
184
|
-
export default App;
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
If you 2-factor indentifaction, setup you may have to use for Google Authenticator on your phone.
|
|
188
|
-
|
|
189
139
|
Since I had .npmrc setup in other projects, I had to one for this project [using the default](https://docs.npmjs.com/cli/v8/using-npm/registry). At first, I thought I needed /headwinds and then /headwinds/cross-country but nope! Just use the default - see my .npmrc file.
|
|
190
140
|
|
|
191
141
|
## Publish Storybook
|