@spectrum-web-components/sidenav 0.12.4 → 0.12.6

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.
Files changed (43) hide show
  1. package/custom-elements.json +2 -2
  2. package/package.json +6 -6
  3. package/sp-sidenav-heading.d.ts +0 -6
  4. package/sp-sidenav-heading.js +0 -14
  5. package/sp-sidenav-heading.js.map +0 -1
  6. package/sp-sidenav-item.d.ts +0 -6
  7. package/sp-sidenav-item.js +0 -14
  8. package/sp-sidenav-item.js.map +0 -1
  9. package/sp-sidenav.d.ts +0 -6
  10. package/sp-sidenav.js +0 -14
  11. package/sp-sidenav.js.map +0 -1
  12. package/src/Sidenav.d.ts +0 -38
  13. package/src/Sidenav.js +0 -154
  14. package/src/Sidenav.js.map +0 -1
  15. package/src/SidenavHeading.d.ts +0 -12
  16. package/src/SidenavHeading.js +0 -48
  17. package/src/SidenavHeading.js.map +0 -1
  18. package/src/SidenavItem.d.ts +0 -35
  19. package/src/SidenavItem.js +0 -154
  20. package/src/SidenavItem.js.map +0 -1
  21. package/src/index.d.ts +0 -3
  22. package/src/index.js +0 -15
  23. package/src/index.js.map +0 -1
  24. package/src/sidenav-heading.css.d.ts +0 -2
  25. package/src/sidenav-heading.css.js +0 -69
  26. package/src/sidenav-heading.css.js.map +0 -1
  27. package/src/sidenav-item.css.d.ts +0 -2
  28. package/src/sidenav-item.css.js +0 -125
  29. package/src/sidenav-item.css.js.map +0 -1
  30. package/src/sidenav.css.d.ts +0 -2
  31. package/src/sidenav.css.js +0 -23
  32. package/src/sidenav.css.js.map +0 -1
  33. package/src/spectrum-sidenav-heading.css.d.ts +0 -2
  34. package/src/spectrum-sidenav-heading.css.js +0 -69
  35. package/src/spectrum-sidenav-heading.css.js.map +0 -1
  36. package/src/spectrum-sidenav-item.css.d.ts +0 -2
  37. package/src/spectrum-sidenav-item.css.js +0 -97
  38. package/src/spectrum-sidenav-item.css.js.map +0 -1
  39. package/src/spectrum-sidenav.css.d.ts +0 -2
  40. package/src/spectrum-sidenav.css.js +0 -19
  41. package/src/spectrum-sidenav.css.js.map +0 -1
  42. package/stories/sidenav.stories.js +0 -147
  43. package/stories/sidenav.stories.js.map +0 -1
@@ -1,97 +0,0 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { css } from '@spectrum-web-components/base';
13
- const styles = css `
14
- #list{--spectrum-sidenav-item-padding-y:var(
15
- --spectrum-global-dimension-size-65
16
- );list-style-type:none;margin:0;padding:0}:host{list-style-type:none;margin-bottom:var(
17
- --spectrum-sidenav-item-gap,var(--spectrum-global-dimension-size-50)
18
- );margin-left:0;margin-right:0;margin-top:var(
19
- --spectrum-sidenav-item-gap,var(--spectrum-global-dimension-size-50)
20
- )}#item-link{align-items:center;border-radius:var(
21
- --spectrum-sidenav-item-border-radius,var(--spectrum-alias-border-radius-regular)
22
- );box-sizing:border-box;cursor:pointer;display:inline-flex;font-size:var(
23
- --spectrum-sidenav-item-text-size,var(--spectrum-alias-font-size-default)
24
- );font-style:normal;font-weight:var(
25
- --spectrum-sidenav-item-text-font-weight,var(--spectrum-global-font-weight-regular)
26
- );-webkit-hyphens:auto;hyphens:auto;justify-content:left;min-height:var(
27
- --spectrum-sidenav-item-height,var(--spectrum-alias-single-line-height)
28
- );padding:var(--spectrum-sidenav-item-padding-y) var(
29
- --spectrum-sidenav-item-padding-x,var(--spectrum-global-dimension-size-150)
30
- );position:relative;text-decoration:none;transition:background-color var(--spectrum-global-animation-duration-100,.13s) ease-out,color var(--spectrum-global-animation-duration-100,.13s) ease-out;width:100%;word-break:break-word}#item-link:focus{outline:none}#item-link:before{border:var(
31
- --spectrum-tabs-m-focus-ring-size,var(--spectrum-alias-border-size-thick)
32
- ) solid transparent;border-radius:var(
33
- --spectrum-sidenav-item-border-radius,var(--spectrum-alias-border-radius-regular)
34
- );bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0;transition:border var(--spectrum-global-animation-duration-100,.13s) ease-out}:host([dir=ltr]) #item-link ::slotted([slot=icon]){margin-right:var(
35
- --spectrum-sidenav-icon-gap,var(--spectrum-global-dimension-size-100)
36
- )}:host([dir=rtl]) #item-link ::slotted([slot=icon]){margin-left:var(
37
- --spectrum-sidenav-icon-gap,var(--spectrum-global-dimension-size-100)
38
- )}#item-link ::slotted([slot=icon]){flex-shrink:0}:host([dir=ltr]) .spectrum-SideNav-heading{margin-right:0}:host([dir=rtl]) .spectrum-SideNav-heading{margin-left:0}:host([dir=ltr]) .spectrum-SideNav-heading{margin-left:0}:host([dir=rtl]) .spectrum-SideNav-heading{margin-right:0}:host([dir=ltr]) .spectrum-SideNav--multiLevel #list #item-link{padding-left:calc(var(
39
- --spectrum-sidenav-multilevel-item-margin-left,
40
- var(--spectrum-global-dimension-size-150)
41
- ) + var(
42
- --spectrum-sidenav-item-padding-x,
43
- var(--spectrum-global-dimension-size-150)
44
- ))}:host([dir=rtl]) .spectrum-SideNav--multiLevel #list #item-link{padding-right:calc(var(
45
- --spectrum-sidenav-multilevel-item-margin-left,
46
- var(--spectrum-global-dimension-size-150)
47
- ) + var(
48
- --spectrum-sidenav-item-padding-x,
49
- var(--spectrum-global-dimension-size-150)
50
- ))}:host([dir=ltr]) .spectrum-SideNav--multiLevel #list #list #item-link{padding-left:calc(var(
51
- --spectrum-sidenav-multilevel-item-margin-left,
52
- var(--spectrum-global-dimension-size-150)
53
- ) + var(
54
- --spectrum-sidenav-item-padding-x,
55
- var(--spectrum-global-dimension-size-150)
56
- ))}:host([dir=rtl]) .spectrum-SideNav--multiLevel #list #list #item-link{padding-right:calc(var(
57
- --spectrum-sidenav-multilevel-item-margin-left,
58
- var(--spectrum-global-dimension-size-150)
59
- ) + var(
60
- --spectrum-sidenav-item-padding-x,
61
- var(--spectrum-global-dimension-size-150)
62
- ))}:host([selected])>#item-link{background-color:var(
63
- --spectrum-sidenav-item-background-color-selected,var(--spectrum-alias-highlight-hover)
64
- );color:var(
65
- --spectrum-sidenav-item-text-color-selected,var(--spectrum-alias-text-color-hover)
66
- )}.is-active>#item-link{background-color:var(
67
- --spectrum-sidenav-item-background-color-down,var(--spectrum-alias-highlight-hover)
68
- )}:host([disabled]) #item-link{background-color:var(
69
- --spectrum-sidenav-item-background-color-disabled,var(--spectrum-alias-background-color-transparent)
70
- );color:var(
71
- --spectrum-sidenav-item-text-color-disabled,var(--spectrum-alias-text-color-disabled)
72
- );cursor:default;pointer-events:none}#item-link{background-color:var(
73
- --spectrum-sidenav-item-background-color,var(--spectrum-alias-background-color-transparent)
74
- );color:var(
75
- --spectrum-sidenav-item-text-color,var(--spectrum-alias-text-color)
76
- )}#item-link:hover{background-color:var(
77
- --spectrum-sidenav-item-background-color-hover,var(--spectrum-alias-highlight-hover)
78
- );color:var(
79
- --spectrum-sidenav-item-text-color-hover,var(--spectrum-alias-text-color-hover)
80
- )}#item-link:active{background-color:var(
81
- --spectrum-sidenav-item-background-color-down,var(--spectrum-alias-highlight-hover)
82
- )}#item-link.focus-visible{background-color:var(
83
- --spectrum-sidenav-item-background-color-key-focus,var(--spectrum-alias-highlight-hover)
84
- );color:var(
85
- --spectrum-sidenav-item-text-color-key-focus,var(--spectrum-alias-text-color-hover)
86
- )}#item-link:focus-visible{background-color:var(
87
- --spectrum-sidenav-item-background-color-key-focus,var(--spectrum-alias-highlight-hover)
88
- );color:var(
89
- --spectrum-sidenav-item-text-color-key-focus,var(--spectrum-alias-text-color-hover)
90
- )}#item-link.focus-visible:before{border-color:var(
91
- --spectrum-sidenav-item-border-color-key-focus,var(--spectrum-alias-border-color-key-focus)
92
- )}#item-link:focus-visible:before{border-color:var(
93
- --spectrum-sidenav-item-border-color-key-focus,var(--spectrum-alias-border-color-key-focus)
94
- )}
95
- `;
96
- export default styles;
97
- //# sourceMappingURL=spectrum-sidenav-item.css.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spectrum-sidenav-item.css.js","sourceRoot":"","sources":["spectrum-sidenav-item.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFjB,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n#list{--spectrum-sidenav-item-padding-y:var(\n--spectrum-global-dimension-size-65\n);list-style-type:none;margin:0;padding:0}:host{list-style-type:none;margin-bottom:var(\n--spectrum-sidenav-item-gap,var(--spectrum-global-dimension-size-50)\n);margin-left:0;margin-right:0;margin-top:var(\n--spectrum-sidenav-item-gap,var(--spectrum-global-dimension-size-50)\n)}#item-link{align-items:center;border-radius:var(\n--spectrum-sidenav-item-border-radius,var(--spectrum-alias-border-radius-regular)\n);box-sizing:border-box;cursor:pointer;display:inline-flex;font-size:var(\n--spectrum-sidenav-item-text-size,var(--spectrum-alias-font-size-default)\n);font-style:normal;font-weight:var(\n--spectrum-sidenav-item-text-font-weight,var(--spectrum-global-font-weight-regular)\n);-webkit-hyphens:auto;hyphens:auto;justify-content:left;min-height:var(\n--spectrum-sidenav-item-height,var(--spectrum-alias-single-line-height)\n);padding:var(--spectrum-sidenav-item-padding-y) var(\n--spectrum-sidenav-item-padding-x,var(--spectrum-global-dimension-size-150)\n);position:relative;text-decoration:none;transition:background-color var(--spectrum-global-animation-duration-100,.13s) ease-out,color var(--spectrum-global-animation-duration-100,.13s) ease-out;width:100%;word-break:break-word}#item-link:focus{outline:none}#item-link:before{border:var(\n--spectrum-tabs-m-focus-ring-size,var(--spectrum-alias-border-size-thick)\n) solid transparent;border-radius:var(\n--spectrum-sidenav-item-border-radius,var(--spectrum-alias-border-radius-regular)\n);bottom:0;content:\"\";left:0;pointer-events:none;position:absolute;right:0;top:0;transition:border var(--spectrum-global-animation-duration-100,.13s) ease-out}:host([dir=ltr]) #item-link ::slotted([slot=icon]){margin-right:var(\n--spectrum-sidenav-icon-gap,var(--spectrum-global-dimension-size-100)\n)}:host([dir=rtl]) #item-link ::slotted([slot=icon]){margin-left:var(\n--spectrum-sidenav-icon-gap,var(--spectrum-global-dimension-size-100)\n)}#item-link ::slotted([slot=icon]){flex-shrink:0}:host([dir=ltr]) .spectrum-SideNav-heading{margin-right:0}:host([dir=rtl]) .spectrum-SideNav-heading{margin-left:0}:host([dir=ltr]) .spectrum-SideNav-heading{margin-left:0}:host([dir=rtl]) .spectrum-SideNav-heading{margin-right:0}:host([dir=ltr]) .spectrum-SideNav--multiLevel #list #item-link{padding-left:calc(var(\n--spectrum-sidenav-multilevel-item-margin-left,\nvar(--spectrum-global-dimension-size-150)\n) + var(\n--spectrum-sidenav-item-padding-x,\nvar(--spectrum-global-dimension-size-150)\n))}:host([dir=rtl]) .spectrum-SideNav--multiLevel #list #item-link{padding-right:calc(var(\n--spectrum-sidenav-multilevel-item-margin-left,\nvar(--spectrum-global-dimension-size-150)\n) + var(\n--spectrum-sidenav-item-padding-x,\nvar(--spectrum-global-dimension-size-150)\n))}:host([dir=ltr]) .spectrum-SideNav--multiLevel #list #list #item-link{padding-left:calc(var(\n--spectrum-sidenav-multilevel-item-margin-left,\nvar(--spectrum-global-dimension-size-150)\n) + var(\n--spectrum-sidenav-item-padding-x,\nvar(--spectrum-global-dimension-size-150)\n))}:host([dir=rtl]) .spectrum-SideNav--multiLevel #list #list #item-link{padding-right:calc(var(\n--spectrum-sidenav-multilevel-item-margin-left,\nvar(--spectrum-global-dimension-size-150)\n) + var(\n--spectrum-sidenav-item-padding-x,\nvar(--spectrum-global-dimension-size-150)\n))}:host([selected])>#item-link{background-color:var(\n--spectrum-sidenav-item-background-color-selected,var(--spectrum-alias-highlight-hover)\n);color:var(\n--spectrum-sidenav-item-text-color-selected,var(--spectrum-alias-text-color-hover)\n)}.is-active>#item-link{background-color:var(\n--spectrum-sidenav-item-background-color-down,var(--spectrum-alias-highlight-hover)\n)}:host([disabled]) #item-link{background-color:var(\n--spectrum-sidenav-item-background-color-disabled,var(--spectrum-alias-background-color-transparent)\n);color:var(\n--spectrum-sidenav-item-text-color-disabled,var(--spectrum-alias-text-color-disabled)\n);cursor:default;pointer-events:none}#item-link{background-color:var(\n--spectrum-sidenav-item-background-color,var(--spectrum-alias-background-color-transparent)\n);color:var(\n--spectrum-sidenav-item-text-color,var(--spectrum-alias-text-color)\n)}#item-link:hover{background-color:var(\n--spectrum-sidenav-item-background-color-hover,var(--spectrum-alias-highlight-hover)\n);color:var(\n--spectrum-sidenav-item-text-color-hover,var(--spectrum-alias-text-color-hover)\n)}#item-link:active{background-color:var(\n--spectrum-sidenav-item-background-color-down,var(--spectrum-alias-highlight-hover)\n)}#item-link.focus-visible{background-color:var(\n--spectrum-sidenav-item-background-color-key-focus,var(--spectrum-alias-highlight-hover)\n);color:var(\n--spectrum-sidenav-item-text-color-key-focus,var(--spectrum-alias-text-color-hover)\n)}#item-link:focus-visible{background-color:var(\n--spectrum-sidenav-item-background-color-key-focus,var(--spectrum-alias-highlight-hover)\n);color:var(\n--spectrum-sidenav-item-text-color-key-focus,var(--spectrum-alias-text-color-hover)\n)}#item-link.focus-visible:before{border-color:var(\n--spectrum-sidenav-item-border-color-key-focus,var(--spectrum-alias-border-color-key-focus)\n)}#item-link:focus-visible:before{border-color:var(\n--spectrum-sidenav-item-border-color-key-focus,var(--spectrum-alias-border-color-key-focus)\n)}\n`;\nexport default styles;"]}
@@ -1,2 +0,0 @@
1
- declare const styles: import("@spectrum-web-components/base").CSSResult;
2
- export default styles;
@@ -1,19 +0,0 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { css } from '@spectrum-web-components/base';
13
- const styles = css `
14
- :host{--spectrum-sidenav-item-padding-y:var(
15
- --spectrum-global-dimension-size-65
16
- )}:host{list-style-type:none;margin:0;padding:0}
17
- `;
18
- export default styles;
19
- //# sourceMappingURL=spectrum-sidenav.css.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spectrum-sidenav.css.js","sourceRoot":"","sources":["spectrum-sidenav.css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAC;AACpD,MAAM,MAAM,GAAG,GAAG,CAAA;;;;CAIjB,CAAC;AACF,eAAe,MAAM,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { css } from '@spectrum-web-components/base';\nconst styles = css`\n:host{--spectrum-sidenav-item-padding-y:var(\n--spectrum-global-dimension-size-65\n)}:host{list-style-type:none;margin:0;padding:0}\n`;\nexport default styles;"]}
@@ -1,147 +0,0 @@
1
- /*
2
- Copyright 2020 Adobe. All rights reserved.
3
- This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License. You may obtain a copy
5
- of the License at http://www.apache.org/licenses/LICENSE-2.0
6
-
7
- Unless required by applicable law or agreed to in writing, software distributed under
8
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- OF ANY KIND, either express or implied. See the License for the specific language
10
- governing permissions and limitations under the License.
11
- */
12
- import { html } from '@spectrum-web-components/base';
13
- import '../sp-sidenav.js';
14
- import '../sp-sidenav-item.js';
15
- import '../sp-sidenav-heading.js';
16
- export default {
17
- component: 'sp-sidenav',
18
- title: 'Sidenav',
19
- argTypes: {
20
- onChange: { action: 'change' },
21
- },
22
- };
23
- export const Default = ({ onChange, }) => {
24
- return html `
25
- <sp-sidenav @change=${onChange} value="Section 2">
26
- <sp-sidenav-item
27
- value="Section 1"
28
- label="Section 1"
29
- ></sp-sidenav-item>
30
- <sp-sidenav-item
31
- selected
32
- value="Section 2"
33
- label="Section 2"
34
- ></sp-sidenav-item>
35
- <sp-sidenav-heading label="CATEGORY 1">
36
- <sp-sidenav-item
37
- value="Section 3"
38
- label="Section 3"
39
- ></sp-sidenav-item>
40
- <sp-sidenav-item
41
- value="Section 4"
42
- label="Section 4"
43
- ></sp-sidenav-item>
44
- </sp-sidenav-heading>
45
- </sp-sidenav>
46
- `;
47
- };
48
- export const Multilevel = ({ onChange, }) => {
49
- return html `
50
- <sp-sidenav variant="multilevel" value="2.3.1" @change=${onChange}>
51
- <sp-sidenav-item value="foo" label="foo"></sp-sidenav-item>
52
- <sp-sidenav-item value="baz" label="baz" expanded>
53
- <sp-sidenav-item value="2.1" label="2.1"></sp-sidenav-item>
54
- <sp-sidenav-item value="2.2" label="2.2"></sp-sidenav-item>
55
- <sp-sidenav-item value="2.3" label="2.3" expanded>
56
- <sp-sidenav-item
57
- value="2.3.1"
58
- label="2.3.1"
59
- ></sp-sidenav-item>
60
- <sp-sidenav-item
61
- disabled
62
- value="2.3.2"
63
- label="2.3.2"
64
- ></sp-sidenav-item>
65
- </sp-sidenav-item>
66
- </sp-sidenav-item>
67
- <sp-sidenav-item value="test" label="test"></sp-sidenav-item>
68
- <sp-sidenav-item value="hi" label="hi"></sp-sidenav-item>
69
- </sp-sidenav>
70
- `;
71
- };
72
- Multilevel.story = {
73
- name: 'Multi-level',
74
- };
75
- export const levelsAndDisabled = () => {
76
- return html `
77
- <sp-sidenav>
78
- <sp-sidenav-heading label="CATEGORY 1">
79
- <sp-sidenav-item value="Section 1">Section 1</sp-sidenav-item>
80
- <sp-sidenav-item value="Section 2" disabled>
81
- Section 2
82
- </sp-sidenav-item>
83
- <sp-sidenav-item value="Section 3" expanded>
84
- Section 3
85
- <sp-sidenav-item value="Section 3a">
86
- Section 3a
87
- </sp-sidenav-item>
88
- </sp-sidenav-item>
89
- </sp-sidenav-heading>
90
- </sp-sidenav>
91
- `;
92
- };
93
- export const manageTabIndex = () => {
94
- return html `
95
- <sp-sidenav manage-tab-index>
96
- <sp-sidenav-heading label="CATEGORY 1">
97
- <sp-sidenav-item
98
- value="Section 0"
99
- label="Section 0"
100
- ></sp-sidenav-item>
101
- <sp-sidenav-item
102
- value="Section 1"
103
- label="Section 1"
104
- selected
105
- ></sp-sidenav-item>
106
- <sp-sidenav-item
107
- value="Section 2"
108
- label="Section 2"
109
- disabled
110
- ></sp-sidenav-item>
111
- <sp-sidenav-item value="Section 3" label="Section 3">
112
- <sp-sidenav-item
113
- value="Section 3a"
114
- label="Section 3a"
115
- ></sp-sidenav-item>
116
- </sp-sidenav-item>
117
- </sp-sidenav-heading>
118
- </sp-sidenav>
119
- `;
120
- };
121
- export const Hrefs = ({ onChange, }) => {
122
- return html `
123
- <sp-sidenav @change=${onChange} value="current">
124
- <sp-sidenav-heading label="GITHUB">
125
- <sp-sidenav-item
126
- href=${window.location.href}
127
- label="Current"
128
- value="current"
129
- selected
130
- ></sp-sidenav-item>
131
- <sp-sidenav-item
132
- href="https://github.com/adobe/spectrum-web-components"
133
- label="Code"
134
- ></sp-sidenav-item>
135
- <sp-sidenav-item
136
- href="https://github.com/adobe/spectrum-web-components/issues"
137
- label="Issues"
138
- ></sp-sidenav-item>
139
- <sp-sidenav-item
140
- href="https://github.com/adobe/spectrum-web-components/pulls"
141
- label="Pull Requests"
142
- ></sp-sidenav-item>
143
- </sp-sidenav-heading>
144
- </sp-sidenav>
145
- `;
146
- };
147
- //# sourceMappingURL=sidenav.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sidenav.stories.js","sourceRoot":"","sources":["sidenav.stories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,OAAO,EAAE,IAAI,EAAkB,MAAM,+BAA+B,CAAC;AAErE,OAAO,kBAAkB,CAAC;AAC1B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,0BAA0B,CAAC;AAElC,eAAe;IACX,SAAS,EAAE,YAAY;IACvB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE;QACN,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;KACjC;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EACpB,QAAQ,GAGX,EAAkB,EAAE;IACjB,OAAO,IAAI,CAAA;8BACe,QAAQ;;;;;;;;;;;;;;;;;;;;;KAqBjC,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACvB,QAAQ,GAGX,EAAkB,EAAE;IACjB,OAAO,IAAI,CAAA;iEACkD,QAAQ;;;;;;;;;;;;;;;;;;;;KAoBpE,CAAC;AACN,CAAC,CAAC;AAEF,UAAU,CAAC,KAAK,GAAG;IACf,IAAI,EAAE,aAAa;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAmB,EAAE;IAClD,OAAO,IAAI,CAAA;;;;;;;;;;;;;;;KAeV,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAmB,EAAE;IAC/C,OAAO,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;KAyBV,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAClB,QAAQ,GAGX,EAAkB,EAAE;IACjB,OAAO,IAAI,CAAA;8BACe,QAAQ;;;2BAGX,MAAM,CAAC,QAAQ,CAAC,IAAI;;;;;;;;;;;;;;;;;;;KAmB1C,CAAC;AACN,CAAC,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '../sp-sidenav.js';\nimport '../sp-sidenav-item.js';\nimport '../sp-sidenav-heading.js';\n\nexport default {\n component: 'sp-sidenav',\n title: 'Sidenav',\n argTypes: {\n onChange: { action: 'change' },\n },\n};\n\nexport const Default = ({\n onChange,\n}: {\n onChange: () => void;\n}): TemplateResult => {\n return html`\n <sp-sidenav @change=${onChange} value=\"Section 2\">\n <sp-sidenav-item\n value=\"Section 1\"\n label=\"Section 1\"\n ></sp-sidenav-item>\n <sp-sidenav-item\n selected\n value=\"Section 2\"\n label=\"Section 2\"\n ></sp-sidenav-item>\n <sp-sidenav-heading label=\"CATEGORY 1\">\n <sp-sidenav-item\n value=\"Section 3\"\n label=\"Section 3\"\n ></sp-sidenav-item>\n <sp-sidenav-item\n value=\"Section 4\"\n label=\"Section 4\"\n ></sp-sidenav-item>\n </sp-sidenav-heading>\n </sp-sidenav>\n `;\n};\n\nexport const Multilevel = ({\n onChange,\n}: {\n onChange: () => void;\n}): TemplateResult => {\n return html`\n <sp-sidenav variant=\"multilevel\" value=\"2.3.1\" @change=${onChange}>\n <sp-sidenav-item value=\"foo\" label=\"foo\"></sp-sidenav-item>\n <sp-sidenav-item value=\"baz\" label=\"baz\" expanded>\n <sp-sidenav-item value=\"2.1\" label=\"2.1\"></sp-sidenav-item>\n <sp-sidenav-item value=\"2.2\" label=\"2.2\"></sp-sidenav-item>\n <sp-sidenav-item value=\"2.3\" label=\"2.3\" expanded>\n <sp-sidenav-item\n value=\"2.3.1\"\n label=\"2.3.1\"\n ></sp-sidenav-item>\n <sp-sidenav-item\n disabled\n value=\"2.3.2\"\n label=\"2.3.2\"\n ></sp-sidenav-item>\n </sp-sidenav-item>\n </sp-sidenav-item>\n <sp-sidenav-item value=\"test\" label=\"test\"></sp-sidenav-item>\n <sp-sidenav-item value=\"hi\" label=\"hi\"></sp-sidenav-item>\n </sp-sidenav>\n `;\n};\n\nMultilevel.story = {\n name: 'Multi-level',\n};\n\nexport const levelsAndDisabled = (): TemplateResult => {\n return html`\n <sp-sidenav>\n <sp-sidenav-heading label=\"CATEGORY 1\">\n <sp-sidenav-item value=\"Section 1\">Section 1</sp-sidenav-item>\n <sp-sidenav-item value=\"Section 2\" disabled>\n Section 2\n </sp-sidenav-item>\n <sp-sidenav-item value=\"Section 3\" expanded>\n Section 3\n <sp-sidenav-item value=\"Section 3a\">\n Section 3a\n </sp-sidenav-item>\n </sp-sidenav-item>\n </sp-sidenav-heading>\n </sp-sidenav>\n `;\n};\n\nexport const manageTabIndex = (): TemplateResult => {\n return html`\n <sp-sidenav manage-tab-index>\n <sp-sidenav-heading label=\"CATEGORY 1\">\n <sp-sidenav-item\n value=\"Section 0\"\n label=\"Section 0\"\n ></sp-sidenav-item>\n <sp-sidenav-item\n value=\"Section 1\"\n label=\"Section 1\"\n selected\n ></sp-sidenav-item>\n <sp-sidenav-item\n value=\"Section 2\"\n label=\"Section 2\"\n disabled\n ></sp-sidenav-item>\n <sp-sidenav-item value=\"Section 3\" label=\"Section 3\">\n <sp-sidenav-item\n value=\"Section 3a\"\n label=\"Section 3a\"\n ></sp-sidenav-item>\n </sp-sidenav-item>\n </sp-sidenav-heading>\n </sp-sidenav>\n `;\n};\n\nexport const Hrefs = ({\n onChange,\n}: {\n onChange: () => void;\n}): TemplateResult => {\n return html`\n <sp-sidenav @change=${onChange} value=\"current\">\n <sp-sidenav-heading label=\"GITHUB\">\n <sp-sidenav-item\n href=${window.location.href}\n label=\"Current\"\n value=\"current\"\n selected\n ></sp-sidenav-item>\n <sp-sidenav-item\n href=\"https://github.com/adobe/spectrum-web-components\"\n label=\"Code\"\n ></sp-sidenav-item>\n <sp-sidenav-item\n href=\"https://github.com/adobe/spectrum-web-components/issues\"\n label=\"Issues\"\n ></sp-sidenav-item>\n <sp-sidenav-item\n href=\"https://github.com/adobe/spectrum-web-components/pulls\"\n label=\"Pull Requests\"\n ></sp-sidenav-item>\n </sp-sidenav-heading>\n </sp-sidenav>\n `;\n};\n"]}