@sps-woodland/tags 8.50.2 → 8.51.1
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.d.ts +1 -3
- package/lib/index.js +29 -212
- package/lib/index.umd.cjs +14 -14
- package/lib/style.css +1 -1
- package/package.json +6 -8
- package/vite.config.mjs +6 -13
- package/lib/clickable-tag/ClickableTag.css.d.ts +0 -16
- package/lib/clickable-tag/ClickableTag.d.ts +0 -12
- package/lib/split-tag/SplitTag.css.d.ts +0 -66
- package/lib/split-tag/SplitTag.d.ts +0 -13
- package/lib/tag/Tag.css.d.ts +0 -23
- package/lib/tag/Tag.d.ts +0 -10
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,195 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
configurable: !0,
|
|
9
|
-
writable: !0
|
|
10
|
-
}) : a[o] = s, a;
|
|
11
|
-
}
|
|
12
|
-
function h(a, o) {
|
|
13
|
-
var s = Object.keys(a);
|
|
14
|
-
if (Object.getOwnPropertySymbols) {
|
|
15
|
-
var e = Object.getOwnPropertySymbols(a);
|
|
16
|
-
o && (e = e.filter(function(_) {
|
|
17
|
-
return Object.getOwnPropertyDescriptor(a, _).enumerable;
|
|
18
|
-
})), s.push.apply(s, e);
|
|
19
|
-
}
|
|
20
|
-
return s;
|
|
21
|
-
}
|
|
22
|
-
function k(a) {
|
|
23
|
-
for (var o = 1; o < arguments.length; o++) {
|
|
24
|
-
var s = arguments[o] != null ? arguments[o] : {};
|
|
25
|
-
o % 2 ? h(Object(s), !0).forEach(function(e) {
|
|
26
|
-
S(a, e, s[e]);
|
|
27
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(s)) : h(Object(s)).forEach(function(e) {
|
|
28
|
-
Object.defineProperty(a, e, Object.getOwnPropertyDescriptor(s, e));
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
return a;
|
|
32
|
-
}
|
|
33
|
-
var R = (a, o, s) => {
|
|
34
|
-
for (var e of Object.keys(a)) {
|
|
35
|
-
var _;
|
|
36
|
-
if (a[e] !== ((_ = o[e]) !== null && _ !== void 0 ? _ : s[e]))
|
|
37
|
-
return !1;
|
|
38
|
-
}
|
|
39
|
-
return !0;
|
|
40
|
-
}, c = (a) => (o) => {
|
|
41
|
-
var s = a.defaultClassName, e = k(k({}, a.defaultVariants), o);
|
|
42
|
-
for (var _ in e) {
|
|
43
|
-
var i, d = (i = e[_]) !== null && i !== void 0 ? i : a.defaultVariants[_];
|
|
44
|
-
if (d != null) {
|
|
45
|
-
var r = d;
|
|
46
|
-
typeof r == "boolean" && (r = r === !0 ? "true" : "false");
|
|
47
|
-
var n = (
|
|
48
|
-
// @ts-expect-error
|
|
49
|
-
a.variantClassNames[_][r]
|
|
50
|
-
);
|
|
51
|
-
n && (s += " " + n);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
for (var [g, u] of a.compoundVariants)
|
|
55
|
-
R(g, e, a.defaultVariants) && (s += " " + u);
|
|
56
|
-
return s;
|
|
57
|
-
}, O = c({ defaultClassName: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw10", variantClassNames: { kind: { blue: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw11", gray: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw12" }, disabled: { true: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw13", false: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw14" }, wrap: { true: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw15", false: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw16" } }, defaultVariants: { kind: "blue", disabled: !1, wrap: !1 }, compoundVariants: [] }), x = c({ defaultClassName: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw17", variantClassNames: { link: { true: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw18", false: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw19" }, wrap: { true: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw1a", false: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw1b" }, disabled: { true: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw1c", false: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw1d" }, addOrRemove: { true: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw1e", false: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw1f" } }, defaultVariants: { link: !1, wrap: !1, disabled: !1, addOrRemove: !1 }, compoundVariants: [[{ disabled: !1, wrap: !1, addOrRemove: !0 }, "pkg_sps-woodland_tags__version_8_50_2__hash_160drw1g"]] }), E = c({ defaultClassName: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw1h", variantClassNames: { wrap: { true: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw1i", false: "pkg_sps-woodland_tags__version_8_50_2__hash_160drw1j" } }, defaultVariants: { wrap: !1 }, compoundVariants: [] }), V = "pkg_sps-woodland_tags__version_8_50_2__hash_160drw1k", K = "pkg_sps-woodland_tags__version_8_50_2__hash_160drw1l";
|
|
58
|
-
function T({
|
|
59
|
-
children: a,
|
|
60
|
-
className: o,
|
|
61
|
-
onClick: s,
|
|
62
|
-
disabled: e,
|
|
63
|
-
wrap: _,
|
|
64
|
-
href: i,
|
|
65
|
-
target: d,
|
|
66
|
-
kind: r,
|
|
67
|
-
onAdd: n,
|
|
68
|
-
onRemove: g,
|
|
69
|
-
...u
|
|
70
|
-
}) {
|
|
71
|
-
const C = l.Children.toArray(a).filter((m) => typeof m == "string").join("");
|
|
72
|
-
l.useEffect(() => {
|
|
73
|
-
if (g && n)
|
|
74
|
-
throw new Error("Clickable tag should have onRemove or onAdd, not both");
|
|
75
|
-
}, [n, g]);
|
|
76
|
-
function y(m) {
|
|
77
|
-
n ? n() : g && g(), m.stopPropagation();
|
|
78
|
-
}
|
|
79
|
-
function N(m) {
|
|
80
|
-
m.stopPropagation(), s && s(m);
|
|
81
|
-
}
|
|
82
|
-
return /* @__PURE__ */ l.createElement("div", { className: p(O({ kind: r, disabled: e, wrap: _ }), o), ...u }, /* @__PURE__ */ l.createElement(
|
|
83
|
-
"span",
|
|
84
|
-
{
|
|
85
|
-
className: p(
|
|
86
|
-
x({
|
|
87
|
-
link: !!i || !!s,
|
|
88
|
-
disabled: e,
|
|
89
|
-
wrap: _,
|
|
90
|
-
addOrRemove: n || g
|
|
91
|
-
})
|
|
92
|
-
),
|
|
93
|
-
onClick: N,
|
|
94
|
-
title: C
|
|
95
|
-
},
|
|
96
|
-
i ? /* @__PURE__ */ l.createElement("a", { className: K, href: i, target: d }, a) : a
|
|
97
|
-
), (n || g) && !e && /* @__PURE__ */ l.createElement(
|
|
98
|
-
"div",
|
|
99
|
-
{
|
|
100
|
-
className: p(
|
|
101
|
-
E({
|
|
102
|
-
wrap: _
|
|
103
|
-
})
|
|
104
|
-
),
|
|
105
|
-
onClick: y,
|
|
106
|
-
tabIndex: -1,
|
|
107
|
-
"aria-label": n ? "Add" : "Remove"
|
|
108
|
-
},
|
|
109
|
-
/* @__PURE__ */ l.createElement(b, { className: V, "aria-hidden": "true", icon: n ? "plus-sign" : "x" })
|
|
110
|
-
));
|
|
111
|
-
}
|
|
112
|
-
w.set(T, {
|
|
113
|
-
name: "Clickable Tag",
|
|
114
|
-
props: {
|
|
115
|
-
disabled: { type: "boolean", default: "false" },
|
|
116
|
-
wrap: { type: "boolean", default: "false" },
|
|
117
|
-
href: { type: "string" },
|
|
118
|
-
target: { type: "'_blank' | '_self' | '_parent' | '_top'" },
|
|
119
|
-
kind: { type: "ClickableTagKind", default: "blue" },
|
|
120
|
-
onAdd: { type: "() => void" },
|
|
121
|
-
onRemove: { type: "() => void" }
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
var I = c({ defaultClassName: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efi0", variantClassNames: { kind: { default: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efi1", key: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efi2", warning: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efi3", error: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efi4", pending: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efi5", success: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efi6", info: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efi7" }, wrap: { true: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efi8", false: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efi9" } }, defaultVariants: { kind: "default", wrap: !1 }, compoundVariants: [] }), F = c({ defaultClassName: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efia", variantClassNames: { kind: { default: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efib", key: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efic", warning: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efid", error: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efie", pending: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efif", success: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efig", info: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efih", custom: "pkg_sps-woodland_tags__version_8_50_2__hash_5f3efii" } }, defaultVariants: { kind: "default" }, compoundVariants: [] });
|
|
125
|
-
const P = Object.freeze({
|
|
126
|
-
default: "info-circle",
|
|
127
|
-
key: "info-circle",
|
|
128
|
-
warning: "status-warning",
|
|
129
|
-
error: "status-error",
|
|
130
|
-
pending: "status-in-process",
|
|
131
|
-
success: "status-ok",
|
|
132
|
-
info: "info-circle"
|
|
133
|
-
});
|
|
134
|
-
function f({
|
|
135
|
-
children: a,
|
|
136
|
-
className: o,
|
|
137
|
-
kind: s = "default",
|
|
138
|
-
icon: e,
|
|
139
|
-
wrap: _,
|
|
140
|
-
...i
|
|
141
|
-
}) {
|
|
142
|
-
const d = typeof e == "string", r = e && d ? e : e ? P[s] : void 0;
|
|
143
|
-
return /* @__PURE__ */ l.createElement("span", { className: p(I({ kind: s, wrap: _ }), o), ...i }, r && /* @__PURE__ */ l.createElement(
|
|
144
|
-
b,
|
|
145
|
-
{
|
|
146
|
-
className: p(F({ kind: d ? "custom" : s })),
|
|
147
|
-
icon: r
|
|
148
|
-
}
|
|
149
|
-
), a);
|
|
150
|
-
}
|
|
151
|
-
w.set(f, {
|
|
152
|
-
name: "Tag",
|
|
153
|
-
props: {
|
|
154
|
-
kind: { type: "TagKind", default: "default" },
|
|
155
|
-
icon: { type: "boolean | IconName", default: "false" },
|
|
156
|
-
wrap: { type: "boolean", default: "false" }
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
var j = c({ defaultClassName: "pkg_sps-woodland_tags__version_8_50_2__hash_79ofse0", variantClassNames: { wrap: { true: "pkg_sps-woodland_tags__version_8_50_2__hash_79ofse1", false: "pkg_sps-woodland_tags__version_8_50_2__hash_79ofse2" } }, defaultVariants: { wrap: !1 }, compoundVariants: [] }), L = "pkg_sps-woodland_tags__version_8_50_2__hash_79ofse3", W = "pkg_sps-woodland_tags__version_8_50_2__hash_79ofse4", D = c({ defaultClassName: "pkg_sps-woodland_tags__version_8_50_2__hash_79ofse5", variantClassNames: { href: { true: "pkg_sps-woodland_tags__version_8_50_2__hash_79ofse6", false: "pkg_sps-woodland_tags__version_8_50_2__hash_79ofse7" }, kind: { default: "pkg_sps-woodland_tags__version_8_50_2__hash_79ofse8", key: "pkg_sps-woodland_tags__version_8_50_2__hash_79ofse9", warning: "pkg_sps-woodland_tags__version_8_50_2__hash_79ofsea", error: "pkg_sps-woodland_tags__version_8_50_2__hash_79ofseb", pending: "pkg_sps-woodland_tags__version_8_50_2__hash_79ofsec", success: "pkg_sps-woodland_tags__version_8_50_2__hash_79ofsed", info: "pkg_sps-woodland_tags__version_8_50_2__hash_79ofsee" } }, defaultVariants: { href: !1, kind: "default" }, compoundVariants: [] }), M = "pkg_sps-woodland_tags__version_8_50_2__hash_79ofsef";
|
|
160
|
-
function v({
|
|
161
|
-
children: a,
|
|
162
|
-
className: o,
|
|
163
|
-
color: s = "default",
|
|
164
|
-
href: e,
|
|
165
|
-
target: _,
|
|
166
|
-
icon: i,
|
|
167
|
-
tagKey: d,
|
|
168
|
-
value: r,
|
|
169
|
-
wrap: n = !1,
|
|
170
|
-
...g
|
|
171
|
-
}) {
|
|
172
|
-
return /* @__PURE__ */ l.createElement("span", { className: p(j({ wrap: n }), o), ...g }, /* @__PURE__ */ l.createElement(f, { className: p(L), icon: i, kind: s, wrap: n }, d && /* @__PURE__ */ l.createElement("span", { className: p(W) }, d)), /* @__PURE__ */ l.createElement(f, { className: p(D({ href: !!e, kind: s })), wrap: n }, e ? /* @__PURE__ */ l.createElement("a", { className: M, href: e, target: _ }, r) : r));
|
|
173
|
-
}
|
|
174
|
-
w.set(v, {
|
|
175
|
-
name: "Split Tag",
|
|
176
|
-
props: {
|
|
177
|
-
color: { type: "TagKind", default: "key" },
|
|
178
|
-
href: { type: "string" },
|
|
179
|
-
target: { type: "'_blank' | '_self' | '_parent' | '_top'" },
|
|
180
|
-
icon: { type: "boolean | IconName", default: "false" },
|
|
181
|
-
tagKey: { type: "string", required: !0 },
|
|
182
|
-
value: { type: "string", required: !0 }
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
const B = {
|
|
186
|
-
components: [T],
|
|
1
|
+
export * from "@sps-woodland/core/tags";
|
|
2
|
+
import { code as a } from "@spscommerce/utils";
|
|
3
|
+
import { ClickableTag as o } from "@sps-woodland/core/clickable-tag";
|
|
4
|
+
import { Tag as e } from "@sps-woodland/core/tag";
|
|
5
|
+
import { SplitTag as l } from "@sps-woodland/core/split-tag";
|
|
6
|
+
const n = {
|
|
7
|
+
components: [o],
|
|
187
8
|
examples: {
|
|
188
9
|
basic: {
|
|
189
10
|
label: "Basic Tag",
|
|
190
11
|
examples: {
|
|
191
12
|
basic: {
|
|
192
|
-
react:
|
|
13
|
+
react: a`
|
|
193
14
|
import { ClickableTag } from "@sps-woodland/tags";
|
|
194
15
|
|
|
195
16
|
function Component() {
|
|
@@ -203,7 +24,7 @@ const B = {
|
|
|
203
24
|
`
|
|
204
25
|
},
|
|
205
26
|
disabled: {
|
|
206
|
-
react:
|
|
27
|
+
react: a`
|
|
207
28
|
import { ClickableTag } from "@sps-woodland/tags";
|
|
208
29
|
|
|
209
30
|
function Component() {
|
|
@@ -221,7 +42,7 @@ const B = {
|
|
|
221
42
|
label: "Wrapped Tag",
|
|
222
43
|
examples: {
|
|
223
44
|
basic: {
|
|
224
|
-
react:
|
|
45
|
+
react: a`
|
|
225
46
|
import { ContentRow, ContentRowCol } from "@sps-woodland/content-row";
|
|
226
47
|
import { Icon } from "@sps-woodland/core";
|
|
227
48
|
|
|
@@ -261,7 +82,7 @@ const B = {
|
|
|
261
82
|
label: "Button",
|
|
262
83
|
examples: {
|
|
263
84
|
remove: {
|
|
264
|
-
react:
|
|
85
|
+
react: a`
|
|
265
86
|
import { ClickableTag } from "@sps-woodland/tags";
|
|
266
87
|
|
|
267
88
|
function Component() {
|
|
@@ -275,7 +96,7 @@ const B = {
|
|
|
275
96
|
`
|
|
276
97
|
},
|
|
277
98
|
add: {
|
|
278
|
-
react:
|
|
99
|
+
react: a`
|
|
279
100
|
import { ClickableTag } from "@sps-woodland/tags";
|
|
280
101
|
|
|
281
102
|
function Component() {
|
|
@@ -294,7 +115,7 @@ const B = {
|
|
|
294
115
|
label: "Link",
|
|
295
116
|
examples: {
|
|
296
117
|
basic: {
|
|
297
|
-
react:
|
|
118
|
+
react: a`
|
|
298
119
|
import { ClickableTag } from "@sps-woodland/tags";
|
|
299
120
|
|
|
300
121
|
function Component() {
|
|
@@ -308,7 +129,7 @@ const B = {
|
|
|
308
129
|
`
|
|
309
130
|
},
|
|
310
131
|
button: {
|
|
311
|
-
react:
|
|
132
|
+
react: a`
|
|
312
133
|
import { ClickableTag } from "@sps-woodland/tags";
|
|
313
134
|
|
|
314
135
|
function Component() {
|
|
@@ -324,14 +145,14 @@ const B = {
|
|
|
324
145
|
}
|
|
325
146
|
}
|
|
326
147
|
}
|
|
327
|
-
},
|
|
328
|
-
components: [
|
|
148
|
+
}, s = {
|
|
149
|
+
components: [e],
|
|
329
150
|
examples: {
|
|
330
151
|
basic: {
|
|
331
152
|
label: "Basic Tag",
|
|
332
153
|
examples: {
|
|
333
154
|
basic: {
|
|
334
|
-
react:
|
|
155
|
+
react: a`
|
|
335
156
|
import { Tag } from "@sps-woodland/tags";
|
|
336
157
|
|
|
337
158
|
function Component() {
|
|
@@ -355,7 +176,7 @@ const B = {
|
|
|
355
176
|
label: "Wrapped Tag",
|
|
356
177
|
examples: {
|
|
357
178
|
basic: {
|
|
358
|
-
react:
|
|
179
|
+
react: a`
|
|
359
180
|
import { Tag } from "@sps-woodland/tags";
|
|
360
181
|
import { ContentRow, ContentRowCol } from "@sps-woodland/content-row";
|
|
361
182
|
function Component() {
|
|
@@ -379,7 +200,7 @@ const B = {
|
|
|
379
200
|
label: "Tag with icon",
|
|
380
201
|
examples: {
|
|
381
202
|
basic: {
|
|
382
|
-
react:
|
|
203
|
+
react: a`
|
|
383
204
|
import { Tag } from "@sps-woodland/tags";
|
|
384
205
|
|
|
385
206
|
function Component() {
|
|
@@ -401,14 +222,14 @@ const B = {
|
|
|
401
222
|
}
|
|
402
223
|
}
|
|
403
224
|
}
|
|
404
|
-
},
|
|
405
|
-
components: [
|
|
225
|
+
}, t = {
|
|
226
|
+
components: [l],
|
|
406
227
|
examples: {
|
|
407
228
|
basic: {
|
|
408
229
|
label: "Basic",
|
|
409
230
|
examples: {
|
|
410
231
|
basic: {
|
|
411
|
-
react:
|
|
232
|
+
react: a`
|
|
412
233
|
import { SplitTag } from "@sps-woodland/tag";
|
|
413
234
|
|
|
414
235
|
function Component() {
|
|
@@ -431,7 +252,7 @@ const B = {
|
|
|
431
252
|
label: "Icon",
|
|
432
253
|
examples: {
|
|
433
254
|
basic: {
|
|
434
|
-
react:
|
|
255
|
+
react: a`
|
|
435
256
|
import { SplitTag } from "@sps-woodland/tag";
|
|
436
257
|
|
|
437
258
|
function Component() {
|
|
@@ -455,7 +276,7 @@ const B = {
|
|
|
455
276
|
label: "Link",
|
|
456
277
|
examples: {
|
|
457
278
|
basic: {
|
|
458
|
-
react:
|
|
279
|
+
react: a`
|
|
459
280
|
import { SplitTag } from "@sps-woodland/tag";
|
|
460
281
|
|
|
461
282
|
function Component() {
|
|
@@ -468,15 +289,11 @@ const B = {
|
|
|
468
289
|
}
|
|
469
290
|
}
|
|
470
291
|
}
|
|
471
|
-
},
|
|
472
|
-
"Clickable Tags":
|
|
473
|
-
Tags:
|
|
474
|
-
"Split Tags":
|
|
292
|
+
}, g = {
|
|
293
|
+
"Clickable Tags": n,
|
|
294
|
+
Tags: s,
|
|
295
|
+
"Split Tags": t
|
|
475
296
|
};
|
|
476
297
|
export {
|
|
477
|
-
|
|
478
|
-
G as MANIFEST,
|
|
479
|
-
v as SplitTag,
|
|
480
|
-
f as Tag,
|
|
481
|
-
P as TagIcons
|
|
298
|
+
g as MANIFEST
|
|
482
299
|
};
|
package/lib/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("@sps-woodland/core/tags"),require("@spscommerce/utils"),require("@sps-woodland/core/clickable-tag"),require("@sps-woodland/core/tag"),require("@sps-woodland/core/split-tag")):typeof define=="function"&&define.amd?define(["exports","@sps-woodland/core/tags","@spscommerce/utils","@sps-woodland/core/clickable-tag","@sps-woodland/core/tag","@sps-woodland/core/split-tag"],o):(e=typeof globalThis<"u"?globalThis:e||self,o(e.Tags={},e.tags,e.utils,e.clickableTag,e.tag,e.splitTag))})(this,(function(e,o,a,n,s,c){"use strict";const t={components:[n.ClickableTag],examples:{basic:{label:"Basic Tag",examples:{basic:{react:a.code`
|
|
2
2
|
import { ClickableTag } from "@sps-woodland/tags";
|
|
3
3
|
|
|
4
4
|
function Component() {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</>
|
|
10
10
|
);
|
|
11
11
|
}
|
|
12
|
-
`},disabled:{react:
|
|
12
|
+
`},disabled:{react:a.code`
|
|
13
13
|
import { ClickableTag } from "@sps-woodland/tags";
|
|
14
14
|
|
|
15
15
|
function Component() {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
</>
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
|
-
`}}},wrap:{label:"Wrapped Tag",examples:{basic:{react:
|
|
22
|
+
`}}},wrap:{label:"Wrapped Tag",examples:{basic:{react:a.code`
|
|
23
23
|
import { ContentRow, ContentRowCol } from "@sps-woodland/content-row";
|
|
24
24
|
import { Icon } from "@sps-woodland/core";
|
|
25
25
|
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
</ContentRow>
|
|
52
52
|
)
|
|
53
53
|
}
|
|
54
|
-
`}}},button:{label:"Button",examples:{remove:{react:
|
|
54
|
+
`}}},button:{label:"Button",examples:{remove:{react:a.code`
|
|
55
55
|
import { ClickableTag } from "@sps-woodland/tags";
|
|
56
56
|
|
|
57
57
|
function Component() {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
</>
|
|
63
63
|
);
|
|
64
64
|
}
|
|
65
|
-
`},add:{react:
|
|
65
|
+
`},add:{react:a.code`
|
|
66
66
|
import { ClickableTag } from "@sps-woodland/tags";
|
|
67
67
|
|
|
68
68
|
function Component() {
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
</>
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
|
-
`}}},link:{label:"Link",examples:{basic:{react:
|
|
76
|
+
`}}},link:{label:"Link",examples:{basic:{react:a.code`
|
|
77
77
|
import { ClickableTag } from "@sps-woodland/tags";
|
|
78
78
|
|
|
79
79
|
function Component() {
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
</>
|
|
85
85
|
);
|
|
86
86
|
}
|
|
87
|
-
`},button:{react:
|
|
87
|
+
`},button:{react:a.code`
|
|
88
88
|
import { ClickableTag } from "@sps-woodland/tags";
|
|
89
89
|
|
|
90
90
|
function Component() {
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
</>
|
|
96
96
|
);
|
|
97
97
|
}
|
|
98
|
-
`}}}}},
|
|
98
|
+
`}}}}},r={components:[s.Tag],examples:{basic:{label:"Basic Tag",examples:{basic:{react:a.code`
|
|
99
99
|
import { Tag } from "@sps-woodland/tags";
|
|
100
100
|
|
|
101
101
|
function Component() {
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
</>
|
|
112
112
|
)
|
|
113
113
|
}
|
|
114
|
-
`}}},wrap:{label:"Wrapped Tag",examples:{basic:{react:
|
|
114
|
+
`}}},wrap:{label:"Wrapped Tag",examples:{basic:{react:a.code`
|
|
115
115
|
import { Tag } from "@sps-woodland/tags";
|
|
116
116
|
import { ContentRow, ContentRowCol } from "@sps-woodland/content-row";
|
|
117
117
|
function Component() {
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
</ContentRow>
|
|
128
128
|
)
|
|
129
129
|
}
|
|
130
|
-
`}}},withIcon:{label:"Tag with icon",examples:{basic:{react:
|
|
130
|
+
`}}},withIcon:{label:"Tag with icon",examples:{basic:{react:a.code`
|
|
131
131
|
import { Tag } from "@sps-woodland/tags";
|
|
132
132
|
|
|
133
133
|
function Component() {
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
</>
|
|
145
145
|
)
|
|
146
146
|
}
|
|
147
|
-
`}}}}},
|
|
147
|
+
`}}}}},i={components:[c.SplitTag],examples:{basic:{label:"Basic",examples:{basic:{react:a.code`
|
|
148
148
|
import { SplitTag } from "@sps-woodland/tag";
|
|
149
149
|
|
|
150
150
|
function Component() {
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
</>
|
|
160
160
|
);
|
|
161
161
|
}
|
|
162
|
-
`}}},icon:{label:"Icon",examples:{basic:{react:
|
|
162
|
+
`}}},icon:{label:"Icon",examples:{basic:{react:a.code`
|
|
163
163
|
import { SplitTag } from "@sps-woodland/tag";
|
|
164
164
|
|
|
165
165
|
function Component() {
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
</>
|
|
176
176
|
);
|
|
177
177
|
}
|
|
178
|
-
`}}},link:{label:"Link",examples:{basic:{react:
|
|
178
|
+
`}}},link:{label:"Link",examples:{basic:{react:a.code`
|
|
179
179
|
import { SplitTag } from "@sps-woodland/tag";
|
|
180
180
|
|
|
181
181
|
function Component() {
|
|
@@ -183,4 +183,4 @@
|
|
|
183
183
|
<SplitTag tagKey="Foo" value="1234" icon href="https://www.google.com" />
|
|
184
184
|
);
|
|
185
185
|
}
|
|
186
|
-
`}}}}},
|
|
186
|
+
`}}}}},m={"Clickable Tags":t,Tags:r,"Split Tags":i};e.MANIFEST=m,Object.keys(o).forEach(l=>{l!=="default"&&!Object.prototype.hasOwnProperty.call(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:()=>o[l]})}),Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
|
package/lib/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.pkg_sps-
|
|
1
|
+
.pkg_sps-woodland_core__version_8_51_1__hash_k59j2r0{border-radius:.125rem;display:inline-block;font-size:.75rem;font-weight:600;line-height:.75rem;overflow:hidden;padding:.125rem .25rem;text-align:left;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap}.pkg_sps-woodland_core__version_8_51_1__hash_k59j2r1{background:#e9e9ea;color:#4b5356}.pkg_sps-woodland_core__version_8_51_1__hash_k59j2r2{background:#4b5356;color:#fff}.pkg_sps-woodland_core__version_8_51_1__hash_k59j2r3{background:#e7760b;color:#fff}.pkg_sps-woodland_core__version_8_51_1__hash_k59j2r4{background:#de002e;color:#fff}.pkg_sps-woodland_core__version_8_51_1__hash_k59j2r5{background:#91467f;color:#fff}.pkg_sps-woodland_core__version_8_51_1__hash_k59j2r6{background:#0b8940;color:#fff}.pkg_sps-woodland_core__version_8_51_1__hash_k59j2r7{background:#007db8;color:#fff}.pkg_sps-woodland_core__version_8_51_1__hash_k59j2r8{display:inline-flex;align-items:start;flex-wrap:nowrap;white-space:normal;height:auto;line-height:.875rem;word-break:break-word;text-overflow:clip}.pkg_sps-woodland_core__version_8_51_1__hash_k59j2ra{height:1em;font-size:.75rem;line-height:.625rem;margin-right:.25rem}.pkg_sps-woodland_core__version_8_51_1__hash_k59j2ra:before{vertical-align:text-bottom}.pkg_sps-woodland_core__version_8_51_1__hash_k59j2rb{display:none}.pkg_sps-woodland_core__version_8_51_1__hash_1avalu50{border-radius:.125rem;display:inline-flex;color:#09638d;font-size:.75rem;font-weight:600;height:1.125rem;line-height:.75rem;max-width:100%}.pkg_sps-woodland_core__version_8_51_1__hash_1avalu51{background-color:#e6f2f8}.pkg_sps-woodland_core__version_8_51_1__hash_1avalu52{background-color:#e9e9ea}.pkg_sps-woodland_core__version_8_51_1__hash_1avalu53{background-color:#fff;border-width:.0625rem;border-style:solid;border-color:#d2d4d4;color:#717779;cursor:not-allowed}.pkg_sps-woodland_core__version_8_51_1__hash_1avalu55{height:auto}.pkg_sps-woodland_core__version_8_51_1__hash_1avalu57{border-radius:.125rem;flex-grow:1;flex-shrink:1;height:1.125rem;overflow:hidden;padding:.125rem .25rem;text-overflow:ellipsis;white-space:nowrap}.pkg_sps-woodland_core__version_8_51_1__hash_1avalu58{cursor:pointer;text-decoration:underline}.pkg_sps-woodland_core__version_8_51_1__hash_1avalu58:hover{color:#e6f2f8;background-color:#09638d;border-radius:.125rem}.pkg_sps-woodland_core__version_8_51_1__hash_1avalu5a{white-space:normal;height:auto;line-height:.875rem;word-break:break-word}.pkg_sps-woodland_core__version_8_51_1__hash_1avalu5g{border-top-left-radius:.125rem;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:.125rem}.pkg_sps-woodland_core__version_8_51_1__hash_1avalu5h{border-top-left-radius:0;border-top-right-radius:.125rem;border-bottom-right-radius:.125rem;border-bottom-left-radius:0;color:#09638d;height:1.125rem;line-height:.75rem;padding:.125rem .25rem}.pkg_sps-woodland_core__version_8_51_1__hash_1avalu5h:focus,.pkg_sps-woodland_core__version_8_51_1__hash_1avalu5h:hover{background-color:#09638d;color:#e6f2f8;cursor:pointer}.pkg_sps-woodland_core__version_8_51_1__hash_1avalu5i{height:auto;align-content:center}.pkg_sps-woodland_core__version_8_51_1__hash_1avalu5k{cursor:pointer;font-size:.625rem;position:relative;text-decoration:none;top:-.0625rem;vertical-align:middle}span>.pkg_sps-woodland_core__version_8_51_1__hash_1avalu5l{color:#09638d}span:hover>.pkg_sps-woodland_core__version_8_51_1__hash_1avalu5l{color:#e6f2f8}.pkg_sps-woodland_core__version_8_51_1__hash_16xtnrf0{display:inline-block}.pkg_sps-woodland_core__version_8_51_1__hash_16xtnrf1{display:inline-flex}.pkg_sps-woodland_core__version_8_51_1__hash_16xtnrf3{border-top-left-radius:.125rem;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:.125rem}.pkg_sps-woodland_core__version_8_51_1__hash_16xtnrf5{background:#fff;border-top-left-radius:0;border-top-right-radius:.125rem;border-bottom-right-radius:.125rem;border-bottom-left-radius:0;padding:.125rem .25rem;box-shadow:.0625rem 0 #e9e9ea inset,-.0625rem 0 #e9e9ea inset,0 .0625rem #e9e9ea inset,0 -.0625rem #e9e9ea inset}.pkg_sps-woodland_core__version_8_51_1__hash_16xtnrf6{cursor:pointer;text-decoration:underline;color:#4b5356}.pkg_sps-woodland_core__version_8_51_1__hash_16xtnrf9{box-shadow:.0625rem 0 #4b5356 inset,-.0625rem 0 #4b5356 inset,0 .0625rem #4b5356 inset,0 -.0625rem #4b5356 inset}.pkg_sps-woodland_core__version_8_51_1__hash_16xtnrfa{box-shadow:.0625rem 0 #e7760b inset,-.0625rem 0 #e7760b inset,0 .0625rem #e7760b inset,0 -.0625rem #e7760b inset}.pkg_sps-woodland_core__version_8_51_1__hash_16xtnrfb{box-shadow:.0625rem 0 #de002e inset,-.0625rem 0 #de002e inset,0 .0625rem #de002e inset,0 -.0625rem #de002e inset}.pkg_sps-woodland_core__version_8_51_1__hash_16xtnrfc{box-shadow:.0625rem 0 #91467f inset,-.0625rem 0 #91467f inset,0 .0625rem #91467f inset,0 -.0625rem #91467f inset}.pkg_sps-woodland_core__version_8_51_1__hash_16xtnrfd{box-shadow:.0625rem 0 #0b8940 inset,-.0625rem 0 #0b8940 inset,0 .0625rem #0b8940 inset,0 -.0625rem #0b8940 inset}.pkg_sps-woodland_core__version_8_51_1__hash_16xtnrfe{box-shadow:.0625rem 0 #007db8 inset,-.0625rem 0 #007db8 inset,0 .0625rem #007db8 inset,0 -.0625rem #007db8 inset}.pkg_sps-woodland_core__version_8_51_1__hash_16xtnrff,.pkg_sps-woodland_core__version_8_51_1__hash_16xtnrff:hover{color:#4b5356}.pkg_sps-woodland_core__version_8_51_1__hash_16xtnrf3>i{margin-right:0}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sps-woodland/tags",
|
|
3
3
|
"description": "SPS Woodland Design System tag components",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.51.1",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/cards",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"import": "./lib/index.js",
|
|
18
18
|
"default": "./lib/index.js"
|
|
19
19
|
},
|
|
20
|
+
"./style.css": "./lib/style.css",
|
|
20
21
|
"./lib/style.css": {
|
|
21
22
|
"import": "./lib/style.css",
|
|
22
23
|
"require": "./lib/style.css"
|
|
@@ -29,22 +30,19 @@
|
|
|
29
30
|
"@spscommerce/utils": "^7.0.0 || ^8.0.0 || ^9.0.0",
|
|
30
31
|
"react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
31
32
|
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
32
|
-
"@sps-woodland/core": "8.
|
|
33
|
-
"@sps-woodland/tokens": "8.50.2"
|
|
33
|
+
"@sps-woodland/core": "8.51.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@spscommerce/utils": "9.0.3",
|
|
37
|
-
"@vanilla-extract/css": "1.17.4",
|
|
38
|
-
"@vanilla-extract/recipes": "0.2.5",
|
|
39
37
|
"react": "16.14.0",
|
|
40
38
|
"react-dom": "16.14.0",
|
|
41
|
-
"@sps-woodland/core": "8.
|
|
42
|
-
"@sps-woodland/tokens": "8.50.2"
|
|
39
|
+
"@sps-woodland/core": "8.51.1"
|
|
43
40
|
},
|
|
44
41
|
"scripts": {
|
|
45
|
-
"build": "pnpm run build:js && pnpm run build:types",
|
|
42
|
+
"build": "pnpm run build:js && pnpm run build:types && pnpm run build:css",
|
|
46
43
|
"build:js": "vite build",
|
|
47
44
|
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir lib",
|
|
45
|
+
"build:css": "cp ../core/lib/tags/style.css lib/style.css 2>/dev/null || echo 'tags style.css not found, skipping'",
|
|
48
46
|
"watch": "vite build --watch",
|
|
49
47
|
"clean": "git clean -fdX",
|
|
50
48
|
"pub": "node ../../../scripts/publish-package.mjs"
|
package/vite.config.mjs
CHANGED
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
|
|
3
2
|
import { defineConfig } from "vite";
|
|
4
|
-
import { getVanillaExtractPluginProps } from "../../../scripts/vanilla-extract-plugin-props.mjs";
|
|
5
3
|
import pkg from "./package.json";
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
// Tags is now a wrapper package that re-exports from @sps-woodland/core.
|
|
6
|
+
// No vanilla-extract needed - CSS is provided by the mono-package.
|
|
7
|
+
|
|
8
|
+
const peerDeps = pkg.peerDependencies ? Object.keys(pkg.peerDependencies) : [];
|
|
8
9
|
|
|
9
10
|
export default defineConfig({
|
|
10
|
-
plugins: [
|
|
11
|
-
vanillaExtractPlugin(
|
|
12
|
-
getVanillaExtractPluginProps({
|
|
13
|
-
packageName: pkg.name,
|
|
14
|
-
packageVersion,
|
|
15
|
-
})
|
|
16
|
-
),
|
|
17
|
-
],
|
|
18
11
|
build: {
|
|
19
12
|
lib: {
|
|
20
13
|
entry: path.resolve(__dirname, "src/index.ts"),
|
|
21
14
|
name: "Tags",
|
|
22
15
|
fileName: "index",
|
|
23
|
-
cssFileName: "style",
|
|
24
16
|
},
|
|
25
17
|
outDir: path.resolve(__dirname, "./lib"),
|
|
26
18
|
emptyOutDir: false,
|
|
27
19
|
rollupOptions: {
|
|
28
|
-
|
|
20
|
+
// External must match subpath imports like @sps-woodland/core/tag
|
|
21
|
+
external: (id) => !id.endsWith(".css") && peerDeps.some((dep) => id === dep || id.startsWith(dep + "/")),
|
|
29
22
|
},
|
|
30
23
|
},
|
|
31
24
|
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Tokens } from "@sps-woodland/tokens";
|
|
2
|
-
import type { VariantDefinitions, RecipeVariant, BooleanRecipeVariant } from "@sps-woodland/core";
|
|
3
|
-
export type ClickableTagKind = keyof typeof Tokens.component["clickable-tag"]["kind"];
|
|
4
|
-
interface ClickableTagVariantDefinitions extends VariantDefinitions {
|
|
5
|
-
kind: RecipeVariant<ClickableTagKind>;
|
|
6
|
-
disabled: BooleanRecipeVariant;
|
|
7
|
-
wrap: BooleanRecipeVariant;
|
|
8
|
-
link: BooleanRecipeVariant;
|
|
9
|
-
addOrRemove: BooleanRecipeVariant;
|
|
10
|
-
}
|
|
11
|
-
export declare const clickableTag: import("@vanilla-extract/recipes/dist/declarations/src/types").RuntimeFn<Pick<ClickableTagVariantDefinitions, "kind" | "disabled" | "wrap">>;
|
|
12
|
-
export declare const clickableTagLabel: import("@vanilla-extract/recipes/dist/declarations/src/types").RuntimeFn<Omit<ClickableTagVariantDefinitions, "kind">>;
|
|
13
|
-
export declare const clickableTagIconWrapper: import("@vanilla-extract/recipes/dist/declarations/src/types").RuntimeFn<Pick<ClickableTagVariantDefinitions, "wrap">>;
|
|
14
|
-
export declare const clickableTagIcon: string;
|
|
15
|
-
export declare const clickableTagLink: string;
|
|
16
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ComponentProps } from "@sps-woodland/core";
|
|
3
|
-
import type { ClickableTagKind } from "./ClickableTag.css";
|
|
4
|
-
export declare function ClickableTag({ children, className, onClick, disabled, wrap, href, target, kind, onAdd, onRemove, ...rest }: ComponentProps<{
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
wrap?: boolean;
|
|
7
|
-
href?: string;
|
|
8
|
-
target?: "_blank" | "_self" | "_parent" | "_top";
|
|
9
|
-
kind?: ClickableTagKind;
|
|
10
|
-
onAdd?: () => void;
|
|
11
|
-
onRemove?: () => void;
|
|
12
|
-
}, HTMLDivElement>): React.ReactElement;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
export declare const splitTag: import("@vanilla-extract/recipes/dist/declarations/src/types").RuntimeFn<{
|
|
2
|
-
wrap: {
|
|
3
|
-
true: {
|
|
4
|
-
display: "inline-flex";
|
|
5
|
-
};
|
|
6
|
-
false: {};
|
|
7
|
-
};
|
|
8
|
-
}>;
|
|
9
|
-
export declare const splitTagKey: string;
|
|
10
|
-
export declare const splitTagKeyText: string;
|
|
11
|
-
export declare const splitTagValue: import("@vanilla-extract/recipes/dist/declarations/src/types").RuntimeFn<{
|
|
12
|
-
href: {
|
|
13
|
-
true: {
|
|
14
|
-
cursor: "pointer";
|
|
15
|
-
textDecoration: "underline";
|
|
16
|
-
color: string;
|
|
17
|
-
};
|
|
18
|
-
false: {};
|
|
19
|
-
};
|
|
20
|
-
kind: {
|
|
21
|
-
default: {};
|
|
22
|
-
key: {
|
|
23
|
-
boxShadow: `
|
|
24
|
-
${string} 0 0 ${string} inset,
|
|
25
|
-
-${string} 0 0 ${string} inset,
|
|
26
|
-
0 ${string} 0 ${string} inset,
|
|
27
|
-
0 -${string} 0 ${string} inset`;
|
|
28
|
-
};
|
|
29
|
-
warning: {
|
|
30
|
-
boxShadow: `
|
|
31
|
-
${string} 0 0 ${string} inset,
|
|
32
|
-
-${string} 0 0 ${string} inset,
|
|
33
|
-
0 ${string} 0 ${string} inset,
|
|
34
|
-
0 -${string} 0 ${string} inset`;
|
|
35
|
-
};
|
|
36
|
-
error: {
|
|
37
|
-
boxShadow: `
|
|
38
|
-
${string} 0 0 ${string} inset,
|
|
39
|
-
-${string} 0 0 ${string} inset,
|
|
40
|
-
0 ${string} 0 ${string} inset,
|
|
41
|
-
0 -${string} 0 ${string} inset`;
|
|
42
|
-
};
|
|
43
|
-
pending: {
|
|
44
|
-
boxShadow: `
|
|
45
|
-
${string} 0 0 ${string} inset,
|
|
46
|
-
-${string} 0 0 ${string} inset,
|
|
47
|
-
0 ${string} 0 ${string} inset,
|
|
48
|
-
0 -${string} 0 ${string} inset`;
|
|
49
|
-
};
|
|
50
|
-
success: {
|
|
51
|
-
boxShadow: `
|
|
52
|
-
${string} 0 0 ${string} inset,
|
|
53
|
-
-${string} 0 0 ${string} inset,
|
|
54
|
-
0 ${string} 0 ${string} inset,
|
|
55
|
-
0 -${string} 0 ${string} inset`;
|
|
56
|
-
};
|
|
57
|
-
info: {
|
|
58
|
-
boxShadow: `
|
|
59
|
-
${string} 0 0 ${string} inset,
|
|
60
|
-
-${string} 0 0 ${string} inset,
|
|
61
|
-
0 ${string} 0 ${string} inset,
|
|
62
|
-
0 -${string} 0 ${string} inset`;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
}>;
|
|
66
|
-
export declare const splitTagLink: string;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ComponentProps } from "@sps-woodland/core";
|
|
3
|
-
import type { IconName } from "@sps-woodland/tokens";
|
|
4
|
-
import type { TagKind } from "../tag/Tag.css";
|
|
5
|
-
export declare function SplitTag({ children, className, color, href, target, icon, tagKey, value, wrap, ...rest }: ComponentProps<{
|
|
6
|
-
color: TagKind;
|
|
7
|
-
href?: string;
|
|
8
|
-
target?: "_blank" | "_self" | "_parent" | "_top";
|
|
9
|
-
icon?: boolean | IconName;
|
|
10
|
-
tagKey: string;
|
|
11
|
-
value: string;
|
|
12
|
-
wrap?: boolean;
|
|
13
|
-
}, HTMLDivElement>): React.ReactElement;
|
package/lib/tag/Tag.css.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { BooleanRecipeVariant, RecipeVariant, VariantDefinitions } from "@sps-woodland/core";
|
|
2
|
-
import { Tokens } from "@sps-woodland/tokens";
|
|
3
|
-
export type TagKind = keyof typeof Tokens.component.tag;
|
|
4
|
-
interface TagVariantDefinitions extends VariantDefinitions {
|
|
5
|
-
kind: RecipeVariant<TagKind>;
|
|
6
|
-
wrap: BooleanRecipeVariant;
|
|
7
|
-
}
|
|
8
|
-
export declare const tag: import("@vanilla-extract/recipes/dist/declarations/src/types").RuntimeFn<TagVariantDefinitions>;
|
|
9
|
-
export declare const tagIcon: import("@vanilla-extract/recipes/dist/declarations/src/types").RuntimeFn<{
|
|
10
|
-
kind: {
|
|
11
|
-
default: {
|
|
12
|
-
display: "none";
|
|
13
|
-
};
|
|
14
|
-
key: {};
|
|
15
|
-
warning: {};
|
|
16
|
-
error: {};
|
|
17
|
-
pending: {};
|
|
18
|
-
success: {};
|
|
19
|
-
info: {};
|
|
20
|
-
custom: {};
|
|
21
|
-
};
|
|
22
|
-
}>;
|
|
23
|
-
export {};
|
package/lib/tag/Tag.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { ComponentProps } from "@sps-woodland/core";
|
|
3
|
-
import type { IconName } from "@sps-woodland/tokens";
|
|
4
|
-
import type { TagKind } from "./Tag.css";
|
|
5
|
-
export declare const TagIcons: Record<TagKind, IconName>;
|
|
6
|
-
export declare function Tag({ children, className, kind, icon, wrap, ...rest }: ComponentProps<{
|
|
7
|
-
kind?: TagKind;
|
|
8
|
-
icon?: boolean | IconName;
|
|
9
|
-
wrap?: boolean;
|
|
10
|
-
}, HTMLDivElement>): React.ReactElement;
|