@justfixnyc/component-library 0.25.13 → 0.26.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.
package/README.md CHANGED
@@ -2,6 +2,34 @@
2
2
 
3
3
  Component library for JustFix's design system.
4
4
 
5
- Just testing things out right now...
6
-
7
5
  Based this repo on this [course](https://www.newline.co/courses/newline-guide-to-building-a-company-component-library) ([local copy of course mateirals in our drive](https://drive.google.com/file/d/1Q1aYhktm0aacn-GIlC7fxOCrzoIoSZos/view?usp=share_link))
6
+
7
+ ## Local development setup
8
+
9
+ 1. install npm locally if it doesn't already exist `brew install npm`
10
+ 2. `npx sb init`
11
+
12
+ - builder error: select Webpack 5
13
+ - dependency resolution errors: `npm install --legacy-peer-deps`
14
+
15
+ 3. `npm run storybook`
16
+ 4. if there are [OSSL issues](https://stackoverflow.com/questions/75167770/error-error0308010cdigital-envelope-routinesunsupported-node-js-v19-4-0), run `export NODE_OPTIONS=--openssl-legacy-provider`
17
+
18
+ ## Publishing the package
19
+
20
+ This package is live on both GitHub Package Registry (GPR) and NPM registry
21
+
22
+ GitHub Actions triggers a publish to GPR from any branch that runs the version bump. Should probably change to allow this version bump to only happen on `main` before we fully integrate this library
23
+
24
+ ``` shell
25
+ npm version [major]|[minor]|[patch]
26
+ git push --follow-tags
27
+ ```
28
+
29
+ Publishing to NPM registry is more manual because of permission issues that couldn't be resolved in Github Actions. You will need to authenticate your account (w/ permissions to the JustFix organization) via the terminal.
30
+
31
+ ```shell
32
+ npm run build
33
+ npm publish --access public --@justfixnyc:registry=<https://registry.npmjs.org/>
34
+
35
+ ```
@@ -221,12 +221,12 @@ var variantStyles = function variantStyles(p) {
221
221
  if (p.loading) {
222
222
  return css(["", "}", " border-width:1px;border-style:solid;border-radius:100px;", ";"], p.variant === 'primary' ? "color: ".concat(JF_COLOR.OFF_WHITE, ";\n background-color: ").concat(JF_COLOR.GREY_600, ";\n border-color: ").concat(JF_COLOR.OFF_WHITE, ";") : "color: ".concat(JF_COLOR.OFF_BLACK, "; \n background-color: ").concat(JF_COLOR.OFF_WHITE, ";\n border-color: ").concat(JF_COLOR.OFF_BLACK, ";"), p.size === 'small' ? "padding: 12px 32px;" : "padding: 22px 32px;", EYEBROW_MOBILE);
223
223
  }
224
- return css(["", "}", " border-width:1px;border-style:solid;border-radius:100px;box-shadow:4px 4px 0px ", ";", " transition:all 0.1s linear;transform:translateX(0rem);&:hover{box-shadow:0px 4px 0px ", ";}&.active,&:active{box-shadow:0px -4px 0px 0px ", ";}&:disabled{cursor:inherit;box-shadow:none;", "}&:focus{box-shadow:none;border:1px solid ", ";}"], p.variant === 'primary' ? "color: ".concat(JF_COLOR.OFF_WHITE, ";\n background-color: ").concat(JF_COLOR.OFF_BLACK, ";\n border-color: ").concat(JF_COLOR.OFF_WHITE, ";") : "color: ".concat(JF_COLOR.OFF_BLACK, "; \n background-color: ").concat(JF_COLOR.OFF_WHITE, ";\n border-color: ").concat(JF_COLOR.OFF_BLACK, ";"), p.size === 'small' ? "padding: 12px 32px;" : "padding: 22px 32px;", JF_COLOR.GREY_SHADOW, EYEBROW_MOBILE, JF_COLOR.GREY_SHADOW, JF_COLOR.GREY_SHADOW, p.variant === 'primary' ? "background-color: ".concat(JF_COLOR.GREY_400, ";\n color: ").concat(JF_COLOR.OFF_BLACK, ";") : "background-color: ".concat(JF_COLOR.GREY_50), JF_COLOR.GREY_BORDER);
224
+ return css(["", "}", " border-width:1px;border-style:solid;border-radius:100px;box-shadow:4px 4px 0px ", ";@media (max-width:599px){width:inherit;}", " transition:all 0.1s linear;transform:translateX(0rem);&:hover{box-shadow:0px 4px 0px ", ";}&.active,&:active{box-shadow:0px -4px 0px 0px ", ";}&:disabled{cursor:inherit;box-shadow:none;", "}&:focus{box-shadow:none;border:1px solid ", ";}"], p.variant === 'primary' ? "color: ".concat(JF_COLOR.OFF_WHITE, ";\n background-color: ").concat(JF_COLOR.OFF_BLACK, ";\n border-color: ").concat(JF_COLOR.OFF_WHITE, ";") : "color: ".concat(JF_COLOR.OFF_BLACK, "; \n background-color: ").concat(JF_COLOR.OFF_WHITE, ";\n border-color: ").concat(JF_COLOR.OFF_BLACK, ";"), p.size === 'small' ? "padding: 12px 32px;" : "padding: 22px 32px;", JF_COLOR.GREY_SHADOW, EYEBROW_MOBILE, JF_COLOR.GREY_SHADOW, JF_COLOR.GREY_SHADOW, p.variant === 'primary' ? "background-color: ".concat(JF_COLOR.GREY_400, ";\n color: ").concat(JF_COLOR.OFF_BLACK, ";") : "background-color: ".concat(JF_COLOR.GREY_50), JF_COLOR.GREY_BORDER);
225
225
  };
226
226
  var StyledButton = styled.button.withConfig({
227
227
  displayName: "styles__StyledButton",
228
228
  componentId: "sc-17d8tll-2"
229
- })(["cursor:pointer;user-select:none;height:fit-content;display:flex;align-items:center;justify-content:center;flex:none;white-space:normal;word-wrap:break-word;vertical-align:middle;@media only (min-width:599px){width:fit-content;}", ""], variantStyles);
229
+ })(["cursor:pointer;user-select:none;height:fit-content;display:flex;align-items:center;justify-content:center;flex:none;white-space:normal;word-wrap:break-word;vertical-align:middle;width:fit-content;", ""], variantStyles);
230
230
 
231
231
  var _excluded = ["children", "variant", "size", "loading", "hasIcon"];
232
232
  /**
package/dist/src/index.js CHANGED
@@ -233,12 +233,12 @@ var variantStyles = function variantStyles(p) {
233
233
  if (p.loading) {
234
234
  return styled.css(["", "}", " border-width:1px;border-style:solid;border-radius:100px;", ";"], p.variant === 'primary' ? "color: ".concat(JF_COLOR.OFF_WHITE, ";\n background-color: ").concat(JF_COLOR.GREY_600, ";\n border-color: ").concat(JF_COLOR.OFF_WHITE, ";") : "color: ".concat(JF_COLOR.OFF_BLACK, "; \n background-color: ").concat(JF_COLOR.OFF_WHITE, ";\n border-color: ").concat(JF_COLOR.OFF_BLACK, ";"), p.size === 'small' ? "padding: 12px 32px;" : "padding: 22px 32px;", EYEBROW_MOBILE);
235
235
  }
236
- return styled.css(["", "}", " border-width:1px;border-style:solid;border-radius:100px;box-shadow:4px 4px 0px ", ";", " transition:all 0.1s linear;transform:translateX(0rem);&:hover{box-shadow:0px 4px 0px ", ";}&.active,&:active{box-shadow:0px -4px 0px 0px ", ";}&:disabled{cursor:inherit;box-shadow:none;", "}&:focus{box-shadow:none;border:1px solid ", ";}"], p.variant === 'primary' ? "color: ".concat(JF_COLOR.OFF_WHITE, ";\n background-color: ").concat(JF_COLOR.OFF_BLACK, ";\n border-color: ").concat(JF_COLOR.OFF_WHITE, ";") : "color: ".concat(JF_COLOR.OFF_BLACK, "; \n background-color: ").concat(JF_COLOR.OFF_WHITE, ";\n border-color: ").concat(JF_COLOR.OFF_BLACK, ";"), p.size === 'small' ? "padding: 12px 32px;" : "padding: 22px 32px;", JF_COLOR.GREY_SHADOW, EYEBROW_MOBILE, JF_COLOR.GREY_SHADOW, JF_COLOR.GREY_SHADOW, p.variant === 'primary' ? "background-color: ".concat(JF_COLOR.GREY_400, ";\n color: ").concat(JF_COLOR.OFF_BLACK, ";") : "background-color: ".concat(JF_COLOR.GREY_50), JF_COLOR.GREY_BORDER);
236
+ return styled.css(["", "}", " border-width:1px;border-style:solid;border-radius:100px;box-shadow:4px 4px 0px ", ";@media (max-width:599px){width:inherit;}", " transition:all 0.1s linear;transform:translateX(0rem);&:hover{box-shadow:0px 4px 0px ", ";}&.active,&:active{box-shadow:0px -4px 0px 0px ", ";}&:disabled{cursor:inherit;box-shadow:none;", "}&:focus{box-shadow:none;border:1px solid ", ";}"], p.variant === 'primary' ? "color: ".concat(JF_COLOR.OFF_WHITE, ";\n background-color: ").concat(JF_COLOR.OFF_BLACK, ";\n border-color: ").concat(JF_COLOR.OFF_WHITE, ";") : "color: ".concat(JF_COLOR.OFF_BLACK, "; \n background-color: ").concat(JF_COLOR.OFF_WHITE, ";\n border-color: ").concat(JF_COLOR.OFF_BLACK, ";"), p.size === 'small' ? "padding: 12px 32px;" : "padding: 22px 32px;", JF_COLOR.GREY_SHADOW, EYEBROW_MOBILE, JF_COLOR.GREY_SHADOW, JF_COLOR.GREY_SHADOW, p.variant === 'primary' ? "background-color: ".concat(JF_COLOR.GREY_400, ";\n color: ").concat(JF_COLOR.OFF_BLACK, ";") : "background-color: ".concat(JF_COLOR.GREY_50), JF_COLOR.GREY_BORDER);
237
237
  };
238
238
  var StyledButton = styled__default["default"].button.withConfig({
239
239
  displayName: "styles__StyledButton",
240
240
  componentId: "sc-17d8tll-2"
241
- })(["cursor:pointer;user-select:none;height:fit-content;display:flex;align-items:center;justify-content:center;flex:none;white-space:normal;word-wrap:break-word;vertical-align:middle;@media only (min-width:599px){width:fit-content;}", ""], variantStyles);
241
+ })(["cursor:pointer;user-select:none;height:fit-content;display:flex;align-items:center;justify-content:center;flex:none;white-space:normal;word-wrap:break-word;vertical-align:middle;width:fit-content;", ""], variantStyles);
242
242
 
243
243
  var _excluded = ["children", "variant", "size", "loading", "hasIcon"];
244
244
  /**
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@justfixnyc/component-library",
3
3
  "description": "JustFix Component Library",
4
4
  "license": "MIT",
5
- "version": "0.25.13",
5
+ "version": "0.26.0",
6
6
  "main": "dist/src/index.js",
7
7
  "module": "dist/src/index.d.ts",
8
8
  "files": [