@fluidattacks/design 3.1.2 → 3.1.3

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BjQJt0dx.js"),t=require("react"),n=require("styled-components"),r=require("lodash"),i=require("react-router-dom"),o=require("react-dom");function a(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const s=a(t),l=a(o),u=n.styled(e.BaseComponent)`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BRxUTT0G.js"),t=require("react"),n=require("styled-components"),r=require("lodash"),i=require("react-router-dom"),o=require("react-dom");function a(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const s=a(t),l=a(o),u=n.styled(e.BaseComponent)`
2
2
  ${({theme:e,$center:t=!1,$styleMd:n,$styleSm:r})=>`\n ${t?"margin: auto;":""}\n scrollbar-color: ${e.palette.gray[600]} ${e.palette.gray[100]};\n scroll-padding: ${e.spacing[.5]};\n\n @media screen\n and (min-width: ${e.breakpoints.mobile})\n and (max-width: ${e.breakpoints.tablet})\n {\n ${n};\n }\n\n @media screen and (max-width: ${e.breakpoints.mobile}) {\n ${r};\n }\n `}
3
3
  `,c=t.forwardRef((function({as:t="div",center:n,children:r,id:i,onHover:o,onLeave:a,styleMd:s,styleSm:l,...c},d){return e.jsxRuntimeExports.jsx(u,{$center:n,$styleMd:s,$styleSm:l,as:t,id:i,onMouseLeave:a,onMouseOver:o,ref:d,...c,children:r})})),d=({item:t})=>e.jsxRuntimeExports.jsxs(c,{display:"block",id:`panel-${t.title}`,padding:[.75,.75,.75,.75],children:[t.description?e.jsxRuntimeExports.jsx(e.Text,{mb:t.extraElement?.5:void 0,size:"sm",children:t.description}):void 0,t.extraElement?e.jsxRuntimeExports.jsx(c,{children:t.extraElement}):void 0]}),p=t.forwardRef((function({aligned:r="end",items:i,bgColor:o},a){const s=n.useTheme(),[l,u]=t.useState(!1),[p,h]=t.useState(-1),f=t.useCallback((e=>()=>{h(e),u(e!==p||(e=>!e))}),[p]);return e.jsxRuntimeExports.jsx(c,{ref:a,children:i.map(((t,n)=>{const a=n===p&&l;return e.jsxRuntimeExports.jsxs(c,{bgColor:o??s.palette.white,children:[e.jsxRuntimeExports.jsx(c,{"aria-controls":`panel-${t.title}`,"aria-expanded":l,"aria-label":t.title,as:"button",bgColor:o??s.palette.white,bgColorHover:s.palette.gray[100],borderBottom:a||n===i.length-1?"1px solid":void 0,borderColor:s.palette.gray[200],borderTop:"1px solid",cursor:"pointer",display:"flex",onClick:f(n),padding:[.75,.75,.75,.75],width:"100%",children:e.jsxRuntimeExports.jsxs(c,{as:"summary",display:"flex",flexDirection:"end"===r?"row":"row-reverse",gap:.75,justify:"space-between",width:"100%",children:[e.jsxRuntimeExports.jsx(e.Text,{color:s.palette.gray[800],fontWeight:"bold",size:"sm",sizeSm:"sm",textAlign:"start",children:t.title}),e.jsxRuntimeExports.jsx(e.Icon,{icon:a?"chevron-up":"chevron-down",iconColor:s.palette.gray[400],iconSize:"xs",iconType:"fa-light"})]})}),a&&e.jsxRuntimeExports.jsx(d,{item:t})]},t.title)}))})})),h=e=>{switch(e){case"warning":return"triangle-exclamation";case"info":return"circle-info";case"success":return"circle-check";default:return"circle-exclamation"}},{getVariant:f}=e.variantBuilder((e=>({error:`\n background: ${e.palette.error[50]};\n border: 1px solid ${e.palette.error[500]};\n color: ${e.palette.error[700]};\n\n button {\n color: ${e.palette.error[700]};\n\n &:hover:not([disabled]) {\n background-color: ${e.palette.error[200]};\n color: ${e.palette.error[700]};\n }\n }\n `,info:`\n background: ${e.palette.info[50]};\n border: 1px solid ${e.palette.info[500]};\n color: ${e.palette.info[700]};\n\n button {\n color: ${e.palette.info[700]};\n\n &:hover:not([disabled]) {\n background-color: ${e.palette.info[200]};\n color: ${e.palette.info[700]};\n }\n }\n `,success:`\n background: ${e.palette.success[50]};\n border: 1px solid ${e.palette.success[500]};\n color: ${e.palette.success[700]};\n\n button {\n color: ${e.palette.success[700]};\n\n &:hover:not([disabled]) {\n background-color: ${e.palette.success[200]};\n color: ${e.palette.success[700]};\n }\n }\n `,warning:`\n background: ${e.palette.warning[50]};\n border: 1px solid ${e.palette.warning[500]};\n color: ${e.palette.warning[700]};\n\n button {\n color: ${e.palette.warning[700]};\n\n &:hover:not([disabled]) {\n background-color: ${e.palette.warning[200]};\n color: ${e.palette.warning[700]};\n }\n }\n `}))),m=n.styled.div`
4
4
  ${({theme:e,$variant:t})=>`\n background: transparent;\n align-items: center;\n border-radius: ${e.spacing[.25]};\n display: inline-flex;\n font-family: ${e.typography.type.primary};\n font-size: ${e.typography.text.sm};\n font-weight: ${e.typography.weight.bold};\n line-height: ${e.spacing[1.25]};\n min-width: 250px;\n width: 100%;\n padding: ${e.spacing[.75]};\n position: relative;\n gap: ${e.spacing[.75]};\n\n button {\n background-color: transparent;\n }\n\n ${f(e,t??"error")}\n `}
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { B as e, j as t, T as n, I as r, v as i, S as a, a as l, i as u, b as c, g as d, c as h, t as f, d as m, e as g, u as v, f as b, H as k, r as S, h as $, k as P, l as T, m as j, n as M } from "./index-BPVSZmaF.mjs";
2
- import { q, p, E, D, o, F, C, A, y, x, s, z, w, G } from "./index-BPVSZmaF.mjs";
1
+ import { B as e, j as t, T as n, I as r, v as i, S as a, a as l, i as u, b as c, g as d, c as h, t as f, d as m, e as g, u as v, f as b, H as k, r as S, h as $, k as P, l as T, m as j, n as M } from "./index-i8Ii0UcD.mjs";
2
+ import { q, p, E, D, o, F, C, A, y, x, s, z, w, G } from "./index-i8Ii0UcD.mjs";
3
3
  import * as _ from "react";
4
4
  import R, { forwardRef as O, useState as I, useCallback as L, useEffect as N, useRef as V, useContext as K, createContext as B, useMemo as U, useImperativeHandle as W, Fragment as H, Children as Z, isValidElement as Y, cloneElement as J, useLayoutEffect as X, useInsertionEffect as Q, createElement as ee } from "react";
5
5
  import te, { styled as ne, useTheme as re, css as ie, keyframes as oe } from "styled-components";
package/package.json CHANGED
@@ -96,8 +96,8 @@
96
96
  "module": "dist/index.mjs",
97
97
  "name": "@fluidattacks/design",
98
98
  "peerDependencies": {
99
- "react": "18.2.0",
100
- "react-dom": "18.2.0",
99
+ "react": "18.3.1",
100
+ "react-dom": "18.3.1",
101
101
  "react-router-dom": "6.28.0"
102
102
  },
103
103
  "publishConfig": {
@@ -116,5 +116,5 @@
116
116
  "test-storybook": "test-storybook"
117
117
  },
118
118
  "typings": "dist/types/index.d.ts",
119
- "version": "3.1.2"
119
+ "version": "3.1.3"
120
120
  }