@sps-woodland/sorting-header 8.2.1 → 8.3.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/lib/index.es.js +42 -30
- package/lib/style.css +1 -1
- package/package.json +5 -5
package/lib/index.es.js
CHANGED
|
@@ -74,26 +74,30 @@ function E({
|
|
|
74
74
|
n,
|
|
75
75
|
t
|
|
76
76
|
]), C = d ? d / 16 : m, g = C ? { ...u, width: `${C}rem` } : u;
|
|
77
|
-
return /* @__PURE__ */ a.createElement(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
77
|
+
return /* @__PURE__ */ a.createElement(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
className: h(
|
|
81
|
+
e,
|
|
82
|
+
j({ disabled: t, active: !!c }),
|
|
83
|
+
c && k({
|
|
84
|
+
up: c === w.ASCENDING,
|
|
85
|
+
down: c === w.DESCENDING
|
|
86
|
+
})
|
|
87
|
+
),
|
|
88
|
+
onClick: (S) => {
|
|
89
|
+
n && !t && i && i([
|
|
90
|
+
{
|
|
91
|
+
key: n,
|
|
92
|
+
direction: c === w.ASCENDING ? w.DESCENDING : w.ASCENDING
|
|
93
|
+
}
|
|
94
|
+
]), l && l(S);
|
|
95
|
+
},
|
|
96
|
+
style: g,
|
|
97
|
+
...s
|
|
93
98
|
},
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}, p);
|
|
99
|
+
p
|
|
100
|
+
);
|
|
97
101
|
}
|
|
98
102
|
D.set(E, {
|
|
99
103
|
name: "Sorting Header Cell",
|
|
@@ -161,17 +165,25 @@ function H({
|
|
|
161
165
|
C
|
|
162
166
|
]);
|
|
163
167
|
const [g] = A(r, [{ type: E }]), S = P(g, () => [{ sort: e, onSortChange: n }]);
|
|
164
|
-
return /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
"
|
|
174
|
-
|
|
168
|
+
return /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(
|
|
169
|
+
"div",
|
|
170
|
+
{
|
|
171
|
+
ref: d,
|
|
172
|
+
className: h(t, I({ pinned: !1 })),
|
|
173
|
+
...l
|
|
174
|
+
},
|
|
175
|
+
S
|
|
176
|
+
), p && /* @__PURE__ */ a.createElement(
|
|
177
|
+
"div",
|
|
178
|
+
{
|
|
179
|
+
ref: m,
|
|
180
|
+
className: h(t, I({ pinned: !0 })),
|
|
181
|
+
...l,
|
|
182
|
+
id: l.id ? `pinned-${l.id}` : void 0,
|
|
183
|
+
"data-testid": l["data-testid"] ? `pinned-${l["data-testid"]}` : void 0
|
|
184
|
+
},
|
|
185
|
+
S
|
|
186
|
+
));
|
|
175
187
|
}
|
|
176
188
|
D.set(H, {
|
|
177
189
|
name: "Sorting Header",
|
package/lib/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._7ljhcs0:after{content:"";border-left-color:transparent;border-right-color:transparent;border-style:solid;border-width:.375rem .25rem;height:0;position:absolute;right:.5rem}._7ljhcs1:after{border-bottom-color
|
|
1
|
+
._7ljhcs0:after{content:"";border-left-color:transparent;border-right-color:transparent;border-style:solid;border-width:.375rem .25rem;height:0;position:absolute;right:.5rem}._7ljhcs1:after{border-bottom-color:oklch(26.99% .015 226.65);border-top-color:transparent;top:calc(50% - 9px)}._7ljhcs2:after{border-top-color:oklch(26.99% .015 226.65);border-bottom-color:transparent;top:calc(50% - 3px)}._1crs4gl0{display:table-cell;vertical-align:middle;color:oklch(43.62% .011 222.24);font-size:.75rem;font-weight:600;line-height:1.25rem;padding:.5rem;position:relative}._1crs4gl0:hover{background-color:oklch(96.64% .001 197.14)}._1crs4gl1{cursor:default}._1crs4gl2{color:oklch(26.99% .015 226.65);background-color:oklch(86.84% .002 197.12)}.sk81640{display:table;table-layout:fixed;width:100%;padding:0;border-radius:.25rem;vertical-align:bottom;cursor:pointer;background-color:oklch(93.43% .001 286.37)}.sk81641{border-radius:0;position:fixed;top:3.75rem;z-index:999}.sk81641:after{content:"";background:linear-gradient(180deg,rgba(0,0,0,.1),transparent);display:block;height:.625rem;position:absolute;top:100%;left:-.0625rem;width:100%}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sps-woodland/sorting-header",
|
|
3
3
|
"description": "SPS Woodland Design System sorting-header and sorting-header cell components",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.3.0",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/sorting-header",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@spscommerce/utils": "^6.12.1",
|
|
30
30
|
"react": "^16.14.0",
|
|
31
31
|
"react-dom": "^16.14.0",
|
|
32
|
-
"@sps-woodland/core": "8.
|
|
33
|
-
"@sps-woodland/tokens": "8.
|
|
32
|
+
"@sps-woodland/core": "8.3.0",
|
|
33
|
+
"@sps-woodland/tokens": "8.3.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@spscommerce/utils": "^6.12.1",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"@vanilla-extract/recipes": "^0.2.5",
|
|
40
40
|
"react": "^16.14.0",
|
|
41
41
|
"react-dom": "^16.14.0",
|
|
42
|
-
"@sps-woodland/core": "8.
|
|
43
|
-
"@sps-woodland/tokens": "8.
|
|
42
|
+
"@sps-woodland/core": "8.3.0",
|
|
43
|
+
"@sps-woodland/tokens": "8.3.0"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "pnpm run build:js && pnpm run build:types",
|