@pittorica/card-react 0.25.0 → 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/dist/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- export type { CardProps } from './Card.js';
2
- export { Card } from './Card.js';
1
+ export * from './Card.js';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
package/dist/index.js CHANGED
@@ -1,46 +1,46 @@
1
1
  import { jsx as x } from "react/jsx-runtime";
2
- function T(i) {
3
- var p, r, a = "";
4
- if (typeof i == "string" || typeof i == "number") a += i;
5
- else if (typeof i == "object") if (Array.isArray(i)) {
6
- var o = i.length;
7
- for (p = 0; p < o; p++) i[p] && (r = T(i[p])) && (a && (a += " "), a += r);
8
- } else for (r in i) i[r] && (a && (a += " "), a += r);
2
+ function T(r) {
3
+ var p, i, a = "";
4
+ if (typeof r == "string" || typeof r == "number") a += r;
5
+ else if (typeof r == "object") if (Array.isArray(r)) {
6
+ var o = r.length;
7
+ for (p = 0; p < o; p++) r[p] && (i = T(r[p])) && (a && (a += " "), a += i);
8
+ } else for (i in r) r[i] && (a && (a += " "), a += i);
9
9
  return a;
10
10
  }
11
11
  function k() {
12
- for (var i, p, r = 0, a = "", o = arguments.length; r < o; r++) (i = arguments[r]) && (p = T(i)) && (a && (a += " "), a += p);
12
+ for (var r, p, i = 0, a = "", o = arguments.length; i < o; i++) (r = arguments[i]) && (p = T(r)) && (a && (a += " "), a += p);
13
13
  return a;
14
14
  }
15
- function N(i) {
16
- var p, r, a = "";
17
- if (typeof i == "string" || typeof i == "number") a += i;
18
- else if (typeof i == "object") if (Array.isArray(i)) {
19
- var o = i.length;
20
- for (p = 0; p < o; p++) i[p] && (r = N(i[p])) && (a && (a += " "), a += r);
21
- } else for (r in i) i[r] && (a && (a += " "), a += r);
15
+ function N(r) {
16
+ var p, i, a = "";
17
+ if (typeof r == "string" || typeof r == "number") a += r;
18
+ else if (typeof r == "object") if (Array.isArray(r)) {
19
+ var o = r.length;
20
+ for (p = 0; p < o; p++) r[p] && (i = N(r[p])) && (a && (a += " "), a += i);
21
+ } else for (i in r) r[i] && (a && (a += " "), a += i);
22
22
  return a;
23
23
  }
24
- function q() {
25
- for (var i, p, r = 0, a = "", o = arguments.length; r < o; r++) (i = arguments[r]) && (p = N(i)) && (a && (a += " "), a += p);
24
+ function S() {
25
+ for (var r, p, i = 0, a = "", o = arguments.length; i < o; i++) (r = arguments[i]) && (p = N(r)) && (a && (a += " "), a += p);
26
26
  return a;
27
27
  }
28
28
  const A = ({
29
- as: i,
29
+ as: r,
30
30
  children: p,
31
- display: r,
31
+ display: i,
32
32
  m: a,
33
33
  mt: o,
34
- mr: c,
35
- mb: e,
34
+ mr: e,
35
+ mb: c,
36
36
  ml: s,
37
37
  mx: n,
38
38
  my: d,
39
39
  p: f,
40
40
  pt: v,
41
41
  pr: l,
42
- pb: $,
43
- pl: u,
42
+ pb: u,
43
+ pl: $,
44
44
  px: g,
45
45
  py: m,
46
46
  width: y,
@@ -49,10 +49,11 @@ const A = ({
49
49
  style: B,
50
50
  className: L,
51
51
  disabled: R,
52
- ...j
52
+ required: j,
53
+ ...q
53
54
  }) => {
54
- const w = i || "div", t = {};
55
- r && (t.display = r), y && (t.width = y), h && (t.height = h), b && (t.position = b), a && (t.margin = `var(--pittorica-space-${a})`), o && (t.marginTop = `var(--pittorica-space-${o})`), c && (t.marginRight = `var(--pittorica-space-${c})`), e && (t.marginBottom = `var(--pittorica-space-${e})`), s && (t.marginLeft = `var(--pittorica-space-${s})`), n && (t.marginLeft = `var(--pittorica-space-${n})`, t.marginRight = `var(--pittorica-space-${n})`), d && (t.marginTop = `var(--pittorica-space-${d})`, t.marginBottom = `var(--pittorica-space-${d})`), f && (t.padding = `var(--pittorica-space-${f})`), v && (t.paddingTop = `var(--pittorica-space-${v})`), l && (t.paddingRight = `var(--pittorica-space-${l})`), $ && (t.paddingBottom = `var(--pittorica-space-${$})`), u && (t.paddingLeft = `var(--pittorica-space-${u})`), g && (t.paddingLeft = `var(--pittorica-space-${g})`, t.paddingRight = `var(--pittorica-space-${g})`), m && (t.paddingTop = `var(--pittorica-space-${m})`, t.paddingBottom = `var(--pittorica-space-${m})`);
55
+ const w = r || "div", t = {};
56
+ i && (t.display = i), y && (t.width = y), h && (t.height = h), b && (t.position = b), a && (t.margin = `var(--pittorica-space-${a})`), o && (t.marginTop = `var(--pittorica-space-${o})`), e && (t.marginRight = `var(--pittorica-space-${e})`), c && (t.marginBottom = `var(--pittorica-space-${c})`), s && (t.marginLeft = `var(--pittorica-space-${s})`), n && (t.marginLeft = `var(--pittorica-space-${n})`, t.marginRight = `var(--pittorica-space-${n})`), d && (t.marginTop = `var(--pittorica-space-${d})`, t.marginBottom = `var(--pittorica-space-${d})`), f && (t.padding = `var(--pittorica-space-${f})`), v && (t.paddingTop = `var(--pittorica-space-${v})`), l && (t.paddingRight = `var(--pittorica-space-${l})`), u && (t.paddingBottom = `var(--pittorica-space-${u})`), $ && (t.paddingLeft = `var(--pittorica-space-${$})`), g && (t.paddingLeft = `var(--pittorica-space-${g})`, t.paddingRight = `var(--pittorica-space-${g})`), m && (t.paddingTop = `var(--pittorica-space-${m})`, t.paddingBottom = `var(--pittorica-space-${m})`);
56
57
  const C = {
57
58
  ...B,
58
59
  ...t
@@ -60,36 +61,37 @@ const A = ({
60
61
  return /* @__PURE__ */ x(
61
62
  w,
62
63
  {
63
- className: q("pittorica-box", L),
64
+ className: S("pittorica-box", L),
64
65
  style: C,
65
66
  disabled: R,
66
- ...j,
67
+ required: j,
68
+ ...q,
67
69
  children: p
68
70
  }
69
71
  );
70
72
  };
71
73
  A.displayName = "Box";
72
74
  const z = ({
73
- variant: i = "surface",
75
+ variant: r = "surface",
74
76
  translucent: p = !1,
75
- children: r,
77
+ children: i,
76
78
  className: a,
77
79
  style: o,
78
- as: c,
79
- ...e
80
+ as: e,
81
+ ...c
80
82
  }) => /* @__PURE__ */ x(
81
83
  A,
82
84
  {
83
- as: c || "div",
85
+ as: e || "div",
84
86
  className: k(
85
87
  "pittorica-card",
86
- `pittorica-card--variant-${i}`,
88
+ `pittorica-card--variant-${r}`,
87
89
  { "pittorica-card--translucent": p },
88
90
  a
89
91
  ),
90
92
  style: o,
91
- ...e,
92
- children: r
93
+ ...c,
94
+ children: i
93
95
  }
94
96
  );
95
97
  z.displayName = "Card";
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@pittorica/card-react",
3
- "version": "0.25.0",
3
+ "version": "0.26.0",
4
+ "homepage": "https://pittorica.dcdavidev.me",
4
5
  "type": "module",
5
6
  "main": "./dist/index.js",
6
7
  "module": "./dist/index.js",
@@ -10,7 +11,7 @@
10
11
  ],
11
12
  "dependencies": {
12
13
  "clsx": "^2.1.1",
13
- "@pittorica/box-react": "0.25.0"
14
+ "@pittorica/box-react": "0.26.0"
14
15
  },
15
16
  "devDependencies": {
16
17
  "@testing-library/jest-dom": "^6.9.1",
@@ -20,15 +21,15 @@
20
21
  "@vitejs/plugin-react": "^4.0.0",
21
22
  "jsdom": "^22.0.0",
22
23
  "typescript": "^5.0.0",
23
- "vite": "^5.0.0",
24
- "vitest": "^2.1.9",
25
- "@pittorica/avatar-react": "0.25.0",
26
- "@pittorica/aspect-ratio-react": "0.25.0",
27
- "@pittorica/heading-react": "0.25.0",
28
- "@pittorica/flex-react": "0.25.0",
29
- "@pittorica/theme-react": "0.25.0",
30
- "@pittorica/text-react": "0.25.0",
31
- "pittorica": "0.25.0"
24
+ "vite": "^6.4.1",
25
+ "vitest": "^3.2.4",
26
+ "@pittorica/aspect-ratio-react": "0.26.0",
27
+ "@pittorica/avatar-react": "0.26.0",
28
+ "@pittorica/heading-react": "0.26.0",
29
+ "@pittorica/flex-react": "0.26.0",
30
+ "@pittorica/theme-react": "0.26.0",
31
+ "@pittorica/text-react": "0.26.0",
32
+ "pittorica": "0.26.0"
32
33
  },
33
34
  "peerDependencies": {
34
35
  "react": ">=19",
@@ -38,7 +39,7 @@
38
39
  "build": "npm run clean && npm run build:js && npm run build:types",
39
40
  "build:js": "vite build",
40
41
  "build:types": "tsc -p tsconfig.json",
41
- "clean": "rm -rf dist",
42
+ "clean": "rm -rf dist *.tsbuildinfo",
42
43
  "test": "vitest run",
43
44
  "test:watch": "vitest"
44
45
  }
@@ -1,7 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Card } from './Card.js';
3
- declare const meta: Meta<typeof Card>;
4
- export default meta;
5
- export declare const GlassCard: StoryObj<typeof Card>;
6
- export declare const WithImage: StoryObj<typeof Card>;
7
- //# sourceMappingURL=Card.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Card.stories.d.ts","sourceRoot":"","sources":["../src/Card.stories.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CAQ3B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,OAAO,IAAI,CA0B3C,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,OAAO,IAAI,CAmB3C,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * @vitest-environment jsdom
3
- */
4
- import '@testing-library/jest-dom';
5
- //# sourceMappingURL=Card.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Card.test.d.ts","sourceRoot":"","sources":["../src/Card.test.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,2BAA2B,CAAC"}