@sps-woodland/side-nav 8.0.2 → 8.0.4
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.cjs.js +2 -2
- package/lib/index.es.js +82 -75
- package/lib/side-nav/SideNav.d.ts +1 -5
- package/lib/side-nav/navContext.d.ts +4 -0
- package/lib/side-nav-header/SideNavHeader.d.ts +2 -2
- package/lib/side-nav-item/SideNavItem.d.ts +1 -1
- package/lib/side-nav-section/SideNavSection.d.ts +1 -1
- package/package.json +6 -6
package/lib/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const w=require("react"),r=require("@sps-woodland/core"),u=require("@spscommerce/utils");function x(a){if(a&&a.__esModule)return a;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:()=>a[t]})}}return n.default=a,Object.freeze(n)}const e=x(w);function H(a,n,t){return n in a?Object.defineProperty(a,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[n]=t,a}function C(a,n){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(a);n&&(i=i.filter(function(d){return Object.getOwnPropertyDescriptor(a,d).enumerable})),t.push.apply(t,i)}return t}function T(a){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?C(Object(t),!0).forEach(function(i){H(a,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):C(Object(t)).forEach(function(i){Object.defineProperty(a,i,Object.getOwnPropertyDescriptor(t,i))})}return a}var F=(a,n,t)=>{for(var i of Object.keys(a)){var d;if(a[i]!==((d=n[i])!==null&&d!==void 0?d:t[i]))return!1}return!0},V=a=>n=>{var t=a.defaultClassName,i=T(T({},a.defaultVariants),n);for(var d in i){var o,c=(o=i[d])!==null&&o!==void 0?o:a.defaultVariants[d];if(c!=null){var s=c;typeof s=="boolean"&&(s=s===!0?"true":"false");var m=a.variantClassNames[d][s];m&&(t+=" "+m)}}for(var[l,S]of a.compoundVariants)F(l,i,a.defaultVariants)&&(t+=" "+S);return t},_="_1j8bvco7",A="_1j8bvco0",G="_1j8bvco8",M="_1j8bvcof",q="_1j8bvcoe",D="_1j8bvco3",U="_1j8bvco4",R="_1j8bvco1",z=V({defaultClassName:"_1j8bvco9",variantClassNames:{selected:{true:"_1j8bvcoa",false:"_1j8bvcob"},inFilter:{true:"_1j8bvcoc",false:"_1j8bvcod"}},defaultVariants:{selected:!1,inFilter:!0},compoundVariants:[]}),j="_1j8bvcog",B="_1j8bvco5",L="_1j8bvco6",K="_1j8bvco2";function y({children:a,className:n,...t}){return e.createElement("div",{className:R,...t},e.createElement("div",{className:K},a))}r.Metadata.set(y,{name:"SideNavHeader",props:{}});const O=w.createContext({filterValue:"",activeItem:""});function v({children:a,className:n,onSelect:t,as:i,keyId:d,...o}){const c=i!=null?i:"a",[s,m]=r.selectChildren(a,[{type:v}]),[l,S]=e.useState(!0),[g,b]=e.useState(!0),p=e.useContext(O),I=e.useRef(null);return e.useEffect(()=>{var h;b(((h=I.current)==null?void 0:h.innerText.includes(p.filterValue))||!1)},[p]),e.createElement(e.Fragment,null,s.length?e.createElement("ul",{className:G},e.createElement("li",{ref:I,className:q,onClick:()=>S(!l)},e.createElement(c,{className:j,...o},e.createElement("div",null,e.createElement(r.Icon,{className:M,icon:l?"chevron-down":"chevron-up"})),m)),l&&s):e.createElement("li",{ref:I,className:z({selected:p.activeItem===d,inFilter:g})},e.createElement(c,{className:j,onClick:()=>{t(d)},...o},a)))}r.Metadata.set(v,{name:"SideNavItem",props:{keyId:{type:"string",required:!0},as:{type:"string"}}});function f({children:a,className:n,title:t,onSelect:i,...d}){const[o,c]=r.selectChildren(a,[{type:v}]),s=r.modChildren(o,m=>m.type===v?[{onSelect:i?l=>i(l):()=>{}}]:[]);return e.createElement("div",{className:B,...d},t&&e.createElement("div",{className:L},t),e.createElement("ul",{className:_},s),c)}r.Metadata.set(f,{name:"SideNavSection",props:{title:{type:"string"}}});function E({children:a,className:n,activeNavItem:t,filterable:i,filterInputPlaceholder:d,...o}){const[c,s,m]=r.selectChildren(a,[{type:y},{type:f},{type:v}]),l=e.useRef(t),[S,g]=e.useState(t),[b,p]=e.useState(""),I=N=>{g(N)},h=r.modChildren(m,N=>N.type===v?[{onSelect:k=>I(k)}]:[]),P=r.modChildren(s,N=>N.type===f?[{onSelect:k=>I(k)}]:[]);return t!==l.current&&(g(t),l.current=t),e.createElement(O.Provider,{value:{filterValue:b,activeItem:S}},e.createElement("div",{className:r.cl(A),...o},c,i&&e.createElement("div",{className:D},e.createElement("div",{className:U},e.createElement("div",{className:"sps-text-input"},e.createElement("div",{className:"sps-form-control"},e.createElement("i",{className:"sps-text-input__icon sps-icon sps-icon-filter"}),e.createElement("input",{type:"text",className:"sps-text-input__input",placeholder:d,onChange:N=>{p(N.target.value)}}))))),P,e.createElement("ul",{className:_},h)))}r.Metadata.set(E,{name:"SideNav",props:{activeNavItem:{type:"string",required:!0},filterable:{type:"boolean"},filterInputPlaceholder:{type:"string"}}});const W={description:()=>e.createElement("p",null,"Side Navigations are used to provide quick access to a series of related pages or content. It can be used to navigate between different page views, or as an anchor-style menu to scroll to specific content on the same page."),components:[E,y,f,v],examples:{general:{label:"Usage",description:()=>e.createElement(e.Fragment,null,e.createElement("p",null,"Use the Side Navigation if:"),e.createElement("ul",null,e.createElement("li",null,"The navigation benefits from subsections or nested structures"),e.createElement("li",null,"There are too many items for Tabbed Navigation"),e.createElement("li",null,"The navigation items have long names")),e.createElement("p",null,"Avoid using the Side Navigation if:"),e.createElement("ul",null,e.createElement("li",null,"Tabbed Navigation is sufficient"),e.createElement("li",null,"The full width of the page is required to sufficiently display content")))},filter:{label:"Filter",description:"Use Filters when the Side Navigation benefits from filtering, usually when it contains a long list of navigation items.",examples:{filter:{react:u.code`
|
|
2
2
|
import { SideNav, SideNavHeader, SideNavItem } from "@sps-woodland/side-nav";
|
|
3
3
|
import { Icon } from "@sps-woodland/core";
|
|
4
4
|
|
|
@@ -238,4 +238,4 @@
|
|
|
238
238
|
</div>
|
|
239
239
|
)
|
|
240
240
|
}
|
|
241
|
-
`}}}}},J={"Side Navigation":W};exports.MANIFEST=J;exports.SideNav=
|
|
241
|
+
`}}}}},J={"Side Navigation":W};exports.MANIFEST=J;exports.SideNav=E;exports.SideNavHeader=y;exports.SideNavItem=v;exports.SideNavSection=f;
|
package/lib/index.es.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { createContext as H } from "react";
|
|
3
|
+
import { Metadata as h, selectChildren as E, Icon as F, modChildren as b, cl as V } from "@sps-woodland/core";
|
|
3
4
|
import { code as p } from "@spscommerce/utils";
|
|
4
|
-
function
|
|
5
|
+
function G(a, n, t) {
|
|
5
6
|
return n in a ? Object.defineProperty(a, n, {
|
|
6
7
|
value: t,
|
|
7
8
|
enumerable: !0,
|
|
@@ -9,7 +10,7 @@ function V(a, n, t) {
|
|
|
9
10
|
writable: !0
|
|
10
11
|
}) : a[n] = t, a;
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
+
function T(a, n) {
|
|
13
14
|
var t = Object.keys(a);
|
|
14
15
|
if (Object.getOwnPropertySymbols) {
|
|
15
16
|
var i = Object.getOwnPropertySymbols(a);
|
|
@@ -19,26 +20,26 @@ function w(a, n) {
|
|
|
19
20
|
}
|
|
20
21
|
return t;
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
+
function w(a) {
|
|
23
24
|
for (var n = 1; n < arguments.length; n++) {
|
|
24
25
|
var t = arguments[n] != null ? arguments[n] : {};
|
|
25
|
-
n % 2 ?
|
|
26
|
-
|
|
27
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) :
|
|
26
|
+
n % 2 ? T(Object(t), !0).forEach(function(i) {
|
|
27
|
+
G(a, i, t[i]);
|
|
28
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : T(Object(t)).forEach(function(i) {
|
|
28
29
|
Object.defineProperty(a, i, Object.getOwnPropertyDescriptor(t, i));
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
32
|
return a;
|
|
32
33
|
}
|
|
33
|
-
var
|
|
34
|
+
var A = (a, n, t) => {
|
|
34
35
|
for (var i of Object.keys(a)) {
|
|
35
36
|
var d;
|
|
36
37
|
if (a[i] !== ((d = n[i]) !== null && d !== void 0 ? d : t[i]))
|
|
37
38
|
return !1;
|
|
38
39
|
}
|
|
39
40
|
return !0;
|
|
40
|
-
},
|
|
41
|
-
var t = a.defaultClassName, i =
|
|
41
|
+
}, U = (a) => (n) => {
|
|
42
|
+
var t = a.defaultClassName, i = w(w({}, a.defaultVariants), n);
|
|
42
43
|
for (var d in i) {
|
|
43
44
|
var s, l = (s = i[d]) !== null && s !== void 0 ? s : a.defaultVariants[d];
|
|
44
45
|
if (l != null) {
|
|
@@ -48,26 +49,30 @@ var G = (a, n, t) => {
|
|
|
48
49
|
m && (t += " " + m);
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
|
-
for (var [o,
|
|
52
|
-
|
|
52
|
+
for (var [o, I] of a.compoundVariants)
|
|
53
|
+
A(o, i, a.defaultVariants) && (t += " " + I);
|
|
53
54
|
return t;
|
|
54
|
-
},
|
|
55
|
+
}, x = "_1j8bvco7", D = "_1j8bvco0", R = "_1j8bvco8", q = "_1j8bvcof", B = "_1j8bvcoe", L = "_1j8bvco3", z = "_1j8bvco4", M = "_1j8bvco1", K = U({ defaultClassName: "_1j8bvco9", variantClassNames: { selected: { true: "_1j8bvcoa", false: "_1j8bvcob" }, inFilter: { true: "_1j8bvcoc", false: "_1j8bvcod" } }, defaultVariants: { selected: !1, inFilter: !0 }, compoundVariants: [] }), j = "_1j8bvcog", W = "_1j8bvco5", J = "_1j8bvco6", Q = "_1j8bvco2";
|
|
55
56
|
function C({
|
|
56
57
|
children: a,
|
|
57
58
|
className: n,
|
|
58
59
|
...t
|
|
59
60
|
}) {
|
|
60
61
|
return /* @__PURE__ */ e.createElement("div", {
|
|
61
|
-
className:
|
|
62
|
+
className: M,
|
|
62
63
|
...t
|
|
63
64
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
64
|
-
className:
|
|
65
|
+
className: Q
|
|
65
66
|
}, a));
|
|
66
67
|
}
|
|
67
68
|
h.set(C, {
|
|
68
69
|
name: "SideNavHeader",
|
|
69
70
|
props: {}
|
|
70
71
|
});
|
|
72
|
+
const _ = H({
|
|
73
|
+
filterValue: "",
|
|
74
|
+
activeItem: ""
|
|
75
|
+
});
|
|
71
76
|
function c({
|
|
72
77
|
children: a,
|
|
73
78
|
className: n,
|
|
@@ -76,30 +81,30 @@ function c({
|
|
|
76
81
|
keyId: d,
|
|
77
82
|
...s
|
|
78
83
|
}) {
|
|
79
|
-
const l = i != null ? i : "a", [r, m] = E(a, [{ type: c }]), [o,
|
|
84
|
+
const l = i != null ? i : "a", [r, m] = E(a, [{ type: c }]), [o, I] = e.useState(!0), [u, y] = e.useState(!0), S = e.useContext(_), N = e.useRef(null);
|
|
80
85
|
return e.useEffect(() => {
|
|
81
86
|
var f;
|
|
82
|
-
y(((f =
|
|
83
|
-
}, [
|
|
84
|
-
className:
|
|
87
|
+
y(((f = N.current) == null ? void 0 : f.innerText.includes(S.filterValue)) || !1);
|
|
88
|
+
}, [S]), /* @__PURE__ */ e.createElement(e.Fragment, null, r.length ? /* @__PURE__ */ e.createElement("ul", {
|
|
89
|
+
className: R
|
|
85
90
|
}, /* @__PURE__ */ e.createElement("li", {
|
|
86
|
-
ref:
|
|
87
|
-
className:
|
|
88
|
-
onClick: () =>
|
|
91
|
+
ref: N,
|
|
92
|
+
className: B,
|
|
93
|
+
onClick: () => I(!o)
|
|
89
94
|
}, /* @__PURE__ */ e.createElement(l, {
|
|
90
|
-
className:
|
|
95
|
+
className: j,
|
|
91
96
|
...s
|
|
92
|
-
}, /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement(
|
|
93
|
-
className:
|
|
97
|
+
}, /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement(F, {
|
|
98
|
+
className: q,
|
|
94
99
|
icon: o ? "chevron-down" : "chevron-up"
|
|
95
100
|
})), m)), o && r) : /* @__PURE__ */ e.createElement("li", {
|
|
96
|
-
ref:
|
|
97
|
-
className:
|
|
98
|
-
selected:
|
|
101
|
+
ref: N,
|
|
102
|
+
className: K({
|
|
103
|
+
selected: S.activeItem === d,
|
|
99
104
|
inFilter: u
|
|
100
105
|
})
|
|
101
106
|
}, /* @__PURE__ */ e.createElement(l, {
|
|
102
|
-
className:
|
|
107
|
+
className: j,
|
|
103
108
|
onClick: () => {
|
|
104
109
|
t(d);
|
|
105
110
|
},
|
|
@@ -120,22 +125,19 @@ function g({
|
|
|
120
125
|
onSelect: i,
|
|
121
126
|
...d
|
|
122
127
|
}) {
|
|
123
|
-
const [s, l] = E(a, [{ type: c }]), r = b(
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
{
|
|
127
|
-
onSelect: i ? (o) => i(o) : () => {
|
|
128
|
-
}
|
|
128
|
+
const [s, l] = E(a, [{ type: c }]), r = b(s, (m) => m.type === c ? [
|
|
129
|
+
{
|
|
130
|
+
onSelect: i ? (o) => i(o) : () => {
|
|
129
131
|
}
|
|
130
|
-
|
|
131
|
-
);
|
|
132
|
+
}
|
|
133
|
+
] : []);
|
|
132
134
|
return /* @__PURE__ */ e.createElement("div", {
|
|
133
|
-
className:
|
|
135
|
+
className: W,
|
|
134
136
|
...d
|
|
135
137
|
}, t && /* @__PURE__ */ e.createElement("div", {
|
|
136
|
-
className:
|
|
138
|
+
className: J
|
|
137
139
|
}, t), /* @__PURE__ */ e.createElement("ul", {
|
|
138
|
-
className:
|
|
140
|
+
className: x
|
|
139
141
|
}, r), l);
|
|
140
142
|
}
|
|
141
143
|
h.set(g, {
|
|
@@ -144,11 +146,7 @@ h.set(g, {
|
|
|
144
146
|
title: { type: "string" }
|
|
145
147
|
}
|
|
146
148
|
});
|
|
147
|
-
|
|
148
|
-
filterValue: "",
|
|
149
|
-
activeItem: ""
|
|
150
|
-
});
|
|
151
|
-
function O({
|
|
149
|
+
function P({
|
|
152
150
|
children: a,
|
|
153
151
|
className: n,
|
|
154
152
|
activeNavItem: t,
|
|
@@ -156,32 +154,37 @@ function O({
|
|
|
156
154
|
filterInputPlaceholder: d,
|
|
157
155
|
...s
|
|
158
156
|
}) {
|
|
159
|
-
const [
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
157
|
+
const [
|
|
158
|
+
l,
|
|
159
|
+
r,
|
|
160
|
+
m
|
|
161
|
+
] = E(a, [
|
|
162
|
+
{ type: C },
|
|
163
|
+
{ type: g },
|
|
164
|
+
{ type: c }
|
|
165
|
+
]), o = e.useRef(t), [I, u] = e.useState(t), [y, S] = e.useState(""), N = (v) => {
|
|
166
|
+
u(v);
|
|
167
|
+
}, f = b(m, (v) => v.type === c ? [
|
|
168
|
+
{
|
|
169
|
+
onSelect: (k) => N(k)
|
|
170
|
+
}
|
|
171
|
+
] : []), O = b(
|
|
167
172
|
r,
|
|
168
173
|
(v) => v.type === g ? [
|
|
169
174
|
{
|
|
170
|
-
onSelect: (k) =>
|
|
175
|
+
onSelect: (k) => N(k)
|
|
171
176
|
}
|
|
172
177
|
] : []
|
|
173
|
-
)
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
return t !== o.current && (u(t), o.current = t), /* @__PURE__ */ e.createElement(P.Provider, {
|
|
177
|
-
value: { filterValue: y, activeItem: N }
|
|
178
|
+
);
|
|
179
|
+
return t !== o.current && (u(t), o.current = t), /* @__PURE__ */ e.createElement(_.Provider, {
|
|
180
|
+
value: { filterValue: y, activeItem: I }
|
|
178
181
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
179
|
-
className:
|
|
182
|
+
className: V(D),
|
|
180
183
|
...s
|
|
181
184
|
}, l, i && /* @__PURE__ */ e.createElement("div", {
|
|
182
|
-
className: B
|
|
183
|
-
}, /* @__PURE__ */ e.createElement("div", {
|
|
184
185
|
className: L
|
|
186
|
+
}, /* @__PURE__ */ e.createElement("div", {
|
|
187
|
+
className: z
|
|
185
188
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
186
189
|
className: "sps-text-input"
|
|
187
190
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
@@ -193,13 +196,13 @@ function O({
|
|
|
193
196
|
className: "sps-text-input__input",
|
|
194
197
|
placeholder: d,
|
|
195
198
|
onChange: (v) => {
|
|
196
|
-
|
|
199
|
+
S(v.target.value);
|
|
197
200
|
}
|
|
198
|
-
}))))),
|
|
199
|
-
className:
|
|
200
|
-
},
|
|
201
|
+
}))))), O, /* @__PURE__ */ e.createElement("ul", {
|
|
202
|
+
className: x
|
|
203
|
+
}, f)));
|
|
201
204
|
}
|
|
202
|
-
h.set(
|
|
205
|
+
h.set(P, {
|
|
203
206
|
name: "SideNav",
|
|
204
207
|
props: {
|
|
205
208
|
activeNavItem: { type: "string", required: !0 },
|
|
@@ -207,9 +210,14 @@ h.set(O, {
|
|
|
207
210
|
filterInputPlaceholder: { type: "string" }
|
|
208
211
|
}
|
|
209
212
|
});
|
|
210
|
-
const
|
|
213
|
+
const X = {
|
|
211
214
|
description: () => /* @__PURE__ */ e.createElement("p", null, "Side Navigations are used to provide quick access to a series of related pages or content. It can be used to navigate between different page views, or as an anchor-style menu to scroll to specific content on the same page."),
|
|
212
|
-
components: [
|
|
215
|
+
components: [
|
|
216
|
+
P,
|
|
217
|
+
C,
|
|
218
|
+
g,
|
|
219
|
+
c
|
|
220
|
+
],
|
|
213
221
|
examples: {
|
|
214
222
|
general: {
|
|
215
223
|
label: "Usage",
|
|
@@ -503,14 +511,13 @@ const Q = {
|
|
|
503
511
|
}
|
|
504
512
|
}
|
|
505
513
|
}
|
|
506
|
-
},
|
|
507
|
-
"Side Navigation":
|
|
514
|
+
}, ee = {
|
|
515
|
+
"Side Navigation": X
|
|
508
516
|
};
|
|
509
517
|
export {
|
|
510
|
-
|
|
511
|
-
|
|
518
|
+
ee as MANIFEST,
|
|
519
|
+
P as SideNav,
|
|
512
520
|
C as SideNavHeader,
|
|
513
521
|
c as SideNavItem,
|
|
514
|
-
g as SideNavSection
|
|
515
|
-
P as navContext
|
|
522
|
+
g as SideNavSection
|
|
516
523
|
};
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { ComponentProps } from "@sps-woodland/core";
|
|
3
|
-
export declare const navContext: React.Context<{
|
|
4
|
-
filterValue: string;
|
|
5
|
-
activeItem: string;
|
|
6
|
-
}>;
|
|
2
|
+
import type { ComponentProps } from "@sps-woodland/core";
|
|
7
3
|
export declare function SideNav({ children, className, activeNavItem, filterable, filterInputPlaceholder, ...rest }: ComponentProps<{
|
|
8
4
|
activeNavItem: string;
|
|
9
5
|
filterable?: boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { ComponentProps } from "@sps-woodland/core";
|
|
3
|
-
export declare function SideNavHeader({ children, className, ...rest }: ComponentProps<
|
|
2
|
+
import type { ComponentProps } from "@sps-woodland/core";
|
|
3
|
+
export declare function SideNavHeader({ children, className, ...rest }: ComponentProps<unknown, HTMLDivElement>): React.ReactElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { PolymorphicComponentProps } from "@sps-woodland/core";
|
|
2
|
+
import type { PolymorphicComponentProps } from "@sps-woodland/core";
|
|
3
3
|
declare type SideNavItemProps<T extends React.ElementType> = PolymorphicComponentProps<{
|
|
4
4
|
onSelect: (key: string) => void;
|
|
5
5
|
keyId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { ComponentProps } from "@sps-woodland/core";
|
|
2
|
+
import type { ComponentProps } from "@sps-woodland/core";
|
|
3
3
|
export declare function SideNavSection({ children, className, title, onSelect, ...rest }: ComponentProps<{
|
|
4
4
|
title?: string;
|
|
5
5
|
onSelect?: (string: string) => void;
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sps-woodland/side-nav",
|
|
3
3
|
"description": "SPS Woodland Design System side navigation components",
|
|
4
|
-
"version": "8.0.
|
|
4
|
+
"version": "8.0.4",
|
|
5
5
|
"author": "SPS Commerce",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/side-nav",
|
|
8
8
|
"homepage": "https://github.com/SPSCommerce/woodland/tree/master/packages/@sps-woodland/side-nav#readme",
|
|
9
9
|
"type": "module",
|
|
10
|
+
"module": "./lib/index.es.js",
|
|
10
11
|
"main": "./lib/index.cjs.js",
|
|
11
12
|
"types": "./lib/index.d.ts",
|
|
12
13
|
"exports": {
|
|
@@ -21,7 +22,6 @@
|
|
|
21
22
|
"require": "./lib/style.css"
|
|
22
23
|
}
|
|
23
24
|
},
|
|
24
|
-
"module": "./lib/index.es.js",
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@spscommerce/utils": "^6.12.1",
|
|
30
30
|
"react": "^16.9.0",
|
|
31
31
|
"react-dom": "^16.9.0",
|
|
32
|
-
"@sps-woodland/core": "8.0.
|
|
33
|
-
"@sps-woodland/tokens": "8.0.
|
|
32
|
+
"@sps-woodland/core": "8.0.4",
|
|
33
|
+
"@sps-woodland/tokens": "8.0.4"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@vanilla-extract/css": "^1.9.3",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@spscommerce/utils": "^6.12.1",
|
|
39
39
|
"react": "^16.9.0",
|
|
40
40
|
"react-dom": "^16.9.0",
|
|
41
|
-
"@sps-woodland/core": "8.0.
|
|
42
|
-
"@sps-woodland/tokens": "8.0.
|
|
41
|
+
"@sps-woodland/core": "8.0.4",
|
|
42
|
+
"@sps-woodland/tokens": "8.0.4"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "pnpm run build:js && pnpm run build:types",
|