@covalent/components 0.0.0-COVALENT
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/.babelrc +10 -0
- package/.eslintrc.json +18 -0
- package/.storybook/main.js +34 -0
- package/.storybook/manager-head.html +62 -0
- package/.storybook/manager.js +1 -0
- package/.storybook/preview-head.html +20 -0
- package/.storybook/preview.js +20 -0
- package/README.md +179 -0
- package/component-config.json +313 -0
- package/index.html +288 -0
- package/jest.config.js +18 -0
- package/package.json +315 -0
- package/project.json +104 -0
- package/public/index.scss +1 -0
- package/public/reset.css +128 -0
- package/src/action-ribbon/_action-ribbon.theme.scss +90 -0
- package/src/action-ribbon/action-ribbon-base.ts +164 -0
- package/src/action-ribbon/action-ribbon.scss +20 -0
- package/src/action-ribbon/action-ribbon.spec.ts +11 -0
- package/src/action-ribbon/action-ribbon.stories.js +78 -0
- package/src/action-ribbon/action-ribbon.ts +26 -0
- package/src/alert/_alert.theme.scss +116 -0
- package/src/alert/alert-base.ts +175 -0
- package/src/alert/alert.scss +55 -0
- package/src/alert/alert.spec.ts +26 -0
- package/src/alert/alert.stories.js +76 -0
- package/src/alert/alert.ts +26 -0
- package/src/app-shell/app-shell.scss +387 -0
- package/src/app-shell/app-shell.stories.js +323 -0
- package/src/app-shell/app-shell.ts +388 -0
- package/src/badge/badge.scss +60 -0
- package/src/badge/badge.spec.ts +40 -0
- package/src/badge/badge.stories.js +88 -0
- package/src/badge/badge.ts +122 -0
- package/src/button/Overview.mdx +160 -0
- package/src/button/button.scss +28 -0
- package/src/button/button.spec.ts +11 -0
- package/src/button/button.stories.js +102 -0
- package/src/button/button.ts +17 -0
- package/src/card/card-base.ts +69 -0
- package/src/card/card.scss +45 -0
- package/src/card/card.spec.ts +11 -0
- package/src/card/card.ts +21 -0
- package/src/card/cards.stories.js +40 -0
- package/src/checkbox/checkbox.scss +8 -0
- package/src/checkbox/checkbox.spec.ts +11 -0
- package/src/checkbox/checkbox.stories.js +61 -0
- package/src/checkbox/checkbox.ts +18 -0
- package/src/chips/chip-base.ts +276 -0
- package/src/chips/chip-set-base.ts +184 -0
- package/src/chips/chip-set.scss +15 -0
- package/src/chips/chip-set.spec.ts +11 -0
- package/src/chips/chip-set.ts +27 -0
- package/src/chips/chip.scss +40 -0
- package/src/chips/chip.spec.ts +11 -0
- package/src/chips/chip.ts +26 -0
- package/src/chips/chips.stories.js +81 -0
- package/src/circular-progress/circular-progress.spec.ts +11 -0
- package/src/circular-progress/circular-progress.stories.js +40 -0
- package/src/circular-progress/circular-progress.ts +16 -0
- package/src/code-editor/code-editor.scss +20 -0
- package/src/code-editor/code-editor.spec.ts +11 -0
- package/src/code-editor/code-editor.stories.js +44 -0
- package/src/code-editor/code-editor.theme.ts +199 -0
- package/src/code-editor/code-editor.ts +231 -0
- package/src/code-snippet/code-snippet.scss +126 -0
- package/src/code-snippet/code-snippet.spec.ts +11 -0
- package/src/code-snippet/code-snippet.stories.js +134 -0
- package/src/code-snippet/code-snippet.ts +93 -0
- package/src/data-table/_data-table.theme.scss +39 -0
- package/src/data-table/data-table.stories.js +24 -0
- package/src/data-table/data-table.stories.scss +11 -0
- package/src/dialog/Overview.mdx +39 -0
- package/src/dialog/dialog.scss +17 -0
- package/src/dialog/dialog.spec.ts +11 -0
- package/src/dialog/dialog.stories.js +89 -0
- package/src/dialog/dialog.ts +44 -0
- package/src/drawer/drawer.scss +4 -0
- package/src/drawer/drawer.spec.ts +11 -0
- package/src/drawer/drawer.ts +18 -0
- package/src/empty-state/_empty-state.theme.scss +0 -0
- package/src/empty-state/empty-state.scss +67 -0
- package/src/empty-state/empty-state.spec.ts +11 -0
- package/src/empty-state/empty-state.stories.js +117 -0
- package/src/empty-state/empty-state.ts +61 -0
- package/src/expansion-panel/Overview.mdx +108 -0
- package/src/expansion-panel/expansion-panel-incorrect-example.png +0 -0
- package/src/expansion-panel/expansion-panel-item.scss +243 -0
- package/src/expansion-panel/expansion-panel-item.ts +95 -0
- package/src/expansion-panel/expansion-panel.spec.ts +11 -0
- package/src/expansion-panel/expansion-panel.stories.js +76 -0
- package/src/expansion-panel/expansion-panel.ts +94 -0
- package/src/focused-page/focused-page.scss +113 -0
- package/src/focused-page/focused-page.spec.ts +11 -0
- package/src/focused-page/focused-page.stories.js +167 -0
- package/src/focused-page/focused-page.ts +201 -0
- package/src/formfield/formfield.scss +8 -0
- package/src/formfield/formfield.spec.ts +11 -0
- package/src/formfield/formfield.ts +24 -0
- package/src/full-screen-dialog/full-screen-dialog.scss +37 -0
- package/src/full-screen-dialog/full-screen-dialog.spec.ts +11 -0
- package/src/full-screen-dialog/full-screen-dialog.stories.js +172 -0
- package/src/full-screen-dialog/full-screen-dialog.ts +84 -0
- package/src/icon/_icon-list.ts +316 -0
- package/src/icon/icon-demo.scss +25 -0
- package/src/icon/icon-demo.ts +37 -0
- package/src/icon/icon.spec.ts +11 -0
- package/src/icon/icon.stories.js +55 -0
- package/src/icon/icon.ts +16 -0
- package/src/icon-button/_icon-button.theme.scss +9 -0
- package/src/icon-button/icon-button.scss +12 -0
- package/src/icon-button/icon-button.spec.ts +11 -0
- package/src/icon-button/icon-button.stories.js +24 -0
- package/src/icon-button/icon-button.ts +19 -0
- package/src/icon-button-toggle/icon-button-toggle.scss +19 -0
- package/src/icon-button-toggle/icon-button-toggle.spec.ts +11 -0
- package/src/icon-button-toggle/icon-button-toggle.stories.js +32 -0
- package/src/icon-button-toggle/icon-button-toggle.ts +50 -0
- package/src/icon-checkbox/icon-check-toggle.ts +64 -0
- package/src/icon-checkbox/icon-check.spec.ts +11 -0
- package/src/icon-checkbox/icon-checkbox.scss +95 -0
- package/src/icon-checkbox/icon-checkbox.stories.js +77 -0
- package/src/icon-lockup/icon-lockup.scss +47 -0
- package/src/icon-lockup/icon-lockup.spec.ts +11 -0
- package/src/icon-lockup/icon-lockup.stories.js +93 -0
- package/src/icon-lockup/icon-lockup.ts +125 -0
- package/src/icon-radio/icon-radio-toggle.ts +43 -0
- package/src/icon-radio/icon-radio.scss +63 -0
- package/src/icon-radio/icon-radio.spec.ts +11 -0
- package/src/icon-radio/icon-radio.stories.js +23 -0
- package/src/index.scss +1 -0
- package/src/index.ts +57 -0
- package/src/linear-progress/linear-progress.scss +4 -0
- package/src/linear-progress/linear-progress.spec.ts +11 -0
- package/src/linear-progress/linear-progress.stories.js +43 -0
- package/src/linear-progress/linear-progress.ts +18 -0
- package/src/list/Overview.mdx +91 -0
- package/src/list/_list.theme.scss +100 -0
- package/src/list/check-list-item.spec.ts +11 -0
- package/src/list/check-list-item.ts +25 -0
- package/src/list/list-item.scss +56 -0
- package/src/list/list-item.spec.ts +11 -0
- package/src/list/list-item.ts +31 -0
- package/src/list/list.scss +25 -0
- package/src/list/list.stories.js +120 -0
- package/src/list/list.ts +23 -0
- package/src/list/nav-list-item.scss +159 -0
- package/src/list/nav-list-item.ts +223 -0
- package/src/list/radio-list-item.ts +25 -0
- package/src/menu/menu.scss +3 -0
- package/src/menu/menu.spec.ts +11 -0
- package/src/menu/menu.stories.js +110 -0
- package/src/menu/menu.ts +23 -0
- package/src/notebook-cell/notebook-cell.scss +185 -0
- package/src/notebook-cell/notebook-cell.spec.ts +11 -0
- package/src/notebook-cell/notebook-cell.stories.js +87 -0
- package/src/notebook-cell/notebook-cell.ts +300 -0
- package/src/radio/radio.scss +3 -0
- package/src/radio/radio.spec.ts +11 -0
- package/src/radio/radio.stories.js +56 -0
- package/src/radio/radio.ts +18 -0
- package/src/select/select.scss +16 -0
- package/src/select/select.spec.ts +11 -0
- package/src/select/select.stories.js +57 -0
- package/src/select/select.ts +18 -0
- package/src/side-sheet/side-sheet.scss +49 -0
- package/src/side-sheet/side-sheet.spec.ts +11 -0
- package/src/side-sheet/side-sheet.stories.js +96 -0
- package/src/side-sheet/side-sheet.ts +37 -0
- package/src/skeleton/_skeleton.styles.scss +24 -0
- package/src/skeleton/skeleton.stories.js +77 -0
- package/src/slider/slider-range.ts +16 -0
- package/src/slider/slider.spec.ts +11 -0
- package/src/slider/slider.stories.js +54 -0
- package/src/slider/slider.ts +16 -0
- package/src/snackbar/snackbar.scss +8 -0
- package/src/snackbar/snackbar.spec.ts +11 -0
- package/src/snackbar/snackbar.stories.js +42 -0
- package/src/snackbar/snackbar.ts +18 -0
- package/src/status-dialog/status-dialog.scss +204 -0
- package/src/status-dialog/status-dialog.spec.ts +48 -0
- package/src/status-dialog/status-dialog.stories.js +136 -0
- package/src/status-dialog/status-dialog.ts +188 -0
- package/src/status-header/_status-header.theme.scss +79 -0
- package/src/status-header/status-header-base.ts +42 -0
- package/src/status-header/status-header-item.scss +17 -0
- package/src/status-header/status-header-item.spec.ts +11 -0
- package/src/status-header/status-header-item.ts +32 -0
- package/src/status-header/status-header.scss +57 -0
- package/src/status-header/status-header.spec.ts +11 -0
- package/src/status-header/status-header.stories.js +114 -0
- package/src/status-header/status-header.ts +26 -0
- package/src/switch/switch.scss +17 -0
- package/src/switch/switch.spec.ts +11 -0
- package/src/switch/switch.stories.js +41 -0
- package/src/switch/switch.ts +18 -0
- package/src/tab/Overview.mdx +38 -0
- package/src/tab/tab-bar.spec.ts +11 -0
- package/src/tab/tab-bar.ts +16 -0
- package/src/tab/tab.scss +10 -0
- package/src/tab/tab.spec.ts +11 -0
- package/src/tab/tab.stories.js +30 -0
- package/src/tab/tab.ts +18 -0
- package/src/text-lockup/text-lockup.scss +66 -0
- package/src/text-lockup/text-lockup.spec.ts +11 -0
- package/src/text-lockup/text-lockup.stories.js +67 -0
- package/src/text-lockup/text-lockup.ts +55 -0
- package/src/textarea/textarea.spec.ts +11 -0
- package/src/textarea/textarea.stories.js +39 -0
- package/src/textarea/textarea.ts +19 -0
- package/src/textfield/textfield.scss +34 -0
- package/src/textfield/textfield.spec.ts +11 -0
- package/src/textfield/textfield.stories.js +60 -0
- package/src/textfield/textfield.ts +25 -0
- package/src/theme/_index.scss +46 -0
- package/src/theme/prebuilt/dark-theme.scss +17 -0
- package/src/theme/prebuilt/light-theme.scss +17 -0
- package/src/toolbar/toolbar.scss +37 -0
- package/src/toolbar/toolbar.spec.ts +11 -0
- package/src/toolbar/toolbar.stories.js +66 -0
- package/src/toolbar/toolbar.ts +27 -0
- package/src/tooltip/tooltip.scss +16 -0
- package/src/tooltip/tooltip.spec.ts +11 -0
- package/src/tooltip/tooltip.stories.js +72 -0
- package/src/tooltip/tooltip.ts +185 -0
- package/src/top-app-bar/top-app-bar-fixed.ts +23 -0
- package/src/top-app-bar/top-app-bar.scss +14 -0
- package/src/top-app-bar/top-app-bar.spec.ts +11 -0
- package/src/top-app-bar/top-app-bar.stories.js +41 -0
- package/src/top-app-bar/top-app-bar.ts +23 -0
- package/src/tree-list/tree-list-item.scss +96 -0
- package/src/tree-list/tree-list-item.spec.ts +11 -0
- package/src/tree-list/tree-list-item.ts +87 -0
- package/src/tree-list/tree-list.scss +13 -0
- package/src/tree-list/tree-list.spec.ts +11 -0
- package/src/tree-list/tree-list.stories.js +151 -0
- package/src/tree-list/tree-list.ts +53 -0
- package/src/typography/typography.scss +45 -0
- package/src/typography/typography.spec.ts +11 -0
- package/src/typography/typography.stories.js +23 -0
- package/src/typography/typography.ts +27 -0
- package/stories/Introduction.mdx +47 -0
- package/stories/color-use.mdx +509 -0
- package/stories/demos/dialog.component.html +187 -0
- package/stories/demos/dialog.component.js +57 -0
- package/stories/demos/grid.content.html +99 -0
- package/stories/demos/lorem-ipsum.content.html +338 -0
- package/stories/demos/material-web.content.html +2125 -0
- package/stories/demos/table-column-sorting.content.html +92 -0
- package/stories/demos/table-pagination.content.html +139 -0
- package/stories/demos/table-progress-indicator.content.html +77 -0
- package/stories/demos/table-row-selection.content.html +219 -0
- package/stories/demos/table.content.html +64 -0
- package/stories/demos/top-app-bar.component.js +57 -0
- package/stories/guide-representing-state.mdx +282 -0
- package/stories/info-and-help.mdx +484 -0
- package/stories/item-detail-and-editing.mdx +529 -0
- package/stories/markdown-elements.mdx +194 -0
- package/stories/writing-and-naming.mdx +157 -0
- package/tsconfig.json +34 -0
- package/tsconfig.lib.json +17 -0
- package/tsconfig.spec.json +14 -0
- package/types.d.ts +15 -0
- package/vite.config.js +58 -0
@@ -0,0 +1,529 @@
|
|
1
|
+
import { Canvas, Meta, DocsContainer } from '@storybook/blocks';
|
2
|
+
|
3
|
+
<Meta
|
4
|
+
title="Guides/Item Detail and Editing"
|
5
|
+
parameters={{
|
6
|
+
layout: 'fullscreen',
|
7
|
+
previewTabs: {
|
8
|
+
canvas: { hidden: true },
|
9
|
+
},
|
10
|
+
}}
|
11
|
+
/>
|
12
|
+
|
13
|
+
<style>
|
14
|
+
{`
|
15
|
+
.container {
|
16
|
+
display: flex;
|
17
|
+
flex-direction: column;
|
18
|
+
border-radius: 8px;
|
19
|
+
border: var(--mdc-theme-border) 1px solid;
|
20
|
+
margin-top: 24px;
|
21
|
+
background-color: var(--mdc-theme-surface);
|
22
|
+
}
|
23
|
+
.toolbar {
|
24
|
+
display: flex;
|
25
|
+
justify-content: space-between;
|
26
|
+
align-items: center;
|
27
|
+
width: 100%;
|
28
|
+
padding-top: 16px;
|
29
|
+
border-top: solid 2px #ff5f02;
|
30
|
+
border-top-left-radius: 3px;
|
31
|
+
border-top-right-radius: 3px;
|
32
|
+
}
|
33
|
+
.header {
|
34
|
+
font-family: var(--mdc-typography-headline6-font-family);
|
35
|
+
font-size: var(--mdc-typography-headline6-font-size);
|
36
|
+
font-weight: var(--mdc-typography-headline6-font-weight);
|
37
|
+
line-height: var(--mdc-typography-headline6-line-height);
|
38
|
+
color: var(--mdc-theme-text-primary-on-background);
|
39
|
+
margin-left: 16px;
|
40
|
+
}
|
41
|
+
.actions {
|
42
|
+
margin-right: 16px;
|
43
|
+
}
|
44
|
+
.actions cv-button:first-of-type {
|
45
|
+
margin-right: 8px;
|
46
|
+
}
|
47
|
+
cv-tab-bar {
|
48
|
+
width: 405px;
|
49
|
+
margin-left: 16px;
|
50
|
+
margin-top: 8px;
|
51
|
+
}
|
52
|
+
.sbdocs hr {
|
53
|
+
margin-top: 0;
|
54
|
+
padding-bottom: 16px;
|
55
|
+
}
|
56
|
+
.content {
|
57
|
+
display: flex;
|
58
|
+
flex-direction: column;
|
59
|
+
align-items: center;
|
60
|
+
position: relative;
|
61
|
+
}
|
62
|
+
.content div:first-of-type {
|
63
|
+
width: 60%;
|
64
|
+
}
|
65
|
+
.content cv-icon-button {
|
66
|
+
position: absolute;
|
67
|
+
right: 8px;
|
68
|
+
top: -8px;
|
69
|
+
padding: 0;
|
70
|
+
}
|
71
|
+
.content-text {
|
72
|
+
color: var(--mdc-theme-text-primary-on-background);
|
73
|
+
}
|
74
|
+
.subtitle {
|
75
|
+
font-family: var(--mdc-typography-body2-font-family);
|
76
|
+
font-size: var(--mdc-typography-body2-font-size);
|
77
|
+
font-weight: var(--mdc-typography-body2-font-weight);
|
78
|
+
line-height: var(--mdc-typography-body2-line-height);
|
79
|
+
margin-bottom: 4px;
|
80
|
+
}
|
81
|
+
.subtitle:last-of-type {
|
82
|
+
margin-top: 16px;
|
83
|
+
}
|
84
|
+
.divider {
|
85
|
+
border: solid 1px var(--mdc-theme-border);
|
86
|
+
margin-top: 72px;
|
87
|
+
margin-bottom: 24px;
|
88
|
+
}
|
89
|
+
.changes-container {
|
90
|
+
display: flex;
|
91
|
+
flex-direction: column;
|
92
|
+
gap: 24px;
|
93
|
+
}
|
94
|
+
.changes-container-item {
|
95
|
+
display: flex;
|
96
|
+
gap: 24px;
|
97
|
+
}
|
98
|
+
.changes-container-item > div:first-of-type {
|
99
|
+
width: 30%;
|
100
|
+
}
|
101
|
+
.changes-container-item > div:last-of-type {
|
102
|
+
width: 60%;
|
103
|
+
}
|
104
|
+
.changes-container hr {
|
105
|
+
padding: 0;
|
106
|
+
}
|
107
|
+
.changes-title {
|
108
|
+
font-family: var(--mdc-typography-headline6-font-family);
|
109
|
+
font-size: var(--mdc-typography-headline6-font-size);
|
110
|
+
font-weight: var(--mdc-typography-headline6-font-weight);
|
111
|
+
line-height: var(--mdc-typography-headline6-line-height);
|
112
|
+
color: var(--mdc-theme-text-primary-on-background);
|
113
|
+
margin-bottom: 8px;
|
114
|
+
}
|
115
|
+
.changes-example {
|
116
|
+
width: 632px;
|
117
|
+
min-height: 200px;
|
118
|
+
border: solid 1px var(--mdc-theme-border);
|
119
|
+
border-radius: 8px;
|
120
|
+
background-color: var(--mdc-theme-surface);
|
121
|
+
}
|
122
|
+
.list-item {
|
123
|
+
display: flex;
|
124
|
+
align-items: center;
|
125
|
+
justify-content: space-between;
|
126
|
+
height: 56px;
|
127
|
+
padding-left: 16px;
|
128
|
+
border-bottom: solid var(--mdc-theme-border) 1px;
|
129
|
+
}
|
130
|
+
.list-item:last-of-type {
|
131
|
+
border-bottom: none;
|
132
|
+
}
|
133
|
+
.list-item-text {
|
134
|
+
font-family: var(--mdc-typography-body1-font-family);
|
135
|
+
font-size: var(--mdc-typography-body1-font-size);
|
136
|
+
font-weight: var(--mdc-typography-body1-font-weight);
|
137
|
+
line-height: var(--mdc-typography-body1-line-height);
|
138
|
+
color: var(--mdc-theme-text-primary-on-background);
|
139
|
+
}
|
140
|
+
.list-item-subtext {
|
141
|
+
font-family: var(--mdc-typography-body2-font-family);
|
142
|
+
font-size: var(--mdc-typography-body2-font-size);
|
143
|
+
font-weight: var(--mdc-typography-body2-font-weight);
|
144
|
+
line-height: var(--mdc-typography-body2-line-height);
|
145
|
+
}
|
146
|
+
.list-item-blue-bg {
|
147
|
+
background-color: var(--mdc-theme-surface-primary-highlight-hover);
|
148
|
+
}
|
149
|
+
.skeleton-text {
|
150
|
+
color: var(--mdc-theme-border) !important;
|
151
|
+
letter-spacing: 0 !important;
|
152
|
+
}
|
153
|
+
.skeleton-title {
|
154
|
+
margin-left: 16px;
|
155
|
+
margin-top: 8px;
|
156
|
+
}
|
157
|
+
.skeleton-block {
|
158
|
+
width: 96px;
|
159
|
+
height: 32px;
|
160
|
+
border-radius: 8px;
|
161
|
+
background-color: var(--mdc-theme-border) !important;
|
162
|
+
margin-right: 16px;
|
163
|
+
}
|
164
|
+
.skeleton-square {
|
165
|
+
width: 24px;
|
166
|
+
height: 24px;
|
167
|
+
background-color: var(--mdc-theme-border);
|
168
|
+
margin-right: 16px;
|
169
|
+
}
|
170
|
+
.object-list-example {
|
171
|
+
display: flex;
|
172
|
+
}
|
173
|
+
.object-list-left {
|
174
|
+
width: 50%;
|
175
|
+
border-right: solid 1px var(--mdc-theme-border);
|
176
|
+
}
|
177
|
+
.object-list-item {
|
178
|
+
justify-content: flex-start;
|
179
|
+
column-gap: 16px;
|
180
|
+
}
|
181
|
+
.object-list-left > div.list-item {
|
182
|
+
height: 33%;
|
183
|
+
}
|
184
|
+
cv-icon {
|
185
|
+
display: flex;
|
186
|
+
align-items: center;
|
187
|
+
justify-content: center;
|
188
|
+
background-color: var(--mdc-theme-border);
|
189
|
+
width: 40px;
|
190
|
+
height: 40px;
|
191
|
+
border-radius: 50%;
|
192
|
+
}
|
193
|
+
.object-list-right {
|
194
|
+
padding-left: 16px;
|
195
|
+
padding-top: 14px;
|
196
|
+
overflow: hidden;
|
197
|
+
}
|
198
|
+
.action-ribbon-bottom-content {
|
199
|
+
padding-left: 16px;
|
200
|
+
padding-top: 14px;
|
201
|
+
padding-right: 56px;
|
202
|
+
border-top: solid 1px var(--mdc-theme-border);
|
203
|
+
}
|
204
|
+
.new-text-block {
|
205
|
+
margin-top: 16px;
|
206
|
+
}
|
207
|
+
`}
|
208
|
+
</style>
|
209
|
+
|
210
|
+
# Item detail & editing
|
211
|
+
|
212
|
+
## Viewing item details
|
213
|
+
|
214
|
+
For content that’s intended to be browsed for information, display in read-only form, with an edit icon in the top right of the tab to enable editing.
|
215
|
+
|
216
|
+
<div class="container">
|
217
|
+
<div class="toolbar">
|
218
|
+
<div class="header">
|
219
|
+
Interdum pellentesque cras ornare porttitor tellus ante.
|
220
|
+
</div>
|
221
|
+
|
222
|
+
<div class="actions">
|
223
|
+
<cv-button outlined slot="buttonActions" label="Action" />
|
224
|
+
|
225
|
+
<cv-button outlined slot="buttonActions" label="Action" />
|
226
|
+
</div>
|
227
|
+
|
228
|
+
</div>
|
229
|
+
|
230
|
+
<cv-tab-bar activeIndex="0">
|
231
|
+
<cv-tab label="Details" />
|
232
|
+
|
233
|
+
<cv-tab label="Tab 2" />
|
234
|
+
|
235
|
+
<cv-tab label="Tab 3" />
|
236
|
+
|
237
|
+
<cv-tab label="Tab 4" />
|
238
|
+
|
239
|
+
</cv-tab-bar>
|
240
|
+
|
241
|
+
{' '}
|
242
|
+
<hr />
|
243
|
+
|
244
|
+
<div class="content">
|
245
|
+
<div>
|
246
|
+
<div class="subtitle">Description</div>
|
247
|
+
|
248
|
+
<div class="content-text">
|
249
|
+
Elit in semper faucibus aliquam. Nisl, augue porta eu urna adipiscing
|
250
|
+
amet scelerisque enim odio. Arcu, posuere ultricies egestas viverra
|
251
|
+
quis. Id pharetra lacinia donec orci.
|
252
|
+
</div>
|
253
|
+
|
254
|
+
<div class="subtitle">Tags</div>
|
255
|
+
|
256
|
+
<cv-chip-set>
|
257
|
+
<cv-chip label="Lorem" />
|
258
|
+
|
259
|
+
<cv-chip label="Ipsum" />
|
260
|
+
|
261
|
+
<cv-chip label="Dolor sit" />
|
262
|
+
</cv-chip-set>
|
263
|
+
</div>
|
264
|
+
|
265
|
+
<cv-icon-button icon="edit" />
|
266
|
+
|
267
|
+
</div>
|
268
|
+
</div>
|
269
|
+
|
270
|
+
<div class="divider" />
|
271
|
+
|
272
|
+
## Editing
|
273
|
+
|
274
|
+
Editing takes place in context, not in a separate view. Show form fields by default, and use the action ribbon to display state, save changes, or perform other relevant operations.
|
275
|
+
|
276
|
+
### Indicating changes
|
277
|
+
|
278
|
+
<div class="changes-container">
|
279
|
+
<div class="changes-container-item">
|
280
|
+
<div>
|
281
|
+
<div class="changes-title">Tabs</div>
|
282
|
+
<div>Show a change indicator in the relevant tab.</div>
|
283
|
+
</div>
|
284
|
+
|
285
|
+
<div class="changes-example">
|
286
|
+
<div class="skeleton-text skeleton-title">
|
287
|
+
Elit in semper faucibus aliquam. Nisl, augue porta eu urna.
|
288
|
+
</div>
|
289
|
+
|
290
|
+
<cv-tab-bar activeIndex="0">
|
291
|
+
<cv-tab label="Details ●" />
|
292
|
+
|
293
|
+
<cv-tab label="Tab 2" />
|
294
|
+
|
295
|
+
<cv-tab label="Tab 3" />
|
296
|
+
|
297
|
+
<cv-tab label="Tab 4" />
|
298
|
+
</cv-tab-bar>
|
299
|
+
|
300
|
+
<hr />
|
301
|
+
|
302
|
+
<div class="list-item list-item-blue-bg">
|
303
|
+
<div class="skeleton-text">Filler text</div>
|
304
|
+
|
305
|
+
<div class="skeleton-block" />
|
306
|
+
</div>
|
307
|
+
|
308
|
+
<div class="list-item">
|
309
|
+
<div class="skeleton-text">
|
310
|
+
Filler text Filler text Filler text Filler text Filler text Filler
|
311
|
+
text
|
312
|
+
</div>
|
313
|
+
</div>
|
314
|
+
</div>
|
315
|
+
|
316
|
+
</div>
|
317
|
+
|
318
|
+
<div class="changes-container-item">
|
319
|
+
<div>
|
320
|
+
<div class="changes-title">Object list</div>
|
321
|
+
|
322
|
+
<div>
|
323
|
+
If the object list is visible, show a change indicator in the relevant
|
324
|
+
list item.
|
325
|
+
</div>
|
326
|
+
</div>
|
327
|
+
|
328
|
+
<div class="changes-example object-list-example">
|
329
|
+
<div class="object-list-left">
|
330
|
+
<div class="list-item">
|
331
|
+
<div class="skeleton-text">Some filler text</div>
|
332
|
+
|
333
|
+
<div class="skeleton-square" />
|
334
|
+
</div>
|
335
|
+
|
336
|
+
<div class="list-item list-item-blue-bg object-list-item">
|
337
|
+
<cv-icon>square</cv-icon>
|
338
|
+
|
339
|
+
<div>
|
340
|
+
<div class="list-item-text">● Interdum pellentesque cra...</div>
|
341
|
+
<div class="list-item-subtext">June 24, 2020 5:12 PM</div>
|
342
|
+
</div>
|
343
|
+
</div>
|
344
|
+
|
345
|
+
<div class="list-item object-list-item">
|
346
|
+
<cv-icon />
|
347
|
+
|
348
|
+
<div>
|
349
|
+
<div class="skeleton-text">Interdum pellentesque cra...</div>
|
350
|
+
<div class="skeleton-text">June 24, 2020 5:12 PM</div>
|
351
|
+
</div>
|
352
|
+
</div>
|
353
|
+
</div>
|
354
|
+
|
355
|
+
<div class="object-list-right">
|
356
|
+
<div class="skeleton-text">Filler text filler text filler text</div>
|
357
|
+
<div class="skeleton-text">Filler text filler text filler text</div>
|
358
|
+
<div class="skeleton-text">Filler text filler text filler text</div>
|
359
|
+
|
360
|
+
<br />
|
361
|
+
|
362
|
+
<div class="skeleton-text">Filler text filler text filler text</div>
|
363
|
+
<div class="skeleton-text">Filler text filler text filler text</div>
|
364
|
+
<div class="skeleton-text">Filler text filler text filler text</div>
|
365
|
+
<div class="skeleton-text">Filler text filler text filler text</div>
|
366
|
+
</div>
|
367
|
+
</div>
|
368
|
+
|
369
|
+
</div>
|
370
|
+
|
371
|
+
<div class="changes-container-item">
|
372
|
+
<div>
|
373
|
+
<div class="changes-title">
|
374
|
+
Action ribbon - <br /> Nothing changed
|
375
|
+
</div>
|
376
|
+
|
377
|
+
<div>Provide “No changes” text to the left of the ribbon.</div>
|
378
|
+
<div class="new-text-block">Disable actions.</div>
|
379
|
+
</div>
|
380
|
+
|
381
|
+
<div class="changes-example">
|
382
|
+
<cv-tab-bar activeIndex="0">
|
383
|
+
<cv-tab label="Details" />
|
384
|
+
|
385
|
+
<cv-tab label="Tab 2" />
|
386
|
+
|
387
|
+
<cv-tab label="Tab 3" />
|
388
|
+
|
389
|
+
<cv-tab label="Tab 4" />
|
390
|
+
</cv-tab-bar>
|
391
|
+
|
392
|
+
<hr />
|
393
|
+
|
394
|
+
<cv-action-ribbon labelText="No changes">
|
395
|
+
<cv-button slot="action-items" label="Cancel" outlined />
|
396
|
+
|
397
|
+
<cv-button slot="action-items" label="Save" raised disabled />
|
398
|
+
</cv-action-ribbon>
|
399
|
+
|
400
|
+
<div class="action-ribbon-bottom-content">
|
401
|
+
<div class="skeleton-text">
|
402
|
+
Filler text filler text filler text filler text filler text filler
|
403
|
+
</div>
|
404
|
+
|
405
|
+
<div class="skeleton-text">
|
406
|
+
Filler text filler text filler text filler text filler text filler
|
407
|
+
</div>
|
408
|
+
|
409
|
+
<div class="skeleton-text">
|
410
|
+
Filler text filler text filler text filler text filler text filler
|
411
|
+
</div>
|
412
|
+
|
413
|
+
<br />
|
414
|
+
|
415
|
+
<div class="skeleton-text">
|
416
|
+
Filler text filler text filler text filler text filler text filler
|
417
|
+
</div>
|
418
|
+
|
419
|
+
<div class="skeleton-text">
|
420
|
+
Filler text filler text filler text filler text filler text filler
|
421
|
+
</div>
|
422
|
+
|
423
|
+
<div class="skeleton-text">
|
424
|
+
Filler text filler text filler text filler text filler text filler
|
425
|
+
</div>
|
426
|
+
|
427
|
+
<div class="skeleton-text">
|
428
|
+
Filler text filler text filler text filler text filler text filler
|
429
|
+
</div>
|
430
|
+
|
431
|
+
<div class="skeleton-text">
|
432
|
+
Filler text filler text filler text filler text filler text filler
|
433
|
+
</div>
|
434
|
+
|
435
|
+
<div class="skeleton-text">
|
436
|
+
Filler text filler text filler text filler text filler text filler
|
437
|
+
</div>
|
438
|
+
|
439
|
+
<div class="skeleton-text">
|
440
|
+
Filler text filler text filler text filler text filler text filler
|
441
|
+
</div>
|
442
|
+
|
443
|
+
<div class="skeleton-text">Filler text filler text filler text </div>
|
444
|
+
</div>
|
445
|
+
</div>
|
446
|
+
|
447
|
+
</div>
|
448
|
+
|
449
|
+
<div class="changes-container-item">
|
450
|
+
<div>
|
451
|
+
<div class="changes-title">
|
452
|
+
Action ribbon - <br /> Unsaved changes
|
453
|
+
</div>
|
454
|
+
|
455
|
+
<div>
|
456
|
+
Provide “You have unsaved changes” text to the left of the ribbon.
|
457
|
+
</div>
|
458
|
+
|
459
|
+
<div class="new-text-block">Enable any relevant actions.</div>
|
460
|
+
</div>
|
461
|
+
|
462
|
+
<div class="changes-example">
|
463
|
+
<cv-tab-bar activeIndex="0">
|
464
|
+
<cv-tab label="Details ●" />
|
465
|
+
|
466
|
+
<cv-tab label="Tab 2" />
|
467
|
+
|
468
|
+
<cv-tab label="Tab 3" />
|
469
|
+
|
470
|
+
<cv-tab label="Tab 4" />
|
471
|
+
</cv-tab-bar>
|
472
|
+
|
473
|
+
<hr />
|
474
|
+
|
475
|
+
<cv-action-ribbon labelText="You have unsaved changes" state="active">
|
476
|
+
<cv-button slot="action-items" label="Cancel" outlined />
|
477
|
+
|
478
|
+
<cv-button slot="action-items" label="Save" raised />
|
479
|
+
</cv-action-ribbon>
|
480
|
+
|
481
|
+
<div class="action-ribbon-bottom-content">
|
482
|
+
<div class="skeleton-text">
|
483
|
+
Filler text filler text filler text filler text filler text filler
|
484
|
+
</div>
|
485
|
+
|
486
|
+
<div class="skeleton-text">
|
487
|
+
Filler text filler text filler text filler text filler text filler
|
488
|
+
</div>
|
489
|
+
|
490
|
+
<div class="skeleton-text">
|
491
|
+
Filler text filler text filler text filler text filler text filler
|
492
|
+
</div>
|
493
|
+
|
494
|
+
<br />
|
495
|
+
|
496
|
+
<div class="skeleton-text">
|
497
|
+
Filler text filler text filler text filler text filler text filler
|
498
|
+
</div>
|
499
|
+
|
500
|
+
<div class="skeleton-text">
|
501
|
+
Filler text filler text filler text filler text filler text filler
|
502
|
+
</div>
|
503
|
+
|
504
|
+
<div class="skeleton-text">
|
505
|
+
Filler text filler text filler text filler text filler text filler
|
506
|
+
</div>
|
507
|
+
|
508
|
+
<div class="skeleton-text">
|
509
|
+
Filler text filler text filler text filler text filler text filler
|
510
|
+
</div>
|
511
|
+
|
512
|
+
<div class="skeleton-text">
|
513
|
+
Filler text filler text filler text filler text filler text filler
|
514
|
+
</div>
|
515
|
+
|
516
|
+
<div class="skeleton-text">
|
517
|
+
Filler text filler text filler text filler text filler text filler
|
518
|
+
</div>
|
519
|
+
|
520
|
+
<div class="skeleton-text">
|
521
|
+
Filler text filler text filler text filler text filler text filler
|
522
|
+
</div>
|
523
|
+
|
524
|
+
<div class="skeleton-text">Filler text filler text filler text </div>
|
525
|
+
</div>
|
526
|
+
</div>
|
527
|
+
|
528
|
+
</div>
|
529
|
+
</div>
|
@@ -0,0 +1,194 @@
|
|
1
|
+
import { Meta, DocsContainer } from '@storybook/blocks';
|
2
|
+
import { Icons, Code } from '@storybook/components';
|
3
|
+
|
4
|
+
<Meta
|
5
|
+
title="Basics/Markdown Elements"
|
6
|
+
parameters={{
|
7
|
+
layout: 'fullscreen',
|
8
|
+
previewTabs: {
|
9
|
+
canvas: { hidden: true },
|
10
|
+
},
|
11
|
+
}}
|
12
|
+
/>
|
13
|
+
|
14
|
+
<style>
|
15
|
+
{`
|
16
|
+
table svg {
|
17
|
+
height: 1.5rem;
|
18
|
+
width: auto;
|
19
|
+
}
|
20
|
+
`}
|
21
|
+
</style>
|
22
|
+
|
23
|
+
# Markdown elements
|
24
|
+
|
25
|
+
---
|
26
|
+
|
27
|
+
# h1 Heading
|
28
|
+
|
29
|
+
## h2 Heading
|
30
|
+
|
31
|
+
### h3 Heading
|
32
|
+
|
33
|
+
#### h4 Heading
|
34
|
+
|
35
|
+
##### h5 Heading
|
36
|
+
|
37
|
+
###### h6 Heading
|
38
|
+
|
39
|
+
## Paragraphs
|
40
|
+
|
41
|
+
The Storybook design system codifies existing UI components into a central, well-maintained repository. It is built to address having to paste the same components into multiple projects again and again. This simplifies building UI's with Storybook's design patterns.
|
42
|
+
|
43
|
+
SDS was created by Kyle Suss, Dominic Nguyen (me!), and Michael Shilman with invaluable accessibility contributions from Jimmy Somsanith.
|
44
|
+
|
45
|
+
## Emphasis
|
46
|
+
|
47
|
+
**This is bold text**
|
48
|
+
|
49
|
+
**_This is bold italic text_**
|
50
|
+
|
51
|
+
_This is italic text_
|
52
|
+
|
53
|
+
_This is italic text_
|
54
|
+
|
55
|
+
\~~Strikethrough~~
|
56
|
+
|
57
|
+
## Blockquotes
|
58
|
+
|
59
|
+
> Blockquotes can also be nested...
|
60
|
+
>
|
61
|
+
> > ...by using additional greater-than signs right next to each other...
|
62
|
+
> >
|
63
|
+
> > > ...or with spaces between arrows.
|
64
|
+
|
65
|
+
---
|
66
|
+
|
67
|
+
## Lists
|
68
|
+
|
69
|
+
### Unordered
|
70
|
+
|
71
|
+
- Create a list by starting a line with `+`, `-`, or `*`
|
72
|
+
- Sub-lists are made by indenting 2 spaces:
|
73
|
+
- Marker character change forces new list start:
|
74
|
+
- Ac tristique libero volutpat at
|
75
|
+
- Facilisis in pretium nisl aliquet
|
76
|
+
- Nulla volutpat aliquam velit
|
77
|
+
- Very easy!
|
78
|
+
- Marker character change forces new list start:
|
79
|
+
- Ac tristique libero volutpat at
|
80
|
+
- Facilisis in pretium nisl aliquet
|
81
|
+
- Nulla volutpat aliquam velit
|
82
|
+
- Final item
|
83
|
+
|
84
|
+
### Ordered
|
85
|
+
|
86
|
+
1. Lorem ipsum dolor sit amet
|
87
|
+
2. Consectetur adipiscing elit
|
88
|
+
3. Integer molestie lorem at massa
|
89
|
+
|
90
|
+
### Start numbering with offset:
|
91
|
+
|
92
|
+
57. foo
|
93
|
+
58. bar
|
94
|
+
|
95
|
+
---
|
96
|
+
|
97
|
+
## Code
|
98
|
+
|
99
|
+
### Inline
|
100
|
+
|
101
|
+
This `code` is inline
|
102
|
+
|
103
|
+
### Indented code
|
104
|
+
|
105
|
+
// Some comments
|
106
|
+
line 1 of code
|
107
|
+
line 2 of code
|
108
|
+
line 3 of code
|
109
|
+
|
110
|
+
### Block code "fences"
|
111
|
+
|
112
|
+
```
|
113
|
+
Sample text here...
|
114
|
+
```
|
115
|
+
|
116
|
+
### JS syntax highlighting
|
117
|
+
|
118
|
+
```js
|
119
|
+
var foo = function (bar) {
|
120
|
+
return bar++;
|
121
|
+
};
|
122
|
+
|
123
|
+
console.log(foo(5));
|
124
|
+
```
|
125
|
+
|
126
|
+
### CSS syntax
|
127
|
+
|
128
|
+
```css
|
129
|
+
.foo {
|
130
|
+
color: #eee;
|
131
|
+
}
|
132
|
+
```
|
133
|
+
|
134
|
+
### HTML syntax
|
135
|
+
|
136
|
+
```html
|
137
|
+
<h1>yo html</h1>
|
138
|
+
|
139
|
+
<p>And here we go</p>
|
140
|
+
```
|
141
|
+
|
142
|
+
---
|
143
|
+
|
144
|
+
## Tables
|
145
|
+
|
146
|
+
| Option | Description |
|
147
|
+
| ------ | ------------------------------------------------------------------------- |
|
148
|
+
| data | path to data files to supply the data that will be passed into templates. |
|
149
|
+
| engine | engine to be used for processing templates. Handlebars is the default. |
|
150
|
+
| ext | extension to be used for dest files. |
|
151
|
+
|
152
|
+
### Right aligned columns
|
153
|
+
|
154
|
+
| Option | Description |
|
155
|
+
| -----: | ------------------------------------------------------------------------: |
|
156
|
+
| data | path to data files to supply the data that will be passed into templates. |
|
157
|
+
| engine | engine to be used for processing templates. Handlebars is the default. |
|
158
|
+
| ext | extension to be used for dest files. |
|
159
|
+
|
160
|
+
### Table with icons
|
161
|
+
|
162
|
+
| SVG | Name |
|
163
|
+
| ----------------------- | -------- |
|
164
|
+
| <Icons icon="mobile" /> | `mobile` |
|
165
|
+
| <Icons icon="grid" /> | `grid` |
|
166
|
+
| <Icons icon="alert" /> | `alert` |
|
167
|
+
| <Icons icon="check" /> | `check` |
|
168
|
+
|
169
|
+
---
|
170
|
+
|
171
|
+
## Links
|
172
|
+
|
173
|
+
[external link](https://hichroma.com)
|
174
|
+
|
175
|
+
[external link with title](https://hichroma.com 'Insert title!')
|
176
|
+
|
177
|
+
[link to in page anchor](#h1-heading)
|
178
|
+
|
179
|
+
[link to another story (docs, without prefix)](/docs/addons-docs-docs-only--page)
|
180
|
+
|
181
|
+
[link to another story (docs)](?path=/docs/addons-docs-docs-only--page)
|
182
|
+
|
183
|
+
[link to another story (canvas)](?path=/story/addons-docs-buttongroup--basic)
|
184
|
+
|
185
|
+
[link to about page](?path=/settings/about)
|
186
|
+
|
187
|
+
[link to absolute local url](/absolute)
|
188
|
+
|
189
|
+
---
|
190
|
+
|
191
|
+
## Images
|
192
|
+
|
193
|
+

|
194
|
+

|