@caseparts-org/caseblocks 0.0.248 → 0.0.249

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.
@@ -1 +1 @@
1
- ._pill_1dm0w_1{display:flex;justify-content:center;align-items:center;border-radius:28px;border:none}._pill-xs_1dm0w_17{padding:2px 10px}._pill-sm_1dm0w_25{padding:2px 12px}._pill-md_1dm0w_33{padding:4px 16px}._pill-color-neutral_1dm0w_41{background:var(--color-neutrals-neutral-1)}._pill-color-secondary_1dm0w_49{background:var(--color-brand-secondary-lt-teal-blue)}._pill-color-caution-tips_1dm0w_57{background:var(--color-brand-secondary-lt-yellow)}._pill-color-warning_1dm0w_65{background:var(--color-brand-secondary-lt-orange)}._pill-color-success_1dm0w_73{background:var(--color-brand-secondary-lt-green)}._pill-color-error-warning_1dm0w_81{background:var(--color-brand-secondary-lt-red)}
1
+ ._pill_i5js9_1{display:flex;justify-content:center;align-items:center;border-radius:28px;border:1px solid}._pill-xs_i5js9_17{padding:2px 10px}._pill-sm_i5js9_25{padding:2px 12px}._pill-md_i5js9_33{padding:4px 16px}._pill-color-neutral_i5js9_41{background:var(--color-neutrals-neutral-1)}._pill-color-secondary_i5js9_49{background:var(--color-brand-secondary-lt-teal-blue)}._pill-color-caution-tips_i5js9_57{background:var(--color-brand-secondary-lt-yellow)}._pill-color-warning_i5js9_65{background:var(--color-brand-secondary-lt-orange)}._pill-color-success_i5js9_73{background:var(--color-brand-secondary-lt-green)}._pill-color-error-warning_i5js9_81{background:var(--color-brand-secondary-lt-red)}._pill-border-neutral_i5js9_89{border-color:var(--border-border-primary)}._pill-border-secondary_i5js9_97{border-color:var(--border-border-primary-chit)}._pill-border-caution-tips_i5js9_105{border-color:var(--border-border-help)}._pill-border-warning_i5js9_113{border-color:var(--border-border-warning)}._pill-border-success_i5js9_121{border-color:var(--border-border-success)}._pill-border-error-warning_i5js9_129{border-color:var(--border-border-error-warning)}._noBorder_i5js9_137{border:none}._uppercase_i5js9_145{text-transform:uppercase;letter-spacing:.03em}
@@ -1,11 +1,14 @@
1
1
  import { default as React, ReactNode } from 'react';
2
- import { TextColorToken } from '../Text/Text';
2
+ import { TextColorToken, TextWeight } from '../Text/Text';
3
3
  export interface PillProps extends React.HTMLAttributes<HTMLSpanElement> {
4
4
  children: ReactNode;
5
5
  colorToken?: "neutral" | "secondary" | "caution-tips" | "warning" | "success" | "error-warning";
6
6
  customColor?: string;
7
7
  textColorToken?: TextColorToken;
8
- size: "xs" | "sm" | "md";
8
+ weight?: TextWeight;
9
+ uppercase?: boolean;
10
+ hideBorder?: boolean;
11
+ size?: "xs" | "sm" | "md";
9
12
  className?: string;
10
13
  }
11
- export declare function Pill({ colorToken, textColorToken, customColor, size, className, children, ...otherProps }: PillProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function Pill({ colorToken, textColorToken, customColor, weight, uppercase, hideBorder, size, className, children, ...otherProps }: PillProps): import("react/jsx-runtime").JSX.Element;
@@ -1,42 +1,64 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { Text as m } from "../Text/Text.js";
3
- import { c as d } from "../../clsx-OuTLNxxd.js";
4
- import '../../assets/Pill.css';const t = "_pill_1dm0w_1", l = {
5
- pill: t,
6
- "pill-xs": "_pill-xs_1dm0w_17",
7
- "pill-sm": "_pill-sm_1dm0w_25",
8
- "pill-md": "_pill-md_1dm0w_33",
9
- "pill-color-neutral": "_pill-color-neutral_1dm0w_41",
10
- "pill-color-secondary": "_pill-color-secondary_1dm0w_49",
11
- "pill-color-caution-tips": "_pill-color-caution-tips_1dm0w_57",
12
- "pill-color-warning": "_pill-color-warning_1dm0w_65",
13
- "pill-color-success": "_pill-color-success_1dm0w_73",
14
- "pill-color-error-warning": "_pill-color-error-warning_1dm0w_81"
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { Text as u } from "../Text/Text.js";
3
+ import { c as _ } from "../../clsx-OuTLNxxd.js";
4
+ import '../../assets/Pill.css';const j = "_pill_i5js9_1", m = "_noBorder_i5js9_137", b = "_uppercase_i5js9_145", r = {
5
+ pill: j,
6
+ "pill-xs": "_pill-xs_i5js9_17",
7
+ "pill-sm": "_pill-sm_i5js9_25",
8
+ "pill-md": "_pill-md_i5js9_33",
9
+ "pill-color-neutral": "_pill-color-neutral_i5js9_41",
10
+ "pill-color-secondary": "_pill-color-secondary_i5js9_49",
11
+ "pill-color-caution-tips": "_pill-color-caution-tips_i5js9_57",
12
+ "pill-color-warning": "_pill-color-warning_i5js9_65",
13
+ "pill-color-success": "_pill-color-success_i5js9_73",
14
+ "pill-color-error-warning": "_pill-color-error-warning_i5js9_81",
15
+ "pill-border-neutral": "_pill-border-neutral_i5js9_89",
16
+ "pill-border-secondary": "_pill-border-secondary_i5js9_97",
17
+ "pill-border-caution-tips": "_pill-border-caution-tips_i5js9_105",
18
+ "pill-border-warning": "_pill-border-warning_i5js9_113",
19
+ "pill-border-success": "_pill-border-success_i5js9_121",
20
+ "pill-border-error-warning": "_pill-border-error-warning_i5js9_129",
21
+ noBorder: m,
22
+ uppercase: b
15
23
  };
16
- function u({
17
- colorToken: p = "neutral",
18
- textColorToken: _,
19
- customColor: o,
20
- size: r,
21
- className: c,
22
- children: n,
23
- ...s
24
+ function y({
25
+ colorToken: l = "success",
26
+ textColorToken: e,
27
+ customColor: s,
28
+ weight: c = "medium",
29
+ uppercase: n = !1,
30
+ hideBorder: o = !1,
31
+ size: i = "xs",
32
+ className: a,
33
+ children: d,
34
+ ...t
24
35
  }) {
25
- return /* @__PURE__ */ i(
36
+ return /* @__PURE__ */ p(
26
37
  "span",
27
38
  {
28
- className: d(
29
- l.pill,
30
- l[`pill-color-${p}`],
31
- l[`pill-${r}`],
32
- c
39
+ className: _(
40
+ r.pill,
41
+ r[`pill-color-${l}`],
42
+ r[`pill-${i}`],
43
+ !o && r[`pill-border-${l}`],
44
+ o && r.noBorder,
45
+ a
33
46
  ),
34
- style: o ? { background: o } : void 0,
35
- ...s,
36
- children: /* @__PURE__ */ i(m, { size: r, colorToken: _, children: n })
47
+ style: s ? { background: s } : void 0,
48
+ ...t,
49
+ children: /* @__PURE__ */ p(
50
+ u,
51
+ {
52
+ size: i === "xs" ? "xxs" : i === "sm" ? "xs" : "sm",
53
+ weight: c,
54
+ colorToken: e ?? (l === "neutral" ? "primary" : l === "secondary" ? "secondary" : l === "success" ? "success" : l === "error-warning" ? "error-warning" : "warning"),
55
+ className: _(n && r.uppercase),
56
+ children: d
57
+ }
58
+ )
37
59
  }
38
60
  );
39
61
  }
40
62
  export {
41
- u as Pill
63
+ y as Pill
42
64
  };
@@ -15,3 +15,4 @@ export declare const Variants: StoryObj<typeof Pill>;
15
15
  export declare const Sizes: StoryObj<typeof Pill>;
16
16
  export declare const TextColors: StoryObj<typeof Pill>;
17
17
  export declare const CustomColor: StoryObj<typeof Pill>;
18
+ export declare const WithoutBorder: Story;
@@ -1,19 +1,18 @@
1
- import { jsx as s, jsxs as o } from "react/jsx-runtime";
2
- import { Pill as r } from "./Pill.js";
1
+ import { jsx as r, jsxs as o } from "react/jsx-runtime";
2
+ import { Pill as s } from "./Pill.js";
3
3
  const a = {
4
4
  title: "Case Parts/Atoms/Pill",
5
- component: r,
5
+ component: s,
6
6
  parameters: {
7
7
  layout: "centered"
8
8
  },
9
9
  tags: ["autodocs"]
10
10
  }, d = {
11
11
  args: {
12
- children: "New",
12
+ children: "Success",
13
13
  colorToken: "success",
14
- textColorToken: "default-inverted",
15
- customColor: "#166534",
16
- size: "md"
14
+ weight: "semibold",
15
+ uppercase: !0
17
16
  }
18
17
  }, n = [
19
18
  "neutral",
@@ -29,16 +28,16 @@ const a = {
29
28
  "success",
30
29
  "warning",
31
30
  "error-warning"
32
- ], m = {
33
- render: () => /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: n.map((e) => /* @__PURE__ */ s(r, { colorToken: e, size: "sm", children: e }, e)) })
34
- }, l = ["xs", "sm", "md"], p = {
35
- render: () => /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: l.map((e) => /* @__PURE__ */ o(r, { size: e, colorToken: "secondary", children: [
31
+ ], p = {
32
+ render: () => /* @__PURE__ */ r("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: n.map((e) => /* @__PURE__ */ r(s, { colorToken: e, children: e }, e)) })
33
+ }, c = ["xs", "sm", "md"], m = {
34
+ render: () => /* @__PURE__ */ r("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: c.map((e) => /* @__PURE__ */ o(s, { size: e, colorToken: "secondary", children: [
36
35
  e.toUpperCase(),
37
36
  " size"
38
37
  ] }, e)) })
39
38
  }, u = {
40
- render: () => /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: t.map((e) => /* @__PURE__ */ s(
41
- r,
39
+ render: () => /* @__PURE__ */ r("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: t.map((e) => /* @__PURE__ */ r(
40
+ s,
42
41
  {
43
42
  size: "sm",
44
43
  colorToken: "secondary",
@@ -48,13 +47,20 @@ const a = {
48
47
  e
49
48
  )) })
50
49
  }, x = {
51
- render: () => /* @__PURE__ */ s(r, { size: "sm", customColor: "#7c3aed", textColorToken: "default-inverted", children: "Custom purple" })
50
+ render: () => /* @__PURE__ */ r(s, { size: "sm", customColor: "#7c3aed", textColorToken: "default-inverted", children: "Custom purple" })
51
+ }, h = {
52
+ args: {
53
+ children: "No border",
54
+ colorToken: "secondary",
55
+ hideBorder: !0
56
+ }
52
57
  };
53
58
  export {
54
59
  d as AllProps,
55
60
  x as CustomColor,
56
- p as Sizes,
61
+ m as Sizes,
57
62
  u as TextColors,
58
- m as Variants,
63
+ p as Variants,
64
+ h as WithoutBorder,
59
65
  a as default
60
66
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.248",
4
+ "version": "0.0.249",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",