kempo-ui 0.3.16 → 0.4.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/dist/components/Progress.js +86 -0
- package/dist/components/Spinner.js +2 -2
- package/docs/components/accordion.html +3 -0
- package/docs/components/aside.html +3 -0
- package/docs/components/card.html +3 -0
- package/docs/components/code-editor.html +3 -0
- package/docs/components/color-picker.html +3 -0
- package/docs/components/combobox.html +3 -0
- package/docs/components/content-slider.html +3 -0
- package/docs/components/context.html +3 -0
- package/docs/components/dialog.html +3 -0
- package/docs/components/dropdown.html +3 -0
- package/docs/components/filter-list.html +3 -0
- package/docs/components/focus-capture.html +3 -0
- package/docs/components/html-editor.html +3 -0
- package/docs/components/hybrid-component.html +3 -0
- package/docs/components/icon.html +3 -0
- package/docs/components/import.html +3 -0
- package/docs/components/light-component.html +3 -0
- package/docs/components/nav-spacer.html +3 -0
- package/docs/components/nav.html +3 -0
- package/docs/components/photo-viewer.html +3 -0
- package/docs/components/progress.html +625 -0
- package/docs/components/resize.html +3 -0
- package/docs/components/shadow-component.html +3 -0
- package/docs/components/show-more.html +3 -0
- package/docs/components/sortable.html +3 -0
- package/docs/components/spinner.html +3 -0
- package/docs/components/split.html +3 -0
- package/docs/components/table.html +3 -0
- package/docs/components/tableControls.html +3 -0
- package/docs/components/tableCustomFields.html +3 -0
- package/docs/components/tableFetchRecords.html +3 -0
- package/docs/components/tableFieldSortHide.html +3 -0
- package/docs/components/tablePagination.html +3 -0
- package/docs/components/tablePlaceholder.html +3 -0
- package/docs/components/tableRecordEditing.html +3 -0
- package/docs/components/tableRecordFiltering.html +3 -0
- package/docs/components/tableRecordHiding.html +3 -0
- package/docs/components/tableRecordSearching.html +3 -0
- package/docs/components/tableRecordSelection.html +3 -0
- package/docs/components/tableRowControls.html +3 -0
- package/docs/components/tableServerSync.html +3 -0
- package/docs/components/tableSorting.html +3 -0
- package/docs/components/tabs.html +3 -0
- package/docs/components/tags.html +3 -0
- package/docs/components/theme-select.html +3 -0
- package/docs/components/theme-switcher.html +3 -0
- package/docs/components/timestamp.html +3 -0
- package/docs/components/toast.html +3 -0
- package/docs/components/toggle.html +3 -0
- package/docs/components/tree.html +3 -0
- package/docs/index.html +9 -0
- package/docs/src/components/Progress.js +86 -0
- package/docs/src/components/Spinner.js +2 -2
- package/docs/utils/context.html +3 -0
- package/docs/utils/cookie.html +3 -0
- package/docs/utils/debounce.html +3 -0
- package/docs/utils/drag.html +3 -0
- package/docs/utils/elevation.html +3 -0
- package/docs/utils/formatTimestamp.html +3 -0
- package/docs/utils/object.html +3 -0
- package/docs/utils/propConverters.html +3 -0
- package/docs/utils/string.html +3 -0
- package/docs/utils/theme.html +3 -0
- package/docs/utils/toTitleCase.html +3 -0
- package/docs/utils/type.html +3 -0
- package/docs/utils/wait.html +3 -0
- package/docs-src/components/progress.page.html +182 -0
- package/docs-src/index.page.html +6 -0
- package/docs-src/nav.fragment.html +3 -0
- package/package.json +3 -3
- package/src/components/Progress.js +148 -0
- package/src/components/Spinner.js +19 -18
- package/tests/components/Progress.browser-test.js +444 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import{html as t,css as e}from"../lit-all.min.js";import i from"./ShadowComponent.js";import{boolExists as r}from"../utils/propConverters.js";export default class a extends i{static properties={percentage:{type:String},offset:{type:String},color:{type:String},label:{type:Boolean,converter:r},indeterminate:{type:String,reflect:!0}};constructor(){super(),this.percentage="25",this.offset="0",this.color="var(--c_primary)",this.indeterminate=null}get bars(){const t=(this.percentage||"25").split("|").map(t=>t.trim()),e=(this.offset||0).split("|").map(t=>t.trim()),i=(this.color||"var(--c_primary)").split("|").map(t=>t.trim());return t.map((t,r)=>{let a=e[0];e.length>r&&(a=e[r]);let n=i[0];return i.length>r&&(n=i[r]),{percentage:t,offset:a,color:n}})}render(){const[{color:e}]=this.bars;return null!==this.indeterminate?t`
|
|
2
|
+
<div id="bar1" class="bar indeterminate" style="background:${e};animation-duration:${this.indeterminate||"2s"}"></div>
|
|
3
|
+
<div id="bar2" class="bar indeterminate" style="background:${e};animation-duration:${this.indeterminate||"2s"}"></div>
|
|
4
|
+
`:t`${this.bars.map(({percentage:e,offset:i,color:r})=>t`
|
|
5
|
+
<div
|
|
6
|
+
class="bar"
|
|
7
|
+
style="left:${i}%;width:${e}%;background:${r}"
|
|
8
|
+
>
|
|
9
|
+
${this.label?t`<div class="label">${e}%</div>`:""}
|
|
10
|
+
</div>
|
|
11
|
+
`)}`}static styles=e`
|
|
12
|
+
:host {
|
|
13
|
+
--radius: 99999px;
|
|
14
|
+
|
|
15
|
+
display: block;
|
|
16
|
+
height: 1rem;
|
|
17
|
+
width: 100%;
|
|
18
|
+
background-color: var(--c_border);
|
|
19
|
+
position: relative;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
color: var(--tc_on_primary);
|
|
22
|
+
font-size: 0.75rem;
|
|
23
|
+
border-radius: var(--radius);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.bar {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
height: 100%;
|
|
30
|
+
transition: width 0.3s ease;
|
|
31
|
+
position: absolute;
|
|
32
|
+
left: 0;
|
|
33
|
+
border-radius: var(--radius);
|
|
34
|
+
}
|
|
35
|
+
.label {
|
|
36
|
+
padding: 0 var(--spacer);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host([indeterminate]) .bar {
|
|
40
|
+
width: 25%;
|
|
41
|
+
transition: none;
|
|
42
|
+
}
|
|
43
|
+
:host([indeterminate]) #bar1 {
|
|
44
|
+
animation-name: indeterminate-bar1;
|
|
45
|
+
animation-timing-function: linear;
|
|
46
|
+
animation-iteration-count: infinite;
|
|
47
|
+
}
|
|
48
|
+
:host([indeterminate]) #bar2 {
|
|
49
|
+
animation-name: indeterminate-bar2;
|
|
50
|
+
animation-timing-function: linear;
|
|
51
|
+
animation-iteration-count: infinite;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@keyframes indeterminate-bar1 {
|
|
55
|
+
0% {
|
|
56
|
+
left: 0%;
|
|
57
|
+
}
|
|
58
|
+
100% {
|
|
59
|
+
left: 100%;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
@keyframes indeterminate-bar2 {
|
|
63
|
+
0% {
|
|
64
|
+
left: 0%;
|
|
65
|
+
opacity: 1;
|
|
66
|
+
}
|
|
67
|
+
74% {
|
|
68
|
+
opacity: 1;
|
|
69
|
+
}
|
|
70
|
+
75% {
|
|
71
|
+
left: 75%;
|
|
72
|
+
opacity: 0;
|
|
73
|
+
}
|
|
74
|
+
76% {
|
|
75
|
+
left: -24%;
|
|
76
|
+
opacity: 0;
|
|
77
|
+
}
|
|
78
|
+
76.5% {
|
|
79
|
+
opacity: 1;
|
|
80
|
+
}
|
|
81
|
+
100% {
|
|
82
|
+
left: 0%;
|
|
83
|
+
opacity: 1;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
`}customElements.define("k-progress",a);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{html as r,css as n}from"../lit-all.min.js";import s from"./ShadowComponent.js";export default class e extends s{static properties={size:{type:String,reflect:!0},variant:{type:String,reflect:!0}};constructor(){super(),this.size="md",this.variant="spinner"}static styles=n`
|
|
1
|
+
import{html as r,css as n}from"../lit-all.min.js";import s from"./ShadowComponent.js";export default class e extends s{static properties={size:{type:String,reflect:!0},variant:{type:String,reflect:!0}};constructor(){super(),this.size="md",this.variant="spinner"}render(){switch(this.variant){case"dots":return r`<div class="dots"><span></span><span></span><span></span></div>`;case"bars":return r`<div class="bars"><span></span><span></span><span></span><span></span></div>`;case"pulse":return r`<div class="pulse"></div>`;case"ring":return r`<div class="ring"></div>`;default:return r`<div class="spinner"></div>`}}static styles=n`
|
|
2
2
|
:host {
|
|
3
3
|
--spinner-size: 2rem;
|
|
4
4
|
--spinner-border-width: 3px;
|
|
@@ -110,4 +110,4 @@ import{html as r,css as n}from"../lit-all.min.js";import s from"./ShadowComponen
|
|
|
110
110
|
75% { border-color: transparent transparent transparent var(--spinner-color); }
|
|
111
111
|
100% { transform: rotate(360deg); border-color: var(--spinner-color) transparent transparent transparent; }
|
|
112
112
|
}
|
|
113
|
-
|
|
113
|
+
`}customElements.define("k-spinner",e);
|
package/docs/utils/context.html
CHANGED
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
<k-filter-item filter-keywords="photo viewer photoviewer components"><a
|
|
105
105
|
href="../components/photo-viewer.html"
|
|
106
106
|
>Photo Viewer<br><small>Component</small></a></k-filter-item>
|
|
107
|
+
<k-filter-item filter-keywords="progress loading components"><a
|
|
108
|
+
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
107
109
|
<k-filter-item filter-keywords="resize components"><a
|
|
108
110
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
109
111
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
@@ -280,6 +282,7 @@
|
|
|
280
282
|
<a href="../components/nav.html">Nav</a>
|
|
281
283
|
<a href="../components/nav-spacer.html">Nav Spacer</a>
|
|
282
284
|
<a href="../components/photo-viewer.html">Photo Viewer</a>
|
|
285
|
+
<a href="../components/progress.html">Progress</a>
|
|
283
286
|
<a href="../components/resize.html">Resize</a>
|
|
284
287
|
<a href="../components/show-more.html">Show More</a>
|
|
285
288
|
<a href="../components/sortable.html">Sortable</a>
|
package/docs/utils/cookie.html
CHANGED
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
<k-filter-item filter-keywords="photo viewer photoviewer components"><a
|
|
105
105
|
href="../components/photo-viewer.html"
|
|
106
106
|
>Photo Viewer<br><small>Component</small></a></k-filter-item>
|
|
107
|
+
<k-filter-item filter-keywords="progress loading components"><a
|
|
108
|
+
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
107
109
|
<k-filter-item filter-keywords="resize components"><a
|
|
108
110
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
109
111
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
@@ -280,6 +282,7 @@
|
|
|
280
282
|
<a href="../components/nav.html">Nav</a>
|
|
281
283
|
<a href="../components/nav-spacer.html">Nav Spacer</a>
|
|
282
284
|
<a href="../components/photo-viewer.html">Photo Viewer</a>
|
|
285
|
+
<a href="../components/progress.html">Progress</a>
|
|
283
286
|
<a href="../components/resize.html">Resize</a>
|
|
284
287
|
<a href="../components/show-more.html">Show More</a>
|
|
285
288
|
<a href="../components/sortable.html">Sortable</a>
|
package/docs/utils/debounce.html
CHANGED
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
<k-filter-item filter-keywords="photo viewer photoviewer components"><a
|
|
105
105
|
href="../components/photo-viewer.html"
|
|
106
106
|
>Photo Viewer<br><small>Component</small></a></k-filter-item>
|
|
107
|
+
<k-filter-item filter-keywords="progress loading components"><a
|
|
108
|
+
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
107
109
|
<k-filter-item filter-keywords="resize components"><a
|
|
108
110
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
109
111
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
@@ -280,6 +282,7 @@
|
|
|
280
282
|
<a href="../components/nav.html">Nav</a>
|
|
281
283
|
<a href="../components/nav-spacer.html">Nav Spacer</a>
|
|
282
284
|
<a href="../components/photo-viewer.html">Photo Viewer</a>
|
|
285
|
+
<a href="../components/progress.html">Progress</a>
|
|
283
286
|
<a href="../components/resize.html">Resize</a>
|
|
284
287
|
<a href="../components/show-more.html">Show More</a>
|
|
285
288
|
<a href="../components/sortable.html">Sortable</a>
|
package/docs/utils/drag.html
CHANGED
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
<k-filter-item filter-keywords="photo viewer photoviewer components"><a
|
|
105
105
|
href="../components/photo-viewer.html"
|
|
106
106
|
>Photo Viewer<br><small>Component</small></a></k-filter-item>
|
|
107
|
+
<k-filter-item filter-keywords="progress loading components"><a
|
|
108
|
+
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
107
109
|
<k-filter-item filter-keywords="resize components"><a
|
|
108
110
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
109
111
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
@@ -280,6 +282,7 @@
|
|
|
280
282
|
<a href="../components/nav.html">Nav</a>
|
|
281
283
|
<a href="../components/nav-spacer.html">Nav Spacer</a>
|
|
282
284
|
<a href="../components/photo-viewer.html">Photo Viewer</a>
|
|
285
|
+
<a href="../components/progress.html">Progress</a>
|
|
283
286
|
<a href="../components/resize.html">Resize</a>
|
|
284
287
|
<a href="../components/show-more.html">Show More</a>
|
|
285
288
|
<a href="../components/sortable.html">Sortable</a>
|
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
<k-filter-item filter-keywords="photo viewer photoviewer components"><a
|
|
105
105
|
href="../components/photo-viewer.html"
|
|
106
106
|
>Photo Viewer<br><small>Component</small></a></k-filter-item>
|
|
107
|
+
<k-filter-item filter-keywords="progress loading components"><a
|
|
108
|
+
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
107
109
|
<k-filter-item filter-keywords="resize components"><a
|
|
108
110
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
109
111
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
@@ -280,6 +282,7 @@
|
|
|
280
282
|
<a href="../components/nav.html">Nav</a>
|
|
281
283
|
<a href="../components/nav-spacer.html">Nav Spacer</a>
|
|
282
284
|
<a href="../components/photo-viewer.html">Photo Viewer</a>
|
|
285
|
+
<a href="../components/progress.html">Progress</a>
|
|
283
286
|
<a href="../components/resize.html">Resize</a>
|
|
284
287
|
<a href="../components/show-more.html">Show More</a>
|
|
285
288
|
<a href="../components/sortable.html">Sortable</a>
|
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
<k-filter-item filter-keywords="photo viewer photoviewer components"><a
|
|
105
105
|
href="../components/photo-viewer.html"
|
|
106
106
|
>Photo Viewer<br><small>Component</small></a></k-filter-item>
|
|
107
|
+
<k-filter-item filter-keywords="progress loading components"><a
|
|
108
|
+
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
107
109
|
<k-filter-item filter-keywords="resize components"><a
|
|
108
110
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
109
111
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
@@ -280,6 +282,7 @@
|
|
|
280
282
|
<a href="../components/nav.html">Nav</a>
|
|
281
283
|
<a href="../components/nav-spacer.html">Nav Spacer</a>
|
|
282
284
|
<a href="../components/photo-viewer.html">Photo Viewer</a>
|
|
285
|
+
<a href="../components/progress.html">Progress</a>
|
|
283
286
|
<a href="../components/resize.html">Resize</a>
|
|
284
287
|
<a href="../components/show-more.html">Show More</a>
|
|
285
288
|
<a href="../components/sortable.html">Sortable</a>
|
package/docs/utils/object.html
CHANGED
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
<k-filter-item filter-keywords="photo viewer photoviewer components"><a
|
|
105
105
|
href="../components/photo-viewer.html"
|
|
106
106
|
>Photo Viewer<br><small>Component</small></a></k-filter-item>
|
|
107
|
+
<k-filter-item filter-keywords="progress loading components"><a
|
|
108
|
+
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
107
109
|
<k-filter-item filter-keywords="resize components"><a
|
|
108
110
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
109
111
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
@@ -280,6 +282,7 @@
|
|
|
280
282
|
<a href="../components/nav.html">Nav</a>
|
|
281
283
|
<a href="../components/nav-spacer.html">Nav Spacer</a>
|
|
282
284
|
<a href="../components/photo-viewer.html">Photo Viewer</a>
|
|
285
|
+
<a href="../components/progress.html">Progress</a>
|
|
283
286
|
<a href="../components/resize.html">Resize</a>
|
|
284
287
|
<a href="../components/show-more.html">Show More</a>
|
|
285
288
|
<a href="../components/sortable.html">Sortable</a>
|
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
<k-filter-item filter-keywords="photo viewer photoviewer components"><a
|
|
105
105
|
href="../components/photo-viewer.html"
|
|
106
106
|
>Photo Viewer<br><small>Component</small></a></k-filter-item>
|
|
107
|
+
<k-filter-item filter-keywords="progress loading components"><a
|
|
108
|
+
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
107
109
|
<k-filter-item filter-keywords="resize components"><a
|
|
108
110
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
109
111
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
@@ -280,6 +282,7 @@
|
|
|
280
282
|
<a href="../components/nav.html">Nav</a>
|
|
281
283
|
<a href="../components/nav-spacer.html">Nav Spacer</a>
|
|
282
284
|
<a href="../components/photo-viewer.html">Photo Viewer</a>
|
|
285
|
+
<a href="../components/progress.html">Progress</a>
|
|
283
286
|
<a href="../components/resize.html">Resize</a>
|
|
284
287
|
<a href="../components/show-more.html">Show More</a>
|
|
285
288
|
<a href="../components/sortable.html">Sortable</a>
|
package/docs/utils/string.html
CHANGED
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
<k-filter-item filter-keywords="photo viewer photoviewer components"><a
|
|
105
105
|
href="../components/photo-viewer.html"
|
|
106
106
|
>Photo Viewer<br><small>Component</small></a></k-filter-item>
|
|
107
|
+
<k-filter-item filter-keywords="progress loading components"><a
|
|
108
|
+
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
107
109
|
<k-filter-item filter-keywords="resize components"><a
|
|
108
110
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
109
111
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
@@ -280,6 +282,7 @@
|
|
|
280
282
|
<a href="../components/nav.html">Nav</a>
|
|
281
283
|
<a href="../components/nav-spacer.html">Nav Spacer</a>
|
|
282
284
|
<a href="../components/photo-viewer.html">Photo Viewer</a>
|
|
285
|
+
<a href="../components/progress.html">Progress</a>
|
|
283
286
|
<a href="../components/resize.html">Resize</a>
|
|
284
287
|
<a href="../components/show-more.html">Show More</a>
|
|
285
288
|
<a href="../components/sortable.html">Sortable</a>
|
package/docs/utils/theme.html
CHANGED
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
<k-filter-item filter-keywords="photo viewer photoviewer components"><a
|
|
105
105
|
href="../components/photo-viewer.html"
|
|
106
106
|
>Photo Viewer<br><small>Component</small></a></k-filter-item>
|
|
107
|
+
<k-filter-item filter-keywords="progress loading components"><a
|
|
108
|
+
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
107
109
|
<k-filter-item filter-keywords="resize components"><a
|
|
108
110
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
109
111
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
@@ -280,6 +282,7 @@
|
|
|
280
282
|
<a href="../components/nav.html">Nav</a>
|
|
281
283
|
<a href="../components/nav-spacer.html">Nav Spacer</a>
|
|
282
284
|
<a href="../components/photo-viewer.html">Photo Viewer</a>
|
|
285
|
+
<a href="../components/progress.html">Progress</a>
|
|
283
286
|
<a href="../components/resize.html">Resize</a>
|
|
284
287
|
<a href="../components/show-more.html">Show More</a>
|
|
285
288
|
<a href="../components/sortable.html">Sortable</a>
|
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
<k-filter-item filter-keywords="photo viewer photoviewer components"><a
|
|
105
105
|
href="../components/photo-viewer.html"
|
|
106
106
|
>Photo Viewer<br><small>Component</small></a></k-filter-item>
|
|
107
|
+
<k-filter-item filter-keywords="progress loading components"><a
|
|
108
|
+
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
107
109
|
<k-filter-item filter-keywords="resize components"><a
|
|
108
110
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
109
111
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
@@ -280,6 +282,7 @@
|
|
|
280
282
|
<a href="../components/nav.html">Nav</a>
|
|
281
283
|
<a href="../components/nav-spacer.html">Nav Spacer</a>
|
|
282
284
|
<a href="../components/photo-viewer.html">Photo Viewer</a>
|
|
285
|
+
<a href="../components/progress.html">Progress</a>
|
|
283
286
|
<a href="../components/resize.html">Resize</a>
|
|
284
287
|
<a href="../components/show-more.html">Show More</a>
|
|
285
288
|
<a href="../components/sortable.html">Sortable</a>
|
package/docs/utils/type.html
CHANGED
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
<k-filter-item filter-keywords="photo viewer photoviewer components"><a
|
|
105
105
|
href="../components/photo-viewer.html"
|
|
106
106
|
>Photo Viewer<br><small>Component</small></a></k-filter-item>
|
|
107
|
+
<k-filter-item filter-keywords="progress loading components"><a
|
|
108
|
+
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
107
109
|
<k-filter-item filter-keywords="resize components"><a
|
|
108
110
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
109
111
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
@@ -280,6 +282,7 @@
|
|
|
280
282
|
<a href="../components/nav.html">Nav</a>
|
|
281
283
|
<a href="../components/nav-spacer.html">Nav Spacer</a>
|
|
282
284
|
<a href="../components/photo-viewer.html">Photo Viewer</a>
|
|
285
|
+
<a href="../components/progress.html">Progress</a>
|
|
283
286
|
<a href="../components/resize.html">Resize</a>
|
|
284
287
|
<a href="../components/show-more.html">Show More</a>
|
|
285
288
|
<a href="../components/sortable.html">Sortable</a>
|
package/docs/utils/wait.html
CHANGED
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
<k-filter-item filter-keywords="photo viewer photoviewer components"><a
|
|
105
105
|
href="../components/photo-viewer.html"
|
|
106
106
|
>Photo Viewer<br><small>Component</small></a></k-filter-item>
|
|
107
|
+
<k-filter-item filter-keywords="progress loading components"><a
|
|
108
|
+
href="../components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
107
109
|
<k-filter-item filter-keywords="resize components"><a
|
|
108
110
|
href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
109
111
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
@@ -280,6 +282,7 @@
|
|
|
280
282
|
<a href="../components/nav.html">Nav</a>
|
|
281
283
|
<a href="../components/nav-spacer.html">Nav Spacer</a>
|
|
282
284
|
<a href="../components/photo-viewer.html">Photo Viewer</a>
|
|
285
|
+
<a href="../components/progress.html">Progress</a>
|
|
283
286
|
<a href="../components/resize.html">Resize</a>
|
|
284
287
|
<a href="../components/show-more.html">Show More</a>
|
|
285
288
|
<a href="../components/sortable.html">Sortable</a>
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
<page pageName="Progress" title="Progress - Components - Kempo Docs - A Web Components Solution">
|
|
2
|
+
<content location="header"></content>
|
|
3
|
+
<content>
|
|
4
|
+
<h1 class="ta-center">Progress</h1>
|
|
5
|
+
|
|
6
|
+
<k-accordion persistent-id="toc" class="b r mb">
|
|
7
|
+
<k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
|
|
8
|
+
<k-accordion-panel name="toc-panel">
|
|
9
|
+
<div class="m">
|
|
10
|
+
<h6>Examples</h6>
|
|
11
|
+
<a href="#basicUsage">Basic Usage</a><br />
|
|
12
|
+
<a href="#offset">Offset</a><br />
|
|
13
|
+
<a href="#color">Color</a><br />
|
|
14
|
+
<a href="#label">Label</a><br />
|
|
15
|
+
<a href="#styles">Styles</a><br />
|
|
16
|
+
<a href="#multiple">Multiple Bars</a><br />
|
|
17
|
+
<a href="#indeterminate">Indeterminate</a><br />
|
|
18
|
+
|
|
19
|
+
<h6 class="mt"><a href="#jsRef" class="no-link">JavaScript Reference</a></h6>
|
|
20
|
+
<a href="#constructor">Constructor</a><br />
|
|
21
|
+
<a href="#requirements">Requirements</a><br />
|
|
22
|
+
<a href="#attributes">Attributes</a><br />
|
|
23
|
+
</div>
|
|
24
|
+
</k-accordion-panel>
|
|
25
|
+
</k-accordion>
|
|
26
|
+
|
|
27
|
+
<h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
|
|
28
|
+
<p>Create a progress bar using the <code>k-progress</code> component, set the size with the <code>percentage</code> attribute.</p>
|
|
29
|
+
<div class="row -mx">
|
|
30
|
+
<div class="col m-span-12 px">
|
|
31
|
+
<k-card label="HTML">
|
|
32
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-progress</span> <span class="hljs-attr">percentage</span>=<span class="hljs-string">"50"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-progress</span>></span></code></pre>
|
|
33
|
+
</k-card>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="col m-span-12 px">
|
|
36
|
+
<k-card label="Output">
|
|
37
|
+
<k-progress percentage="50"></k-progress>
|
|
38
|
+
</k-card>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<h3 id="offset"><a href="#offset" class="no-link">Offset</a></h3>
|
|
43
|
+
<p>Set the bar offset with the <code>offset</code> attribute.</p>
|
|
44
|
+
<div class="row -mx">
|
|
45
|
+
<div class="col m-span-12 px">
|
|
46
|
+
<k-card label="HTML">
|
|
47
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-progress</span> <span class="hljs-attr">percentage</span>=<span class="hljs-string">"50"</span> <span class="hljs-attr">offset</span>=<span class="hljs-string">"25"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-progress</span>></span></code></pre>
|
|
48
|
+
</k-card>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="col m-span-12 px">
|
|
51
|
+
<k-card label="Output">
|
|
52
|
+
<k-progress percentage="50" offset="25"></k-progress>
|
|
53
|
+
</k-card>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<h3 id="color"><a href="#color" class="no-link">Color</a></h3>
|
|
58
|
+
<p>Set the color with the <code>color</code> attribute.</p>
|
|
59
|
+
<div class="row -mx">
|
|
60
|
+
<div class="col m-span-12 px">
|
|
61
|
+
<k-card label="HTML">
|
|
62
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-progress</span> <span class="hljs-attr">percentage</span>=<span class="hljs-string">"50"</span> <span class="hljs-attr">color</span>=<span class="hljs-string">"green"</span>></span><span class="hljs-tag"></<span class="hljs-name">k-progress</span>></span></code></pre>
|
|
63
|
+
</k-card>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="col m-span-12 px">
|
|
66
|
+
<k-card label="Output">
|
|
67
|
+
<k-progress percentage="50" color="green"></k-progress>
|
|
68
|
+
</k-card>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<h3 id="label"><a href="#label" class="no-link">Label</a></h3>
|
|
73
|
+
<p>Add a <code>label</code> attribute to see the percentage label added to the bar.</p>
|
|
74
|
+
<div class="row -mx">
|
|
75
|
+
<div class="col m-span-12 px">
|
|
76
|
+
<k-card label="HTML">
|
|
77
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-progress</span> <span class="hljs-attr">percentage</span>=<span class="hljs-string">"33"</span> <span class="hljs-attr">label</span>></span><span class="hljs-tag"></<span class="hljs-name">k-progress</span>></span></code></pre>
|
|
78
|
+
</k-card>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="col m-span-12 px">
|
|
81
|
+
<k-card label="Output">
|
|
82
|
+
<k-progress percentage="33" label></k-progress>
|
|
83
|
+
</k-card>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<h3 id="styles"><a href="#styles" class="no-link">Styles</a></h3>
|
|
88
|
+
<p>You can do quite a bit of customization with the css.</p>
|
|
89
|
+
<div class="row -mx">
|
|
90
|
+
<div class="col m-span-12 px">
|
|
91
|
+
<k-card label="HTML">
|
|
92
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-progress</span><br /> <span class="hljs-attr">style</span>=<span class="hljs-string">"<br /> --radius: 0;<br /> height: 3rem;<br /> color: pink;<br /> font-size: 3rem;<br /> background-color: #ccf;<br /> "</span><br /> <span class="hljs-attr">percentage</span>=<span class="hljs-string">"33"</span><br /> <span class="hljs-attr">label</span><br />></span><span class="hljs-tag"></<span class="hljs-name">k-progress</span>></span></code></pre>
|
|
93
|
+
</k-card>
|
|
94
|
+
</div>
|
|
95
|
+
<div class="col m-span-12 px">
|
|
96
|
+
<k-card label="Output">
|
|
97
|
+
<k-progress
|
|
98
|
+
style="
|
|
99
|
+
--radius: 0;
|
|
100
|
+
height: 3rem;
|
|
101
|
+
color: pink;
|
|
102
|
+
font-size: 3rem;
|
|
103
|
+
background-color: #ccf;
|
|
104
|
+
"
|
|
105
|
+
percentage="33"
|
|
106
|
+
label
|
|
107
|
+
></k-progress>
|
|
108
|
+
</k-card>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
<h3 id="multiple"><a href="#multiple" class="no-link">Multiple Bars</a></h3>
|
|
113
|
+
<p>Use a pipe-delimited (<code>|</code>) list in <code>percentage</code>, <code>color</code>, and <code>offset</code> to make multiple bars.</p>
|
|
114
|
+
<div class="row -mx">
|
|
115
|
+
<div class="col m-span-12 px">
|
|
116
|
+
<k-card label="HTML">
|
|
117
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-progress</span><br /> <span class="hljs-attr">percentage</span>=<span class="hljs-string">"25|25"</span><br /> <span class="hljs-attr">color</span>=<span class="hljs-string">"blue|red"</span><br /> <span class="hljs-attr">offset</span>=<span class="hljs-string">"0|50"</span><br />></span><span class="hljs-tag"></<span class="hljs-name">k-progress</span>></span></code></pre>
|
|
118
|
+
</k-card>
|
|
119
|
+
</div>
|
|
120
|
+
<div class="col m-span-12 px">
|
|
121
|
+
<k-card label="Output">
|
|
122
|
+
<k-progress
|
|
123
|
+
percentage="25|25"
|
|
124
|
+
color="blue|red"
|
|
125
|
+
offset="0|50"
|
|
126
|
+
></k-progress>
|
|
127
|
+
</k-card>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<h3 id="indeterminate"><a href="#indeterminate" class="no-link">Indeterminate</a></h3>
|
|
132
|
+
<p>Use the <code>indeterminate</code> attribute to add infinite animations to the progress bar. set the speed by giving it a value of the animation time (defualt = <code>2s</code>)</p>
|
|
133
|
+
<div class="row -mx">
|
|
134
|
+
<div class="col m-span-12 px">
|
|
135
|
+
<k-card label="HTML">
|
|
136
|
+
<pre><code class="hljs xml"><span class="hljs-tag"><<span class="hljs-name">k-progress</span> <span class="hljs-attr">indeterminate</span> ></span><span class="hljs-tag"></<span class="hljs-name">k-progress</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">br</span> /></span><br /><span class="hljs-tag"><<span class="hljs-name">k-progress</span> <span class="hljs-attr">indeterminate</span>=<span class="hljs-string">"1s"</span> ></span><span class="hljs-tag"></<span class="hljs-name">k-progress</span>></span><br /><span class="hljs-tag"><<span class="hljs-name">br</span> /></span><br /><span class="hljs-tag"><<span class="hljs-name">k-progress</span> <span class="hljs-attr">indeterminate</span>=<span class="hljs-string">"4s"</span> <span class="hljs-attr">color</span>=<span class="hljs-string">"linear-gradient(to right, var(--c_secondary) 0%, var(--c_primary) 100%)"</span> ></span><span class="hljs-tag"></<span class="hljs-name">k-progress</span>></span></code></pre>
|
|
137
|
+
</k-card>
|
|
138
|
+
</div>
|
|
139
|
+
<div class="col m-span-12 px">
|
|
140
|
+
<k-card label="Output">
|
|
141
|
+
<k-progress indeterminate ></k-progress>
|
|
142
|
+
<br />
|
|
143
|
+
<k-progress indeterminate="1s" ></k-progress>
|
|
144
|
+
<br />
|
|
145
|
+
<k-progress indeterminate="4s" color="linear-gradient(to right, var(--c_secondary) 0%, var(--c_primary) 100%)" ></k-progress>
|
|
146
|
+
</k-card>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<h2 id="jsRef"><a href="#jsRef" class="no-link">JavaScript Reference</a></h2>
|
|
151
|
+
|
|
152
|
+
<h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
|
|
153
|
+
<h6>Extends <a href="./shadow-component.html">ShadowComponent</a></h6>
|
|
154
|
+
<h5><code>new Progress()</code></h5>
|
|
155
|
+
|
|
156
|
+
<h3 id="requirements"><a href="#requirements" class="no-link">Requirements</a></h3>
|
|
157
|
+
<ul>
|
|
158
|
+
<li><a href="./shadow-component.html">ShadowComponent</a></li>
|
|
159
|
+
</ul>
|
|
160
|
+
|
|
161
|
+
<h3 id="attributes"><a href="#attributes" class="no-link">Attributes</a></h3>
|
|
162
|
+
<h5><code>percentage<i>: string</i></code></h5>
|
|
163
|
+
<p>The progress percentage(s). Accepts values from <code>0</code> to <code>100</code>. Use pipe-delimited (<code>|</code>) values for multiple bars. Default is <code>25</code>.</p>
|
|
164
|
+
|
|
165
|
+
<h5><code>offset<i>: string</i></code></h5>
|
|
166
|
+
<p>The offset position for the bar(s). Use pipe-delimited (<code>|</code>) values to match the number of bars in <code>percentage</code>. Default is <code>0</code>.</p>
|
|
167
|
+
|
|
168
|
+
<h5><code>color<i>: string</i></code></h5>
|
|
169
|
+
<p>The fill color for the bar(s). Supports any CSS color value including hex, rgb, variables, and gradients. Use pipe-delimited (<code>|</code>) values for multiple bars. Default is <code>var(--c_primary)</code>.</p>
|
|
170
|
+
|
|
171
|
+
<h5><code>label<i>: boolean</i></code></h5>
|
|
172
|
+
<p>When present, displays the percentage value inside the progress bar.</p>
|
|
173
|
+
|
|
174
|
+
<h5><code>indeterminate<i>: string</i></code></h5>
|
|
175
|
+
<p>When present, creates an animated indeterminate progress bar. Optionally set the animation duration (e.g., <code>indeterminate="1s"</code>, <code>indeterminate="4s"</code>). Default duration is <code>2s</code>.</p>
|
|
176
|
+
</content>
|
|
177
|
+
<content location="scripts">
|
|
178
|
+
<script type="module" src="{{pathToRoot}}src/components/Progress.js"></script>
|
|
179
|
+
<script type="module" src="{{pathToRoot}}src/components/Accordion.js"></script>
|
|
180
|
+
<script type="module" src="{{pathToRoot}}src/components/Card.js"></script>
|
|
181
|
+
</content>
|
|
182
|
+
</page>
|
package/docs-src/index.page.html
CHANGED
|
@@ -143,6 +143,12 @@
|
|
|
143
143
|
<p class="tc-muted">Lightbox gallery for viewing images with zoom and navigation.</p>
|
|
144
144
|
</a>
|
|
145
145
|
</div>
|
|
146
|
+
<div class="span-12 t-span-6 d-span-4 px">
|
|
147
|
+
<a href="{{pathToRoot}}components/progress.html" class="card mb no-link d-b">
|
|
148
|
+
<h3 class="tc-primary">Progress</h3>
|
|
149
|
+
<p class="tc-muted">A progress bar for loading states.</p>
|
|
150
|
+
</a>
|
|
151
|
+
</div>
|
|
146
152
|
<div class="span-12 t-span-6 d-span-4 px">
|
|
147
153
|
<a href="{{pathToRoot}}components/resize.html" class="card mb no-link d-b">
|
|
148
154
|
<h3 class="tc-primary">Resize</h3>
|
|
@@ -88,6 +88,8 @@
|
|
|
88
88
|
<k-filter-item filter-keywords="photo viewer photoviewer components"><a
|
|
89
89
|
href="{{pathToRoot}}components/photo-viewer.html"
|
|
90
90
|
>Photo Viewer<br><small>Component</small></a></k-filter-item>
|
|
91
|
+
<k-filter-item filter-keywords="progress loading components"><a
|
|
92
|
+
href="{{pathToRoot}}components/progress.html">Progress<br><small>Component</small></a></k-filter-item>
|
|
91
93
|
<k-filter-item filter-keywords="resize components"><a
|
|
92
94
|
href="{{pathToRoot}}components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
|
|
93
95
|
<k-filter-item filter-keywords="show more showmore components"><a
|
|
@@ -264,6 +266,7 @@
|
|
|
264
266
|
<a href="{{pathToRoot}}components/nav.html">Nav</a>
|
|
265
267
|
<a href="{{pathToRoot}}components/nav-spacer.html">Nav Spacer</a>
|
|
266
268
|
<a href="{{pathToRoot}}components/photo-viewer.html">Photo Viewer</a>
|
|
269
|
+
<a href="{{pathToRoot}}components/progress.html">Progress</a>
|
|
267
270
|
<a href="{{pathToRoot}}components/resize.html">Resize</a>
|
|
268
271
|
<a href="{{pathToRoot}}components/show-more.html">Show More</a>
|
|
269
272
|
<a href="{{pathToRoot}}components/sortable.html">Sortable</a>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kempo-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Lit based web-component library",
|
|
6
6
|
"main": "index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "node scripts/build.js",
|
|
15
|
-
"docs": "npx kempo-server --root docs --config docs/prod.config.json",
|
|
15
|
+
"docs": "npx kempo-server --root docs --config docs/prod.config.json --port 8084",
|
|
16
16
|
"dev": "npx kempo-server --root docs-src --port 8083",
|
|
17
17
|
"icon": "node bin/icon.js",
|
|
18
18
|
"geticon": "node bin/get_icon.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"highlight.js": "^11.11.1",
|
|
38
38
|
"js-beautify": "^1.15.4",
|
|
39
|
-
"kempo-server": "^3.0
|
|
39
|
+
"kempo-server": "^3.1.0",
|
|
40
40
|
"kempo-testing-framework": "^1.4.6",
|
|
41
41
|
"terser": "^5.43.1"
|
|
42
42
|
},
|