@breadcoop/ui 1.0.4 → 1.0.6
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 +19 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/theme.css +58 -0
- package/package.json +2 -2
- package/theme.css +58 -0
package/README.md
CHANGED
|
@@ -8,6 +8,25 @@ A React TypeScript component library for implementing Bread Coop branding in JS/
|
|
|
8
8
|
npm install @breadcoop/ui
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## ⚠️ Important: CSS Import Required
|
|
12
|
+
|
|
13
|
+
**Your components will not display correctly without importing the theme CSS!** Choose one of the integration methods below.
|
|
14
|
+
|
|
15
|
+
### 🚨 Troubleshooting: Components Not Styling
|
|
16
|
+
|
|
17
|
+
If your LiftedButton or other components appear unstyled:
|
|
18
|
+
|
|
19
|
+
1. **Check browser console** - you should see a warning about missing CSS variables
|
|
20
|
+
2. **Import the theme CSS** using one of the methods below
|
|
21
|
+
3. **Ensure Tailwind is configured** if using the preset method
|
|
22
|
+
4. **Clear build cache** and rebuild your project
|
|
23
|
+
|
|
24
|
+
**Quick Fix:**
|
|
25
|
+
```tsx
|
|
26
|
+
// Add this import to your main component or CSS file
|
|
27
|
+
import "@breadcoop/ui/theme";
|
|
28
|
+
```
|
|
29
|
+
|
|
11
30
|
## Usage Options
|
|
12
31
|
|
|
13
32
|
### Option 1: Drop-in CSS Theme (Simplest)
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}function t(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};var o=Object.keys(n);if(typeof Object.getOwnPropertySymbols==="function"){o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))}o.forEach(function(r){e(t,r,n[r])})}return t}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);if(t){n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}r.push.apply(r,n)}return r}function n(e,t){t=t!=null?t:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(t))}else{r(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function o(e,t){if(e==null)return{};var r=a(e,t);var n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++){n=i[o];if(t.indexOf(n)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,n))continue;r[n]=e[n]}}return r}function a(e,t){if(e==null)return{};var r={};var n=Object.keys(e);var o,a;for(a=0;a<n.length;a++){o=n[a];if(t.indexOf(o)>=0)continue;r[o]=e[o]}return r}var
|
|
1
|
+
"use strict";function e(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}function t(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};var o=Object.keys(n);if(typeof Object.getOwnPropertySymbols==="function"){o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))}o.forEach(function(r){e(t,r,n[r])})}return t}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);if(t){n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}r.push.apply(r,n)}return r}function n(e,t){t=t!=null?t:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(t))}else{r(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function o(e,t){if(e==null)return{};var r=a(e,t);var n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++){n=i[o];if(t.indexOf(n)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,n))continue;r[n]=e[n]}}return r}function a(e,t){if(e==null)return{};var r={};var n=Object.keys(e);var o,a;for(a=0;a<n.length;a++){o=n[a];if(t.indexOf(o)>=0)continue;r[o]=e[o]}return r}function i(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}var c=require("react"),l=require("react/jsx-runtime");function s(e){return e&&e.__esModule?e:{default:e}}var u=s(c);var d={primary:{bg:"--color-primary-orange",text:"--color-paper-main",hoverBg:"--color-orange-1",hoverText:"#ffffff",shadowBg:"#595959"},secondary:{bg:"#FBDED1",text:"--color-primary-orange",hoverBg:"#FFF1EA",hoverText:"--color-primary-orange",shadowBg:"#595959"},destructive:{bg:"--color-system-red",text:"--color-paper-main",hoverBg:"#BF0A00",hoverText:"#ffffff",shadowBg:"#595959"},positive:{bg:"--color-system-green",text:"--color-paper-main",hoverBg:"#2B8F00",hoverText:"#ffffff",shadowBg:"#595959"},stroke:{bg:"--color-paper-main",text:"--color-surface-ink",hoverBg:"--color-paper-2",hoverText:"--color-surface-ink",shadowBg:"#595959"}};function f(e){return{"--btn-bg":h(e.bg),"--btn-text":h(e.text),"--btn-hover-bg":h(e.hoverBg),"--btn-hover-text":h(e.hoverText),"--btn-shadow":h(e.shadowBg)}}var p={"--color-primary-orange":"#ea6023","--color-paper-main":"#f6f3eb","--color-surface-ink":"#1b201a","--color-system-red":"#df0b00","--color-system-green":"#32a800","--color-orange-1":"#d14a0f","--color-paper-2":"#eae2d6"};function h(e){if(!e)return"";if(e.includes("var("))return e;if(e.startsWith("--")){var t=p[e]||"#000000";return"var(".concat(e,", ").concat(t,")")}return e}var v=["--color-primary-orange","--color-paper-main","--color-surface-ink","--color-system-red","--color-system-green","--color-orange-1","--color-paper-2"],m=false;function b(){if(m||(typeof window==="undefined"?"undefined":i(window))>"u")return;var e=[];v.forEach(function(t){var r=getComputedStyle(document.documentElement).getPropertyValue(t);(!r||r.trim()==="")&&e.push(t)}),e.length>0&&!m&&(m=true,console.warn("\uD83D\uDEA8 @breadcoop/ui: Missing CSS variables detected!\n\nMissing variables: ".concat(e.join(", "),"\n\nTo fix this, import the theme CSS in your main CSS file:\n\n@import '@breadcoop/ui/theme';\n\nOr use the Tailwind preset:\nmodule.exports = { presets: [require('@breadcoop/ui/tailwind-preset')] }")))}process.env.NODE_ENV==="development"&&setTimeout(b,100);var y=function(e,t){if(u.default.isValidElement(e)){var r="".concat(e.props.className||""," ").concat(t).trim();return u.default.cloneElement(e,{className:r})}return e};function g(e){var r=e.children,a=e.leftIcon,i=e.rightIcon,c=e.disabled,s=c===void 0?false:c,p=e.preset,h=p===void 0?"primary":p,v=e.colorOverrides,m=v===void 0?{}:v,g=e.offsetPx,x=g===void 0?4:g,w=e.durationMs,j=w===void 0?300:w,O=e.className,N=O===void 0?"":O,B=e.type,k=B===void 0?"button":B,P=e.width,S=P===void 0?"auto":P,E=e.scrollTo,D=o(e,["children","leftIcon","rightIcon","disabled","preset","colorOverrides","offsetPx","durationMs","className","type","width","scrollTo"]);u.default.useEffect(function(){b()},[]);var T=t({},d[h],m),C=n(t({},f(T)),{"--btn-offset":"".concat(x,"px"),"--btn-duration":"".concat(j,"ms")}),I=["lifted-button-base",S==="full"?"w-full":"",S==="mobile-full"?"w-full xl:w-auto":""],F=[function(e){switch(e){case"primary":return"lifted-button-primary";case"secondary":return"lifted-button-secondary";case"destructive":return"lifted-button-destructive";case"positive":return"lifted-button-positive";case"stroke":return"lifted-button-stroke";default:return"lifted-button-primary"}}(h),"lifted-button-motion","lifted-button-lifted","lifted-button-active"],H=["lifted-button-disabled"],M=I.concat(s?H:F);M.push(N);var V=function(e){var t;E&&(e.preventDefault(),(t=document.getElementById(E))===null||t===void 0?void 0:t.scrollIntoView({behavior:"smooth"})),D.onClick&&D.onClick(e)};return l.jsxs("span",{className:[S==="full"?"relative block select-none align-middle":S==="mobile-full"?"relative block md:inline-block select-none align-middle":"relative inline-block select-none align-middle","group"].join(" "),style:C,children:[s?null:l.jsx("span",{"aria-hidden":true,className:"lifted-button-shadow",style:{transform:"translateX(2px) translateY(2px)"}}),l.jsxs("button",n(t({type:k,className:M.join(" "),onClick:V},D),{children:[a?l.jsx("span",{className:"shrink-0 py-[5px] flex items-center justify-center","aria-hidden":true,children:y(a,"w-6 h-6")}):null,l.jsx("span",{className:"whitespace-nowrap mt-1 leading-none p-[5px]",children:r}),i?l.jsx("span",{className:"shrink-0 py-[5px] flex items-center justify-center","aria-hidden":true,children:y(i,"w-6 h-6")}):null]}))]})}var x={breadDisplay:"--font-breadDisplay",breadBody:"--font-breadBody"},w=function(e){var t=e.variant,r=e.children,n=e.className,o=n===void 0?"":n;var a=["h1","h2","h3"].includes(t)?"font-breadDisplay":"font-breadBody",i={h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",body:"text-body",caption:"text-caption"},c=t.startsWith("h")?t:"p";return u.default.createElement(c,{className:"".concat(a," ").concat(i[t]," ").concat(o).trim()},r)},j=function(e){var t=e.children,r=e.className,n=r===void 0?"":r;return l.jsx(w,{variant:"h1",className:n,children:t})},O=function(e){var t=e.children,r=e.className,n=r===void 0?"":r;return l.jsx(w,{variant:"h2",className:n,children:t})},N=function(e){var t=e.children,r=e.className,n=r===void 0?"":r;return l.jsx(w,{variant:"h3",className:n,children:t})},B=function(e){var t=e.children,r=e.className,n=r===void 0?"":r;return l.jsx(w,{variant:"h4",className:n,children:t})},k=function(e){var t=e.children,r=e.className,n=r===void 0?"":r;return l.jsx(w,{variant:"h5",className:n,children:t})},P=function(e){var t=e.children,r=e.className,n=r===void 0?"":r,o=e.bold,a=o===void 0?false:o;return l.jsx(w,{variant:"body",className:"".concat(a?"text-body-bold":""," ").concat(n).trim(),children:t})},S=function(e){var t=e.children,r=e.className,n=r===void 0?"":r;return l.jsx(w,{variant:"caption",className:n,children:t})};exports.Body=P;exports.Caption=S;exports.Heading1=j;exports.Heading2=O;exports.Heading3=N;exports.Heading4=B;exports.Heading5=k;exports.LiftedButton=g;exports.Typography=w;exports.fontVariables=x;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}function t(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};var
|
|
1
|
+
function e(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}function t(t){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};var o=Object.keys(n);if(typeof Object.getOwnPropertySymbols==="function"){o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))}o.forEach(function(r){e(t,r,n[r])})}return t}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);if(t){n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}r.push.apply(r,n)}return r}function n(e,t){t=t!=null?t:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(t))}else{r(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function o(e,t){if(e==null)return{};var r=a(e,t);var n,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++){n=i[o];if(t.indexOf(n)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,n))continue;r[n]=e[n]}}return r}function a(e,t){if(e==null)return{};var r={};var n=Object.keys(e);var o,a;for(a=0;a<n.length;a++){o=n[a];if(t.indexOf(o)>=0)continue;r[o]=e[o]}return r}function i(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}import c from"react";import{jsx as l,jsxs as s}from"react/jsx-runtime";var d={primary:{bg:"--color-primary-orange",text:"--color-paper-main",hoverBg:"--color-orange-1",hoverText:"#ffffff",shadowBg:"#595959"},secondary:{bg:"#FBDED1",text:"--color-primary-orange",hoverBg:"#FFF1EA",hoverText:"--color-primary-orange",shadowBg:"#595959"},destructive:{bg:"--color-system-red",text:"--color-paper-main",hoverBg:"#BF0A00",hoverText:"#ffffff",shadowBg:"#595959"},positive:{bg:"--color-system-green",text:"--color-paper-main",hoverBg:"#2B8F00",hoverText:"#ffffff",shadowBg:"#595959"},stroke:{bg:"--color-paper-main",text:"--color-surface-ink",hoverBg:"--color-paper-2",hoverText:"--color-surface-ink",shadowBg:"#595959"}};function u(e){return{"--btn-bg":p(e.bg),"--btn-text":p(e.text),"--btn-hover-bg":p(e.hoverBg),"--btn-hover-text":p(e.hoverText),"--btn-shadow":p(e.shadowBg)}}var f={"--color-primary-orange":"#ea6023","--color-paper-main":"#f6f3eb","--color-surface-ink":"#1b201a","--color-system-red":"#df0b00","--color-system-green":"#32a800","--color-orange-1":"#d14a0f","--color-paper-2":"#eae2d6"};function p(e){if(!e)return"";if(e.includes("var("))return e;if(e.startsWith("--")){var t=f[e]||"#000000";return"var(".concat(e,", ").concat(t,")")}return e}var m=["--color-primary-orange","--color-paper-main","--color-surface-ink","--color-system-red","--color-system-green","--color-orange-1","--color-paper-2"],h=false;function b(){if(h||(typeof window==="undefined"?"undefined":i(window))>"u")return;var e=[];m.forEach(function(t){var r=getComputedStyle(document.documentElement).getPropertyValue(t);(!r||r.trim()==="")&&e.push(t)}),e.length>0&&!h&&(h=true,console.warn("\uD83D\uDEA8 @breadcoop/ui: Missing CSS variables detected!\n\nMissing variables: ".concat(e.join(", "),"\n\nTo fix this, import the theme CSS in your main CSS file:\n\n@import '@breadcoop/ui/theme';\n\nOr use the Tailwind preset:\nmodule.exports = { presets: [require('@breadcoop/ui/tailwind-preset')] }")))}process.env.NODE_ENV==="development"&&setTimeout(b,100);var v=function(e,t){if(c.isValidElement(e)){var r="".concat(e.props.className||""," ").concat(t).trim();return c.cloneElement(e,{className:r})}return e};function y(e){var r=e.children,a=e.leftIcon,i=e.rightIcon,f=e.disabled,p=f===void 0?false:f,m=e.preset,h=m===void 0?"primary":m,y=e.colorOverrides,g=y===void 0?{}:y,w=e.offsetPx,x=w===void 0?4:w,O=e.durationMs,N=O===void 0?300:O,j=e.className,B=j===void 0?"":j,k=e.type,P=k===void 0?"button":k,S=e.width,E=S===void 0?"auto":S,D=e.scrollTo,T=o(e,["children","leftIcon","rightIcon","disabled","preset","colorOverrides","offsetPx","durationMs","className","type","width","scrollTo"]);c.useEffect(function(){b()},[]);var C=t({},d[h],g),I=n(t({},u(C)),{"--btn-offset":"".concat(x,"px"),"--btn-duration":"".concat(N,"ms")}),F=["lifted-button-base",E==="full"?"w-full":"",E==="mobile-full"?"w-full xl:w-auto":""],H=[function(e){switch(e){case"primary":return"lifted-button-primary";case"secondary":return"lifted-button-secondary";case"destructive":return"lifted-button-destructive";case"positive":return"lifted-button-positive";case"stroke":return"lifted-button-stroke";default:return"lifted-button-primary"}}(h),"lifted-button-motion","lifted-button-lifted","lifted-button-active"],M=["lifted-button-disabled"],V=F.concat(p?M:H);V.push(B);var A=function(e){var t;D&&(e.preventDefault(),(t=document.getElementById(D))===null||t===void 0?void 0:t.scrollIntoView({behavior:"smooth"})),T.onClick&&T.onClick(e)};return s("span",{className:[E==="full"?"relative block select-none align-middle":E==="mobile-full"?"relative block md:inline-block select-none align-middle":"relative inline-block select-none align-middle","group"].join(" "),style:I,children:[p?null:l("span",{"aria-hidden":true,className:"lifted-button-shadow",style:{transform:"translateX(2px) translateY(2px)"}}),s("button",n(t({type:P,className:V.join(" "),onClick:A},T),{children:[a?l("span",{className:"shrink-0 py-[5px] flex items-center justify-center","aria-hidden":true,children:v(a,"w-6 h-6")}):null,l("span",{className:"whitespace-nowrap mt-1 leading-none p-[5px]",children:r}),i?l("span",{className:"shrink-0 py-[5px] flex items-center justify-center","aria-hidden":true,children:v(i,"w-6 h-6")}):null]}))]})}var g={breadDisplay:"--font-breadDisplay",breadBody:"--font-breadBody"},w=function(e){var t=e.variant,r=e.children,n=e.className,o=n===void 0?"":n;var a=["h1","h2","h3"].includes(t)?"font-breadDisplay":"font-breadBody",i={h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",body:"text-body",caption:"text-caption"},l=t.startsWith("h")?t:"p";return c.createElement(l,{className:"".concat(a," ").concat(i[t]," ").concat(o).trim()},r)},x=function(e){var t=e.children,r=e.className,n=r===void 0?"":r;return l(w,{variant:"h1",className:n,children:t})},O=function(e){var t=e.children,r=e.className,n=r===void 0?"":r;return l(w,{variant:"h2",className:n,children:t})},N=function(e){var t=e.children,r=e.className,n=r===void 0?"":r;return l(w,{variant:"h3",className:n,children:t})},j=function(e){var t=e.children,r=e.className,n=r===void 0?"":r;return l(w,{variant:"h4",className:n,children:t})},B=function(e){var t=e.children,r=e.className,n=r===void 0?"":r;return l(w,{variant:"h5",className:n,children:t})},k=function(e){var t=e.children,r=e.className,n=r===void 0?"":r,o=e.bold,a=o===void 0?false:o;return l(w,{variant:"body",className:"".concat(a?"text-body-bold":""," ").concat(n).trim(),children:t})},P=function(e){var t=e.children,r=e.className,n=r===void 0?"":r;return l(w,{variant:"caption",className:n,children:t})};export{k as Body,P as Caption,x as Heading1,O as Heading2,N as Heading3,j as Heading4,B as Heading5,y as LiftedButton,w as Typography,g as fontVariables};
|
package/dist/theme.css
CHANGED
|
@@ -160,6 +160,64 @@
|
|
|
160
160
|
.bread-button-enabled {
|
|
161
161
|
@apply cursor-pointer;
|
|
162
162
|
}
|
|
163
|
+
|
|
164
|
+
/* LiftedButton Components */
|
|
165
|
+
.lifted-button-base {
|
|
166
|
+
@apply mb-1 relative z-10 inline-flex items-center justify-center gap-[8px] font-breadBody text-base px-[37px] h-14 cursor-pointer;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.lifted-button-primary {
|
|
170
|
+
@apply bg-primary-orange text-paper-main group-hover:bg-orange-1 group-hover:text-white;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.lifted-button-secondary {
|
|
174
|
+
@apply text-primary-orange group-hover:text-primary-orange;
|
|
175
|
+
background-color: #fbded1;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.lifted-button-secondary:hover {
|
|
179
|
+
background-color: #fff1ea;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.lifted-button-destructive {
|
|
183
|
+
@apply bg-system-red text-paper-main group-hover:text-white;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.lifted-button-destructive:hover {
|
|
187
|
+
background-color: #bf0a00;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.lifted-button-positive {
|
|
191
|
+
@apply bg-system-green text-paper-main group-hover:text-white;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.lifted-button-positive:hover {
|
|
195
|
+
background-color: #2b8f00;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.lifted-button-stroke {
|
|
199
|
+
@apply bg-paper-main text-surface-ink border border-surface-ink group-hover:bg-paper-2 group-hover:text-surface-ink;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.lifted-button-disabled {
|
|
203
|
+
@apply bg-surface-grey opacity-50 cursor-not-allowed;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.lifted-button-shadow {
|
|
207
|
+
@apply absolute mb-1 inset-0 bg-surface-grey-2;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.lifted-button-motion {
|
|
211
|
+
@apply transition-all ease-out;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.lifted-button-lifted {
|
|
215
|
+
@apply -translate-x-0.5 -translate-y-0.5;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.lifted-button-active {
|
|
219
|
+
@apply group-active:translate-x-0.5 group-active:translate-y-0.5;
|
|
220
|
+
}
|
|
163
221
|
}
|
|
164
222
|
|
|
165
223
|
body {
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@breadcoop/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "A component library for implementing Bread Coop branding in JS/TS projects",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
-
"style": "dist/
|
|
8
|
+
"style": "dist/theme.css",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"types": "./dist/index.d.ts",
|
package/theme.css
CHANGED
|
@@ -160,6 +160,64 @@
|
|
|
160
160
|
.bread-button-enabled {
|
|
161
161
|
@apply cursor-pointer;
|
|
162
162
|
}
|
|
163
|
+
|
|
164
|
+
/* LiftedButton Components */
|
|
165
|
+
.lifted-button-base {
|
|
166
|
+
@apply mb-1 relative z-10 inline-flex items-center justify-center gap-[8px] font-breadBody text-base px-[37px] h-14 cursor-pointer;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.lifted-button-primary {
|
|
170
|
+
@apply bg-primary-orange text-paper-main group-hover:bg-orange-1 group-hover:text-white;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.lifted-button-secondary {
|
|
174
|
+
@apply text-primary-orange group-hover:text-primary-orange;
|
|
175
|
+
background-color: #fbded1;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.lifted-button-secondary:hover {
|
|
179
|
+
background-color: #fff1ea;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.lifted-button-destructive {
|
|
183
|
+
@apply bg-system-red text-paper-main group-hover:text-white;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.lifted-button-destructive:hover {
|
|
187
|
+
background-color: #bf0a00;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.lifted-button-positive {
|
|
191
|
+
@apply bg-system-green text-paper-main group-hover:text-white;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.lifted-button-positive:hover {
|
|
195
|
+
background-color: #2b8f00;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.lifted-button-stroke {
|
|
199
|
+
@apply bg-paper-main text-surface-ink border border-surface-ink group-hover:bg-paper-2 group-hover:text-surface-ink;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.lifted-button-disabled {
|
|
203
|
+
@apply bg-surface-grey opacity-50 cursor-not-allowed;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.lifted-button-shadow {
|
|
207
|
+
@apply absolute mb-1 inset-0 bg-surface-grey-2;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.lifted-button-motion {
|
|
211
|
+
@apply transition-all ease-out;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.lifted-button-lifted {
|
|
215
|
+
@apply -translate-x-0.5 -translate-y-0.5;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.lifted-button-active {
|
|
219
|
+
@apply group-active:translate-x-0.5 group-active:translate-y-0.5;
|
|
220
|
+
}
|
|
163
221
|
}
|
|
164
222
|
|
|
165
223
|
body {
|