@caseparts-org/caseblocks 0.0.250 → 0.0.252
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/Table-f_q_CCA-.js +187 -0
- package/dist/assets/Availability.css +1 -1
- package/dist/assets/Modal.css +1 -1
- package/dist/assets/Select.css +1 -1
- package/dist/assets/Table.css +1 -1
- package/dist/atoms/Pill/Pill.d.ts +3 -2
- package/dist/atoms/Pill/Pill.js +29 -26
- package/dist/atoms/Select/Select.js +53 -42
- package/dist/main-client.js +1 -1
- package/dist/molecules/Availability/Availability.d.ts +6 -0
- package/dist/molecules/Availability/Availability.js +109 -57
- package/dist/molecules/Availability/Availability.stories.d.ts +4 -0
- package/dist/molecules/Availability/Availability.stories.js +33 -17
- package/dist/molecules/CustomWizardBadge/CustomWizardBadge.d.ts +3 -2
- package/dist/molecules/CustomWizardBadge/CustomWizardBadge.js +23 -22
- package/dist/molecules/Disclaimer/Disclaimer.d.ts +11 -10
- package/dist/molecules/Disclaimer/Disclaimer.js +44 -41
- package/dist/molecules/Disclaimer/Disclaimer.stories.d.ts +5 -5
- package/dist/molecules/Error/Error.d.ts +4 -3
- package/dist/molecules/Error/Error.js +104 -101
- package/dist/molecules/Modal/Modal.d.ts +1 -0
- package/dist/molecules/Modal/Modal.js +56 -44
- package/dist/molecules/Modal/Modal.stories.d.ts +1 -1
- package/dist/molecules/Modal/Modal.stories.js +50 -52
- package/dist/molecules/Table/Table.d.ts +7 -4
- package/dist/molecules/Table/Table.js +4 -3
- package/dist/molecules/Table/Table.stories.js +1 -1
- package/package.json +1 -1
- package/dist/Table-BX4PtCNE.js +0 -178
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { jsx as a, jsxs as V } from "react/jsx-runtime";
|
|
2
|
+
import c from "react";
|
|
3
|
+
import { c as m } from "./clsx-OuTLNxxd.js";
|
|
4
|
+
import { getHideAtStyles as E } from "./atoms/HideAt.js";
|
|
5
|
+
import { Icon as ee } from "./atoms/Icon/Icon.js";
|
|
6
|
+
import './assets/Table.css';const ne = "_bordered_xcio5_8", te = "_table_xcio5_2", le = "_columnContent_xcio5_40", oe = "_columnLabel_xcio5_49", ae = "_clickableHeader_xcio5_69", ce = "_columnsRow_xcio5_76", se = "_noPaddingRow_xcio5_127", de = "_clickableRow_xcio5_138", ie = "_clickableCell_xcio5_139", re = "_expandedContentCell_xcio5_141", me = "_expandedContentRow_xcio5_150", ue = "_expandedRow_xcio5_155", pe = "_expanded_xcio5_141", n = {
|
|
7
|
+
"table-container": "_table-container_xcio5_2",
|
|
8
|
+
bordered: ne,
|
|
9
|
+
table: te,
|
|
10
|
+
"table-alternating": "_table-alternating_xcio5_22",
|
|
11
|
+
columnContent: le,
|
|
12
|
+
columnLabel: oe,
|
|
13
|
+
"sorted-column": "_sorted-column_xcio5_58",
|
|
14
|
+
clickableHeader: ae,
|
|
15
|
+
"icon-ascending": "_icon-ascending_xcio5_70",
|
|
16
|
+
columnsRow: ce,
|
|
17
|
+
noPaddingRow: se,
|
|
18
|
+
clickableRow: de,
|
|
19
|
+
clickableCell: ie,
|
|
20
|
+
expandedContentCell: re,
|
|
21
|
+
expandedContentRow: me,
|
|
22
|
+
expandedRow: ue,
|
|
23
|
+
expanded: pe
|
|
24
|
+
}, L = ({ children: u }) => null;
|
|
25
|
+
L.displayName = "Table.Columns";
|
|
26
|
+
const j = ({ children: u }) => null;
|
|
27
|
+
j.displayName = "Table.Column";
|
|
28
|
+
const M = ({ children: u }) => null;
|
|
29
|
+
M.displayName = "Table.Body";
|
|
30
|
+
const O = ({ children: u }) => null;
|
|
31
|
+
O.displayName = "Table.Row";
|
|
32
|
+
const z = ({ children: u }) => null;
|
|
33
|
+
z.displayName = "Table.Cell";
|
|
34
|
+
const x = ({ children: u, className: D, alternatingRows: q = !1, bordered: G = !0, isSortable: H = !1, sortField: J, sortFieldKey: Q, sortOrder: U = "descending", onSort: F, hideAt: W, ...X }) => {
|
|
35
|
+
const B = [];
|
|
36
|
+
let p, g;
|
|
37
|
+
const r = (t, l) => {
|
|
38
|
+
var e;
|
|
39
|
+
return !!t && c.isValidElement(t) && ((e = t.type) == null ? void 0 : e.displayName) === l;
|
|
40
|
+
}, Y = p ? c.Children.toArray(p.props.children).map(
|
|
41
|
+
(t) => r(t, "Table.Column") ? t.props.hideAt : void 0
|
|
42
|
+
) : [];
|
|
43
|
+
c.Children.forEach(u, (t) => {
|
|
44
|
+
r(t, "Table.Columns") ? p = t : r(t, "Table.Body") ? g = t : B.push(t);
|
|
45
|
+
});
|
|
46
|
+
const v = (t) => t.flatMap((l) => {
|
|
47
|
+
if (c.isValidElement(l) && l.type === c.Fragment) {
|
|
48
|
+
const e = l.props.children;
|
|
49
|
+
return c.Children.toArray(e);
|
|
50
|
+
}
|
|
51
|
+
return [l];
|
|
52
|
+
}), Z = () => {
|
|
53
|
+
if (!p) return null;
|
|
54
|
+
const t = c.Children.toArray(p.props.children);
|
|
55
|
+
return /* @__PURE__ */ a("thead", { className: n.thead, children: /* @__PURE__ */ a("tr", { ...p.props, className: n.columnsRow, children: t.map((l, e) => {
|
|
56
|
+
if (r(l, "Table.Column")) {
|
|
57
|
+
const d = l, {
|
|
58
|
+
children: o,
|
|
59
|
+
align: i,
|
|
60
|
+
colSpan: C,
|
|
61
|
+
width: R,
|
|
62
|
+
style: k,
|
|
63
|
+
sortField: y,
|
|
64
|
+
sortFieldKey: s,
|
|
65
|
+
hideAt: b,
|
|
66
|
+
...T
|
|
67
|
+
} = d.props, w = {
|
|
68
|
+
textAlign: i ?? "left",
|
|
69
|
+
width: R,
|
|
70
|
+
...k
|
|
71
|
+
}, A = i === "right" ? "flex-end" : i === "center" ? "center" : "flex-start", h = !!y, N = H && h && (h && J === y) && (s !== void 0 ? Q === s : !0), _ = H && h && typeof F == "function";
|
|
72
|
+
return /* @__PURE__ */ a(
|
|
73
|
+
"th",
|
|
74
|
+
{
|
|
75
|
+
className: m(n.th, N && n["sorted-column"], _ && n.clickableHeader, E(b)),
|
|
76
|
+
style: w,
|
|
77
|
+
colSpan: C,
|
|
78
|
+
onClick: _ ? () => F(y, s) : void 0,
|
|
79
|
+
...T,
|
|
80
|
+
children: /* @__PURE__ */ V("div", { className: n.columnContent, style: { justifyContent: A }, children: [
|
|
81
|
+
/* @__PURE__ */ a("span", { className: n.columnLabel, children: o }),
|
|
82
|
+
N && /* @__PURE__ */ a("span", { className: m(U === "ascending" && n["icon-ascending"]), children: /* @__PURE__ */ a(ee, { iconKey: "fa-solid fa-chevron-down", size: "3xs" }) })
|
|
83
|
+
] })
|
|
84
|
+
},
|
|
85
|
+
e
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
return /* @__PURE__ */ a("th", { className: n.th, children: l }, e);
|
|
89
|
+
}) }) });
|
|
90
|
+
}, f = (t, l, e) => {
|
|
91
|
+
const d = c.Children.toArray(t).map((s, b) => {
|
|
92
|
+
if (r(s, "Table.Cell")) {
|
|
93
|
+
const T = s, {
|
|
94
|
+
children: w,
|
|
95
|
+
align: A,
|
|
96
|
+
colSpan: h,
|
|
97
|
+
width: S,
|
|
98
|
+
style: K,
|
|
99
|
+
hideAt: N,
|
|
100
|
+
..._
|
|
101
|
+
} = T.props, I = {
|
|
102
|
+
textAlign: A ?? "left",
|
|
103
|
+
width: S,
|
|
104
|
+
...K
|
|
105
|
+
}, P = !!(_ && typeof _.onClick == "function");
|
|
106
|
+
return /* @__PURE__ */ a(
|
|
107
|
+
"td",
|
|
108
|
+
{
|
|
109
|
+
className: m(
|
|
110
|
+
n.cell,
|
|
111
|
+
(e == null ? void 0 : e.isExpanded) && n.expanded,
|
|
112
|
+
(e == null ? void 0 : e.isExpandedContent) && n.expandedContentCell,
|
|
113
|
+
P && n.clickableCell,
|
|
114
|
+
E(N ?? Y[b])
|
|
115
|
+
),
|
|
116
|
+
style: I,
|
|
117
|
+
colSpan: h,
|
|
118
|
+
..._,
|
|
119
|
+
children: w
|
|
120
|
+
},
|
|
121
|
+
b
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
return c.isValidElement(s) && typeof s.type == "string" && s.type === "td" ? s : /* @__PURE__ */ a(
|
|
125
|
+
"td",
|
|
126
|
+
{
|
|
127
|
+
className: m(
|
|
128
|
+
n.cell,
|
|
129
|
+
(e == null ? void 0 : e.isExpanded) && n.expanded,
|
|
130
|
+
(e == null ? void 0 : e.isExpandedContent) && n.expandedContentCell
|
|
131
|
+
),
|
|
132
|
+
children: s
|
|
133
|
+
},
|
|
134
|
+
b
|
|
135
|
+
);
|
|
136
|
+
}), { className: o, style: i, isExpanded: C, isExpandedContent: R, ...k } = e ?? {}, y = !!(e && typeof e.onClick == "function");
|
|
137
|
+
return /* @__PURE__ */ a(
|
|
138
|
+
"tr",
|
|
139
|
+
{
|
|
140
|
+
className: m(
|
|
141
|
+
n.row,
|
|
142
|
+
o,
|
|
143
|
+
C && n.expandedRow,
|
|
144
|
+
R && n.noPaddingRow,
|
|
145
|
+
R && n.expandedContentRow,
|
|
146
|
+
y && n.clickableRow
|
|
147
|
+
),
|
|
148
|
+
style: i,
|
|
149
|
+
...k,
|
|
150
|
+
children: d
|
|
151
|
+
},
|
|
152
|
+
l
|
|
153
|
+
);
|
|
154
|
+
}, $ = () => {
|
|
155
|
+
if (g) {
|
|
156
|
+
const d = v(c.Children.toArray(g.props.children)).map((o, i) => {
|
|
157
|
+
if (r(o, "Table.Row")) {
|
|
158
|
+
const C = o;
|
|
159
|
+
return f(C.props.children, i, C.props);
|
|
160
|
+
}
|
|
161
|
+
return c.isValidElement(o) && typeof o.type == "string" && o.type === "tr" ? o : f(o, i);
|
|
162
|
+
});
|
|
163
|
+
return /* @__PURE__ */ a("tbody", { className: n.tbody, children: d });
|
|
164
|
+
}
|
|
165
|
+
const l = v(B).map((e, d) => {
|
|
166
|
+
if (r(e, "Table.Row")) {
|
|
167
|
+
const o = e;
|
|
168
|
+
return f(o.props.children, d, o.props);
|
|
169
|
+
}
|
|
170
|
+
return c.isValidElement(e) && typeof e.type == "string" && e.type === "tr" ? e : f(e, d);
|
|
171
|
+
});
|
|
172
|
+
return /* @__PURE__ */ a("tbody", { className: n.tbody, children: l });
|
|
173
|
+
};
|
|
174
|
+
return /* @__PURE__ */ a("div", { className: m(n["table-container"], G && n.bordered), children: /* @__PURE__ */ V("table", { className: m(n.table, D, q && n["table-alternating"], E(W)), ...X, children: [
|
|
175
|
+
Z(),
|
|
176
|
+
$()
|
|
177
|
+
] }) });
|
|
178
|
+
};
|
|
179
|
+
x.Columns = L;
|
|
180
|
+
x.Column = j;
|
|
181
|
+
x.Body = M;
|
|
182
|
+
x.Row = O;
|
|
183
|
+
x.Cell = z;
|
|
184
|
+
export {
|
|
185
|
+
x as T,
|
|
186
|
+
n as s
|
|
187
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._availability_4sun9_1{font-style:italic;display:flex;align-items:center;gap:var(--spacing-spacing-4xs)}._pointer_4sun9_8{cursor:pointer}._tooltip_4sun9_12{font-family:var(--font-family-body),sans-serif;background-color:var(--surface-surface-primary);border:1px solid var(--color-border-primary);border-radius:var(--border-radius-md);box-shadow:0 .5rem 1.25rem #00000026}._tooltipContent_4sun9_20{width:308px}._tooltipHeader_4sun9_24{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:var(--spacing-spacing-2xs);padding:var(--spacing-spacing-default);border-bottom:1px solid #dfdfdf}._tooltipInfo_4sun9_33{padding:var(--spacing-spacing-default);display:block}._tooltipTitle_4sun9_38{display:grid}._tooltipHeaderIcon_4sun9_42{position:relative;display:grid;width:32px;height:32px;place-items:center;color:var(--color-alerts-success);background-color:var(--color-alerts-light-green);border-radius:50%}._tooltipHeaderAlert_4sun9_53{position:absolute;top:-2px;right:-2px;display:grid;width:12px;height:12px;place-items:center;color:var(--color-brand-primary-white);background-color:var(--color-alerts-warning);border:1px solid var(--surface-surface-primary);border-radius:50%}._warehouseList_4sun9_67{padding:0;margin:0;border-top:1px solid var(--color-border-primary)}._warehouseList_4sun9_67 li{display:flex;align-items:center;justify-content:space-between;padding:var(--spacing-spacing-1xs) var(--spacing-spacing-default);list-style:none;border-bottom:1px solid var(--color-border-primary)}._warehouseName_4sun9_82{display:flex;align-items:center;gap:var(--spacing-spacing-2xs)}._warehouseName_4sun9_82 svg{color:var(--text-text-links)}._fulfillmentNotice_4sun9_93{box-sizing:border-box;margin-top:var(--spacing-spacing-default)}._available_4sun9_98,._in-stock_4sun9_98{color:var(--color-alerts-success)}._limited_4sun9_101{color:var(--color-alerts-warning)}._discontinued_4sun9_104{color:var(--color-alerts-error-warning)}
|
package/dist/assets/Modal.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._overlay_1imlv_1{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:2000}._container_1imlv_11{display:flex;flex-direction:column;overflow:hidden;background-color:var(--surface-surface-primary);color:var(--text-text-primary);border-radius:var(--border-radius-sm);box-shadow:0 4px 6px #0000001a;width:min(var(--modal-width, 800px),92vw);max-height:80vh}@media (max-width:767px){._container_1imlv_11{border-radius:0;width:100%;box-shadow:none;height:100dvh;max-height:100dvh}}._toolbar_1imlv_30{position:sticky;top:0;display:flex;flex-direction:row;align-items:center;justify-content:space-between;background-color:var(--surface-surface-secondary);border-bottom:1px solid var(--border-border-secondary-btn);padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default);gap:var(--spacing-spacing-2xs);z-index:1}@media (max-width:767px){._toolbar_1imlv_30{padding:var(--spacing-spacing-2xs)}}._toolbarPlain_1imlv_47{background-color:transparent;border-bottom:none}._headerGroup_1imlv_52{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-2xs);flex:1 1 0}._headerLeft_1imlv_60{justify-content:flex-start}._headerRight_1imlv_64{justify-content:flex-end}._closeButton_1imlv_68{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;border-radius:var(--radius-radius-md);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;transition:background-color .2s ease-in}._closeButton_1imlv_68:hover{background-color:var(--color-neutrals-neutral-2)}._content_1imlv_87{overflow:auto;padding:var(--spacing-spacing-default)}@media (max-width:767px){._content_1imlv_87{padding:var(--spacing-spacing-2xs)}}
|
package/dist/assets/Select.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._select-
|
|
1
|
+
._select-container_kfi8n_1{display:flex;position:relative;flex-direction:column;align-items:flex-start;width:100%;box-sizing:border-box}._select_kfi8n_1{height:32px;min-height:32px;width:100%;box-sizing:border-box;border:1px solid var(--border-border-primary, #dfdfdf);border-radius:var(--radius-radius-sm, .25rem);background:var(--surface-surface-primary);color:var(--text-text-primary, #272727);font-size:var(--font-size-sm, .875rem);padding:0 var(--spacing-spacing-2xl, 32px) 0 var(--spacing-spacing-1xs, 12px);outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}@media (max-width: 767px){._select_kfi8n_1{font-size:var(--font-size-md)}}._icon_kfi8n_29{position:absolute;top:50%;right:var(--spacing-spacing-default);pointer-events:none;transform:translateY(-50%)}._select_kfi8n_1:hover:not(:disabled){border:1px solid var(--border-border-primary-btn, #1380b1)}._select_kfi8n_1:focus:not(:disabled){border:1px solid var(--border-border-primary-btn, #1380b1);box-shadow:0 0 2px 1px var(--border-border-primary-btn, #1380b1)}._select_kfi8n_1:disabled{border:1px solid var(--border-border-primary, #dfdfdf);background-color:var(--surface-surface-secondary, #f6f6f6);color:var(--text-text-disabled, #b2b2b2);cursor:not-allowed}._select_kfi8n_1:disabled:hover,._select_kfi8n_1:disabled:focus{border:1px solid var(--border-border-primary, #dfdfdf);box-shadow:none}._selectError_kfi8n_59{border-color:var(--text-text-error-warning, #d40000)}._label_kfi8n_63{position:absolute;align-self:flex-start;left:8px;top:-8px;z-index:1;padding:0 8px;cursor:text;transition:all .2s ease-in;font-family:var(--font-family-label);font-size:var(--font-size-xxs);color:var(--text-text-quaternary);background-color:var(--surface-surface-primary)}._labelPlaceholder_kfi8n_78{position:absolute;align-self:flex-start;box-sizing:border-box;max-width:calc(100% - 24px);z-index:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:italic;font-family:var(--font-family-label);font-size:var(--font-size-sm);background-color:transparent;color:var(--text-text-quaternary);left:12px;top:8px;padding:0 2px;pointer-events:none;transition:all .2s ease-in}._labelDisabled_kfi8n_99{color:var(--text-text-disabled, #b2b2b2)}._errorMessage_kfi8n_103{width:100%;margin-top:4px;font-size:var(--font-size-xs, .75rem);color:var(--text-text-error-warning, #d40000)}
|
package/dist/assets/Table.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._table-
|
|
1
|
+
._table-container_xcio5_2{border-radius:var(--border-radius-sm);overflow-x:hidden;width:100%}._bordered_xcio5_8{border:1px solid var(--border-border-primary)}._table_xcio5_2{min-width:100%;max-width:1056px;width:max-content;border-collapse:collapse;table-layout:fixed}._table-alternating_xcio5_22 tr:nth-child(2n){background-color:#f0f0f0}._table_xcio5_2 th,._table_xcio5_2 td{max-width:clamp(72px,10vw,180px);min-width:60px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._columnContent_xcio5_40{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-4xs);width:100%;min-width:0}._columnLabel_xcio5_49{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._sorted-column_xcio5_58 svg,._sorted-column_xcio5_58 i{height:8px;width:8px;transition:transform .3s ease-in-out;vertical-align:middle;padding:0;margin:0 0 0 4px}._table_xcio5_2 th._clickableHeader_xcio5_69{cursor:pointer}._icon-ascending_xcio5_70 svg,._icon-ascending_xcio5_70 i{transform:rotate(180deg)}._columnsRow_xcio5_76{background-color:var(--surface-surface-secondary)}._table_xcio5_2 th{border-bottom:1px solid var(--border-border-primary);cursor:auto;transition:background-color .2s ease-in}._table_xcio5_2 th:hover{background-color:#f0f0f0}._sorted-column_xcio5_58{text-align:start;font-size:var(--font-size-xs);font-weight:var(--font-weight-semibold);color:var(--text-text-quaternary);row-gap:4px}._table_xcio5_2 th:not(._sorted-column_xcio5_58){text-align:start;font-size:var(--font-size-xs);font-weight:var(--font-weight-medium);color:var(--text-text-quaternary)}._table_xcio5_2 th:last-of-type,._table_xcio5_2 td:last-of-type{border-top-right-radius:var(--border-radius-sm);text-align:end;padding-right:.5rem}._table_xcio5_2 th:first-of-type,._table_xcio5_2 td:first-of-type{border-top-left-radius:var(--border-radius-sm);text-align:start;padding:.45rem .5rem}._table_xcio5_2 th:not(:first-of-type):not(:last-of-type),._table_xcio5_2 td:not(:first-of-type):not(:last-of-type){padding:.45rem .5rem}._noPaddingRow_xcio5_127 td{padding:0!important}._table_xcio5_2 td{text-align:start;cursor:auto}._table_xcio5_2 ._clickableRow_xcio5_138 td,._table_xcio5_2 td._clickableCell_xcio5_139{cursor:pointer}._table_xcio5_2 td:not(._expandedContentCell_xcio5_141){border-bottom:1px solid var(--border-border-primary)}._table_xcio5_2>tbody tr{transition:background-color .2s linear}._table_xcio5_2>tbody tr:not(._expandedContentRow_xcio5_150):hover{background-color:var(--color-neutrals-neutral-1)}._expandedRow_xcio5_155 td:first-of-type{border-left:1px solid var(--border-border-black-box)}._expandedRow_xcio5_155 td:last-of-type{border-right:1px solid var(--border-border-black-box)}._expanded_xcio5_141{border-top:4px solid var(--color-brand-primary-primary-teal-blue)}._expandedContentCell_xcio5_141{border-left:1px solid var(--border-border-black-box);border-right:1px solid var(--border-border-black-box);border-bottom:1px solid var(--border-border-black-box);border-top:0}._expandedContentRow_xcio5_150{background-color:transparent}._new-column_xcio5_182{animation:_highlight_xcio5_1 2s ease-in-out}@keyframes _highlight_xcio5_1{0%{background-color:#ff0}to{background-color:transparent}}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { TextColorToken, TextWeight } from '../Text/Text';
|
|
3
|
-
|
|
3
|
+
import { HideAtProps } from '../HideAt';
|
|
4
|
+
export interface PillProps extends React.HTMLAttributes<HTMLSpanElement>, HideAtProps {
|
|
4
5
|
children: ReactNode;
|
|
5
6
|
colorToken?: "neutral" | "secondary" | "caution-tips" | "warning" | "success" | "error-warning";
|
|
6
7
|
customColor?: string;
|
|
@@ -11,4 +12,4 @@ export interface PillProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
11
12
|
size?: "xs" | "sm" | "md";
|
|
12
13
|
className?: string;
|
|
13
14
|
}
|
|
14
|
-
export declare function Pill({ colorToken, textColorToken, customColor, weight, uppercase, hideBorder, size, className, children, ...otherProps }: PillProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function Pill({ colorToken, textColorToken, customColor, weight, uppercase, hideBorder, size, hideAt, className, children, ...otherProps }: PillProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/atoms/Pill/Pill.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Text as
|
|
3
|
-
import { c as
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Text as j } from "../Text/Text.js";
|
|
3
|
+
import { c as p } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { getHideAtStyles as m } from "../HideAt.js";
|
|
5
|
+
import '../../assets/Pill.css';const b = "_pill_i5js9_1", g = "_noBorder_i5js9_137", w = "_uppercase_i5js9_145", l = {
|
|
6
|
+
pill: b,
|
|
6
7
|
"pill-xs": "_pill-xs_i5js9_17",
|
|
7
8
|
"pill-sm": "_pill-sm_i5js9_25",
|
|
8
9
|
"pill-md": "_pill-md_i5js9_33",
|
|
@@ -18,41 +19,43 @@ import '../../assets/Pill.css';const j = "_pill_i5js9_1", m = "_noBorder_i5js9_1
|
|
|
18
19
|
"pill-border-warning": "_pill-border-warning_i5js9_113",
|
|
19
20
|
"pill-border-success": "_pill-border-success_i5js9_121",
|
|
20
21
|
"pill-border-error-warning": "_pill-border-error-warning_i5js9_129",
|
|
21
|
-
noBorder:
|
|
22
|
-
uppercase:
|
|
22
|
+
noBorder: g,
|
|
23
|
+
uppercase: w
|
|
23
24
|
};
|
|
24
|
-
function
|
|
25
|
-
colorToken:
|
|
26
|
-
textColorToken:
|
|
25
|
+
function $({
|
|
26
|
+
colorToken: r = "success",
|
|
27
|
+
textColorToken: _,
|
|
27
28
|
customColor: s,
|
|
28
29
|
weight: c = "medium",
|
|
29
30
|
uppercase: n = !1,
|
|
30
31
|
hideBorder: o = !1,
|
|
31
32
|
size: i = "xs",
|
|
32
|
-
|
|
33
|
+
hideAt: a,
|
|
34
|
+
className: t,
|
|
33
35
|
children: d,
|
|
34
|
-
...
|
|
36
|
+
...u
|
|
35
37
|
}) {
|
|
36
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ e(
|
|
37
39
|
"span",
|
|
38
40
|
{
|
|
39
|
-
className:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
!o &&
|
|
44
|
-
o &&
|
|
45
|
-
a
|
|
41
|
+
className: p(
|
|
42
|
+
l.pill,
|
|
43
|
+
l[`pill-color-${r}`],
|
|
44
|
+
l[`pill-${i}`],
|
|
45
|
+
!o && l[`pill-border-${r}`],
|
|
46
|
+
o && l.noBorder,
|
|
47
|
+
m(a),
|
|
48
|
+
t
|
|
46
49
|
),
|
|
47
50
|
style: s ? { background: s } : void 0,
|
|
48
|
-
...
|
|
49
|
-
children: /* @__PURE__ */
|
|
50
|
-
|
|
51
|
+
...u,
|
|
52
|
+
children: /* @__PURE__ */ e(
|
|
53
|
+
j,
|
|
51
54
|
{
|
|
52
55
|
size: i === "xs" ? "xxs" : i === "sm" ? "xs" : "sm",
|
|
53
56
|
weight: c,
|
|
54
|
-
colorToken:
|
|
55
|
-
className:
|
|
57
|
+
colorToken: _ ?? (r === "neutral" ? "primary" : r === "secondary" ? "secondary" : r === "success" ? "success" : r === "error-warning" ? "error-warning" : "warning"),
|
|
58
|
+
className: p(n && l.uppercase),
|
|
56
59
|
children: d
|
|
57
60
|
}
|
|
58
61
|
)
|
|
@@ -60,5 +63,5 @@ function y({
|
|
|
60
63
|
);
|
|
61
64
|
}
|
|
62
65
|
export {
|
|
63
|
-
|
|
66
|
+
$ as Pill
|
|
64
67
|
};
|
|
@@ -1,68 +1,79 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { c as
|
|
4
|
-
import { getHideAtStyles as
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
select:
|
|
8
|
-
|
|
1
|
+
import { jsxs as u, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import w, { useState as E } from "react";
|
|
3
|
+
import { c as f } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { getHideAtStyles as M } from "../HideAt.js";
|
|
5
|
+
import { Icon as F } from "../Icon/Icon.js";
|
|
6
|
+
import '../../assets/Select.css';const V = "_select_kfi8n_1", j = "_icon_kfi8n_29", I = "_selectError_kfi8n_59", L = "_label_kfi8n_63", P = "_labelPlaceholder_kfi8n_78", R = "_labelDisabled_kfi8n_99", z = "_errorMessage_kfi8n_103", e = {
|
|
7
|
+
"select-container": "_select-container_kfi8n_1",
|
|
8
|
+
select: V,
|
|
9
|
+
icon: j,
|
|
10
|
+
selectError: I,
|
|
9
11
|
label: L,
|
|
10
12
|
labelPlaceholder: P,
|
|
11
13
|
labelDisabled: R,
|
|
12
|
-
errorMessage:
|
|
13
|
-
},
|
|
14
|
+
errorMessage: z
|
|
15
|
+
}, A = w.forwardRef(
|
|
14
16
|
({
|
|
15
17
|
label: s,
|
|
16
|
-
placeholder:
|
|
17
|
-
options:
|
|
18
|
+
placeholder: o,
|
|
19
|
+
options: k,
|
|
18
20
|
value: m,
|
|
19
|
-
defaultValue:
|
|
21
|
+
defaultValue: i,
|
|
20
22
|
hideAt: g,
|
|
21
23
|
className: D,
|
|
22
|
-
error:
|
|
23
|
-
onFocus:
|
|
24
|
-
onBlur:
|
|
25
|
-
...
|
|
26
|
-
},
|
|
27
|
-
const [
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
(s ||
|
|
24
|
+
error: t,
|
|
25
|
+
onFocus: r,
|
|
26
|
+
onBlur: d,
|
|
27
|
+
...c
|
|
28
|
+
}, N) => {
|
|
29
|
+
const [S, b] = E(!1), x = !!c.disabled, n = m !== void 0, v = n ? String(m ?? "") : void 0, h = !n && i !== void 0 && i !== null ? String(i) : "", _ = !!s && (S || (n ? v !== "" : h !== "")), y = !!o && !_, p = s ? "" : o ?? "";
|
|
30
|
+
return /* @__PURE__ */ u("div", { className: f(e["select-container"], M(g)), children: [
|
|
31
|
+
(s || y) && /* @__PURE__ */ a(
|
|
30
32
|
"label",
|
|
31
33
|
{
|
|
32
|
-
htmlFor:
|
|
33
|
-
className:
|
|
34
|
-
|
|
35
|
-
x ?
|
|
34
|
+
htmlFor: c.name,
|
|
35
|
+
className: f(
|
|
36
|
+
_ ? e.label : e.labelPlaceholder,
|
|
37
|
+
x ? e.labelDisabled : void 0
|
|
36
38
|
),
|
|
37
|
-
children:
|
|
39
|
+
children: _ ? s : o ?? s
|
|
38
40
|
}
|
|
39
41
|
),
|
|
40
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ u(
|
|
41
43
|
"select",
|
|
42
44
|
{
|
|
43
|
-
...
|
|
44
|
-
ref:
|
|
45
|
-
id:
|
|
46
|
-
value:
|
|
47
|
-
defaultValue:
|
|
48
|
-
className:
|
|
49
|
-
onFocus: (
|
|
50
|
-
|
|
45
|
+
...c,
|
|
46
|
+
ref: N,
|
|
47
|
+
id: c.name,
|
|
48
|
+
value: v,
|
|
49
|
+
defaultValue: n ? void 0 : h,
|
|
50
|
+
className: f(e.select, t ? e.selectError : void 0, D),
|
|
51
|
+
onFocus: (l) => {
|
|
52
|
+
b(!0), r == null || r(l);
|
|
51
53
|
},
|
|
52
|
-
onBlur: (
|
|
53
|
-
|
|
54
|
+
onBlur: (l) => {
|
|
55
|
+
b(!1), d == null || d(l);
|
|
54
56
|
},
|
|
55
57
|
children: [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
o ? /* @__PURE__ */ a("option", { value: "", disabled: !0, hidden: !!s, children: p }) : null,
|
|
59
|
+
k.map((l) => /* @__PURE__ */ a("option", { value: l.value, children: l.label }, l.value))
|
|
58
60
|
]
|
|
59
61
|
}
|
|
60
62
|
),
|
|
61
|
-
|
|
63
|
+
/* @__PURE__ */ a(
|
|
64
|
+
F,
|
|
65
|
+
{
|
|
66
|
+
className: e.icon,
|
|
67
|
+
iconKey: "fa-solid fa-chevron-down",
|
|
68
|
+
size: "3xs",
|
|
69
|
+
colorToken: "secondary"
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
t ? /* @__PURE__ */ a("div", { className: e.errorMessage, children: t }) : null
|
|
62
73
|
] });
|
|
63
74
|
}
|
|
64
75
|
);
|
|
65
|
-
|
|
76
|
+
A.displayName = "Select";
|
|
66
77
|
export {
|
|
67
|
-
|
|
78
|
+
A as Select
|
|
68
79
|
};
|
package/dist/main-client.js
CHANGED
|
@@ -49,7 +49,7 @@ import { AnimatedCheckMark as jo } from "./molecules/StatefulButton/AnimatedChec
|
|
|
49
49
|
import { AddToCart as Jo } from "./molecules/AddToCart/AddToCart.js";
|
|
50
50
|
import { Modal as Uo } from "./molecules/Modal/Modal.js";
|
|
51
51
|
import { ImageViewer as Yo } from "./molecules/ImageViewer/ImageViewer.js";
|
|
52
|
-
import { T as $o } from "./Table-
|
|
52
|
+
import { T as $o } from "./Table-f_q_CCA-.js";
|
|
53
53
|
import { Error as rr } from "./molecules/Error/Error.js";
|
|
54
54
|
import { MainNav as er } from "./organisms/MainNav/MainNav.js";
|
|
55
55
|
import { ChipSelector as pr } from "./organisms/ChipSelector/ChipSelector.js";
|
|
@@ -16,3 +16,9 @@ export interface Inventory {
|
|
|
16
16
|
}
|
|
17
17
|
export type AvailabilityId = "in-stock" | "limited" | "discontinued" | "available" | "not-found";
|
|
18
18
|
export declare function Availability({ availId: id, availDescription: description, availClassName: className, enableTooltip, inventory }: AvailabilityProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
interface TooltipContentProps {
|
|
20
|
+
availabilityId: AvailabilityId;
|
|
21
|
+
inventory: Inventory;
|
|
22
|
+
}
|
|
23
|
+
export declare function AvailabilityTooltipContent({ availabilityId, inventory }: TooltipContentProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|