@sps-woodland/content-tiles 7.4.5 → 7.4.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/lib/index.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("@sps-woodland/core"),k=require("react"),y=require("@sps-woodland/tokens"),m=require("@spscommerce/utils");function S(e){if(e&&e.__esModule)return e;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const o=S(k);var N="_85dplj0",h="_85dplj1";function _(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function w(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),t.push.apply(t,n)}return t}function v(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?w(Object(t),!0).forEach(function(n){_(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):w(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var O=(e,r,t)=>{for(var n of Object.keys(e)){var a;if(e[n]!==((a=r[n])!==null&&a!==void 0?a:t[n]))return!1}return!0},u=e=>r=>{var t=e.defaultClassName,n=v(v({},e.defaultVariants),r);for(var a in n){var p,c=(p=n[a])!==null&&p!==void 0?p:e.defaultVariants[a];if(c!=null){var l=c;typeof l=="boolean"&&(l=l===!0?"true":"false");var i=e.variantClassNames[a][l];i&&(t+=" "+i)}}for(var[d,f]of e.compoundVariants)O(d,n,e.defaultVariants)&&(t+=" "+f);return t},E=u({defaultClassName:"_1k4ncnf4",variantClassNames:{error:{true:"_1k4ncnf5"},warning:{true:"_1k4ncnf6"},disabled:{true:"_1k4ncnf7"}},defaultVariants:{error:!1,warning:!1,disabled:!1},compoundVariants:[]}),D="_1k4ncnf0",L=u({defaultClassName:"_1k4ncnf1",variantClassNames:{disabled:{true:"_1k4ncnf2"}},defaultVariants:{disabled:!1},compoundVariants:[]}),R="_1k4ncnf3",C=u({defaultClassName:"",variantClassNames:{error:{true:"_1k4ncnf8"},warning:{true:"_1k4ncnf9"},disabled:{true:"_1k4ncnfa"}},defaultVariants:{error:!1,disabled:!1,warning:!1},compoundVariants:[]}),j="_1k4ncnfb",x="_1k4ncnfc",I="_1k4ncnfe",A="_1k4ncnfd";function g({className:e,href:r,icon:t,error:n=!1,errorIcon:a,title:p,warning:c=!1,warningIcon:l,disabled:i=!1,target:d,onClick:f,...T}){return o.createElement("div",{className:s.cl(y.grid[3],D,e),...T},o.createElement("a",{href:i?void 0:r,className:s.cl(E({error:n,warning:c,disabled:i}),h),target:d,onClick:f},(c||n)&&o.createElement("div",{className:j},c&&(l?s.contentOf(l):o.createElement(s.Icon,{icon:"status-warning",className:s.cl(C({warning:c,disabled:i}))})),n&&(a?s.contentOf(a):o.createElement(s.Icon,{icon:"ban",className:s.cl(C({error:n,disabled:i}))}))),o.createElement("div",null,o.createElement("div",{className:s.cl(R)},typeof t=="string"?o.createElement("img",{className:s.cl(L({disabled:i})),src:t,alt:""}):s.contentOf(t)),o.createElement("div",{className:s.cl(x)},o.createElement("p",{className:s.cl(A)},p,d==="_blank"&&o.createElement(s.Icon,{icon:"tabs",className:s.cl(I)}))))))}s.Metadata.set(g,{name:"Content Tile",props:{href:{type:"string"},icon:{type:"React.ReactNode | (() => React.ReactNode)",required:!0},error:{type:"boolean",default:"false"},errorIcon:{type:"React.ReactNode | (() => React.ReactNode)"},title:{type:"string",required:!0},warning:{type:"boolean",default:"false"},warningIcon:{type:"React.ReactNode | (() => React.ReactNode)"},disabled:{type:"boolean",default:"false"},target:{type:"string"},onClick:{type:"() => void"}}});function b({children:e,className:r,...t}){return o.createElement("div",{className:s.cl(N,r),...t},e)}s.Metadata.set(b,{name:"Content Tile List"});const P={components:[g,b],examples:{basic:{label:"Basic",examples:{basic:{react:m.code`
2
- import { ContentTileList, ContentTile } from "@sps-woodland/content-tiles";
2
+ import { ContentTileList, ContentTile } from "@sps-woodland/content-tiles";
3
3
 
4
4
  function Component() {
5
5
  const apps = [
@@ -68,7 +68,7 @@
68
68
  );
69
69
  }
70
70
  `}}},singleTile:{label:"Single Tile",examples:{basic:{react:m.code`
71
- import { ContentTileList, ContentTile } from "@sps-woodland/content-tiles";
71
+ import { ContentTileList, ContentTile } from "@sps-woodland/content-tiles";
72
72
  function Component() {
73
73
  return (
74
74
  <>
@@ -83,7 +83,7 @@
83
83
  )
84
84
  }
85
85
  `},error:{react:m.code`
86
- import { ContentTileList, ContentTile } from "@sps-woodland/content-tiles";
86
+ import { ContentTileList, ContentTile } from "@sps-woodland/content-tiles";
87
87
 
88
88
  function Component() {
89
89
  return (
@@ -103,7 +103,7 @@
103
103
  )
104
104
  }
105
105
  `}}},sortableTiles:{label:"Sortable Tiles",examples:{basic:{react:m.code`
106
- import { ContentTileList, ContentTile } from "@sps-woodland/content-tiles";
106
+ import { ContentTileList, ContentTile } from "@sps-woodland/content-tiles";
107
107
  import { SortingHeader, SortingHeaderCell } from "@sps-woodland/sorting-header";
108
108
  import { grid } from "@sps-woodland/tokens";
109
109
 
package/lib/index.es.js CHANGED
@@ -133,7 +133,7 @@ const V = {
133
133
  examples: {
134
134
  basic: {
135
135
  react: d`
136
- import { ContentTileList, ContentTile } from "@sps-woodland/content-tiles";
136
+ import { ContentTileList, ContentTile } from "@sps-woodland/content-tiles";
137
137
 
138
138
  function Component() {
139
139
  const apps = [
@@ -210,7 +210,7 @@ const V = {
210
210
  examples: {
211
211
  basic: {
212
212
  react: d`
213
- import { ContentTileList, ContentTile } from "@sps-woodland/content-tiles";
213
+ import { ContentTileList, ContentTile } from "@sps-woodland/content-tiles";
214
214
  function Component() {
215
215
  return (
216
216
  <>
@@ -228,7 +228,7 @@ const V = {
228
228
  },
229
229
  error: {
230
230
  react: d`
231
- import { ContentTileList, ContentTile } from "@sps-woodland/content-tiles";
231
+ import { ContentTileList, ContentTile } from "@sps-woodland/content-tiles";
232
232
 
233
233
  function Component() {
234
234
  return (
@@ -256,7 +256,7 @@ const V = {
256
256
  examples: {
257
257
  basic: {
258
258
  react: d`
259
- import { ContentTileList, ContentTile } from "@sps-woodland/content-tiles";
259
+ import { ContentTileList, ContentTile } from "@sps-woodland/content-tiles";
260
260
  import { SortingHeader, SortingHeaderCell } from "@sps-woodland/sorting-header";
261
261
  import { grid } from "@sps-woodland/tokens";
262
262
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sps-woodland/content-tiles",
3
3
  "description": "SPS Woodland Design System content-tile and content tile list components.",
4
- "version": "7.4.5",
4
+ "version": "7.4.6",
5
5
  "author": "SPS Commerce",
6
6
  "license": "UNLICENSED",
7
7
  "repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/content-tiles",
@@ -25,15 +25,15 @@
25
25
  "access": "public"
26
26
  },
27
27
  "peerDependencies": {
28
- "@sps-woodland/core": "7.4.5",
29
- "@sps-woodland/tokens": "7.4.5",
28
+ "@sps-woodland/core": "7.4.6",
29
+ "@sps-woodland/tokens": "7.4.6",
30
30
  "@spscommerce/utils": "^6.12.1",
31
31
  "react": "^16.14.0",
32
32
  "react-dom": "^16.14.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@sps-woodland/core": "7.4.5",
36
- "@sps-woodland/tokens": "7.4.5",
35
+ "@sps-woodland/core": "7.4.6",
36
+ "@sps-woodland/tokens": "7.4.6",
37
37
  "@spscommerce/utils": "^6.12.1",
38
38
  "@vanilla-extract/css": "^1.9.3",
39
39
  "@vanilla-extract/recipes": "^0.2.5",