@fvc/utils 1.2.0 → 1.2.2

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/dist/lib/index.js CHANGED
@@ -1 +1 @@
1
- const e=e=>/^[0-9]+$/.test(e),r=r=>"number"==typeof r||e(r)?`${r}px`:r,o="az",t={i:"İ","ı":"I","ç":"Ç","ş":"Ş","ü":"Ü","ö":"Ö","ğ":"Ğ","ə":"Ə"},a={"İ":"i",I:"ı","Ç":"ç","Ş":"ş","Ü":"ü","Ö":"ö","Ğ":"ğ","Ə":"ə"},p=/\p{L}/gu,l=(e,r,o)=>e.replace(p,(e=>{var t;return null!==(t=r[e])&&void 0!==t?t:o(e)})),n=(e,r=o)=>r!==o?e.toLowerCase():l(e,a,(e=>e.toLowerCase())),i=(e,r=o)=>r!==o?e.toUpperCase():l(e,t,(e=>e.toUpperCase())),s=(e,r,t=o)=>{var a,p;const l={lowercase:()=>n(e,t),uppercase:()=>i(e,t),capitalize:()=>((e,r=o)=>e.split(" ").map((e=>{const[o="",...t]=e;return i(o,r)+n(t.join(""),r)})).join(" "))(e,t),integer:()=>e.replace(/\D/g,"")};return null!==(p=null===(a=l[r])||void 0===a?void 0:a.call(l))&&void 0!==p?p:e};export{r as cssVarResolver,e as isNumeric,s as transformText};
1
+ const e=e=>/^[0-9]+$/.test(e),r=r=>"number"==typeof r||e(r)?`${r}px`:r,o="az",t={i:"İ","ı":"I","ç":"Ç","ş":"Ş","ü":"Ü","ö":"Ö","ğ":"Ğ","ə":"Ə"},a={"İ":"i",I:"ı","Ç":"ç","Ş":"ş","Ü":"ü","Ö":"ö","Ğ":"ğ","Ə":"ə"},p=/\p{L}/gu,l=(e,r,o)=>e.replace(p,e=>{var t;return null!==(t=r[e])&&void 0!==t?t:o(e)}),n=(e,r=o)=>r!==o?e.toLowerCase():l(e,a,e=>e.toLowerCase()),i=(e,r=o)=>r!==o?e.toUpperCase():l(e,t,e=>e.toUpperCase()),s=(e,r,t=o)=>{var a,p;const l={lowercase:()=>n(e,t),uppercase:()=>i(e,t),capitalize:()=>((e,r=o)=>e.split(" ").map(e=>{const[o="",...t]=e;return i(o,r)+n(t.join(""),r)}).join(" "))(e,t),integer:()=>e.replace(/\D/g,"")};return null!==(p=null===(a=l[r])||void 0===a?void 0:a.call(l))&&void 0!==p?p:e};export{r as cssVarResolver,e as isNumeric,s as transformText};
@@ -42,6 +42,8 @@
42
42
  --green-200: #DEEDEX;
43
43
  --green-250: #c9e1d7;
44
44
  --green-300: #93c3b0;
45
+ --green-300-30: #93c3b04d;
46
+ --green-300-50: #93c3b080;
45
47
  --green-400: #40dfa2;
46
48
  --green-600: #268661;
47
49
  --green-700: #176647;
@@ -55,7 +57,9 @@
55
57
  --red-100: #f5ece6;
56
58
  --red-200: #fdeaed;
57
59
  --red-250: #fbe0e3;
58
- --red-300: #f9cbd1;
60
+ --red-300-40: #f9cbd166;
61
+ --red-300-60: #f9cbd199;
62
+ --red-350: #f8b2c0;
59
63
  --red-400: #ff9da9;
60
64
  --red-600: #ff1f48;
61
65
  --red-800: #b00020;
@@ -76,7 +80,7 @@
76
80
 
77
81
  /* Text */
78
82
  --body-text-color-1000: #2a2d37; /* Used for body text and headlines on a light background */
79
- --secondary-text-color-600: #696b78; /* Used in labels and headings in tables */
83
+ --secondary-text-color-600: #696878; /* Used in labels and headings in tables */
80
84
  --support-text-color-300: #cdd1e4; /* Used as a label color on a dark background and into Default UI elements */
81
85
  --white-text-color-0: #ffffff; /* Used for body texts and headlines on a light background on a dark background */
82
86
  --link-on-dark-bg-color-400: #40dfa2; /* Used on a dark background */
@@ -111,7 +115,7 @@
111
115
  --warning-icon-on-dark-bg-color-400: #ff9da9; /* More often used as a label color on a dark background and into Default UI elements */
112
116
  --primary-icon-color-1000: #2a2d37; /* Used on a dark background */
113
117
  --link-icon-color-500: #395ca6; /* Used on a dark background */
114
- --secondary-icon-on-dark-bg-color-600: #696b78; /* Used for text and icon on dark backgrounds */
118
+ --secondary-icon-on-dark-bg-color-600: #696878; /* Used for text and icon on dark backgrounds */
115
119
  --secondary-icon-on-light-bg-color-500: #787878; /* Used for text and icon on light backgrounds */
116
120
 
117
121
  /* Badge (for Task overview, Cards & Table) */
@@ -122,23 +126,4 @@
122
126
  --badge-warning-color-800: #800020; /* used for warned states */
123
127
  --badge-basic-color-400: #4271a5; /* Used for regular states */
124
128
  --badge-paused-color-100: #fff59b; /* Used for suspended or paused states */
125
-
126
- /* Button Background */
127
- --button-disabled-secondary-color-300: #93c3b04d; /* Used as a stroke color for Secondary button. */
128
- --button-hover-secondary-color-300: #93c3b080; /* Used as a background color for Secondary button. */
129
- --button-pressed-secondary-color-300: #93c3b0; /* Used as a background color for Secondary button */
130
- --button-enable-color-600: #268661; /* Used as a background color for Primary button */
131
- --button-hover-color-700: #176647; /* Used as a background color for Primary button */
132
- --button-disabled-color-800: #396f65; /* Used as a background color for Primary button */
133
- --button-enable-second-on-dark-bg-color-0: #ffffff; /* Used as a stroke color for Secondary button. (on Dark bg) */
134
- --button-hover-second-on-dark-bg-color-20: #ffffff33; /* Used as a background color for Secondary button. (on Dark bg) */
135
- --button-pressed-second-on-dark-bg-color-40: #ffffff66; /* Used as a background color for Secondary button. (on Dark bg) */
136
- --button-disabled-second-on-dark-bg-color-50: #f2f2f2; /* Used as a stroke color for Secondary button. (on Dark bg) */
137
- --button-enable-second-error-color-800: #800020; /* Used as a stroke color for Secondary button */
138
- --button-hover-second-error-color-300: #f9c801; /* Used as a background color for Secondary button */
139
- --button-pressed-second-error-color-400: #ff9da9; /* Used as a background color for Secondary button */
140
- --button-disabled-second-error-color-400: #ff9d49; /* Used as a stroke color for Secondary button. */
141
- --button-hover-second-error-on-dark-bg-color-300-40: #f9c80166; /* Used as a background color for Secondary button, (on Dark bg) */
142
- --button-pressed-second-error-on-dark-bg-color-300-60: #f9cbd199; /* Used as a background color for Secondary button, (on Dark bg) */
143
- --button-disabled-second-error-on-dark-bg-color-300: #f9c801; /* Used as a stroke color for Secondary button. (on Dark bg) */
144
129
  }
@@ -1,4 +1,4 @@
1
1
  @import './font.css';
2
- @import './variables.css';
2
+ @import './colors.css';
3
3
  @import './spacing.scss';
4
4
  @import './global.css';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fvc/utils",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "main": "./dist/lib/index.js",
5
5
  "types": "./dist/lib/utils/src/index.d.ts",
6
6
  "exports": {
@@ -16,9 +16,15 @@
16
16
  "package.json"
17
17
  ],
18
18
  "scripts": {
19
- "build": "rm -rf dist && rm -rf .rollup.cache && eslint --config ../../eslint.config.js . && bunx tsc --noEmit && rollup -c ./rollup.config.mjs"
19
+ "build": "rollup -c ./rollup.config.mjs",
20
+ "clean": "rm -rf dist && rm -rf .rollup.cache && rm -rf .turbo",
21
+ "lint": "eslint --config ../../eslint.config.js \"src/**/*.{ts,tsx}\"",
22
+ "lint:fix": "eslint --config ../../eslint.config.js \"src/**/*.{ts,tsx}\" --fix",
23
+ "format": "prettier --write \"src/**/*.{ts,tsx}\"",
24
+ "type-check": "tsc --noEmit",
25
+ "test": "bun test --preload ../../tests/happydom.ts --preload ../../tests/testing-library.tsx"
20
26
  },
21
- "dependencies": {
27
+ "peerDependencies": {
22
28
  "react": "^18.0.0"
23
29
  }
24
30
  }