@inglorious/ui 7.1.0 → 7.1.2
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/package.json +20 -20
- package/src/controls/button-group/template.js +5 -3
- package/src/controls/combobox/template.js +10 -6
- package/src/controls/file-upload/template.js +21 -15
- package/src/controls/icon-button/template.js +5 -3
- package/src/controls/input/template.js +28 -20
- package/src/controls/radio-group/template.js +5 -3
- package/src/controls/slider/template.js +15 -9
- package/src/controls/textarea/template.js +21 -15
- package/src/data-display/avatar/template.js +5 -3
- package/src/data-display/chip/template.js +7 -5
- package/src/data-display/list/template.js +5 -3
- package/src/examples/dashboard/primitive-section.js +27 -24
- package/src/feedback/alert/template.js +24 -18
- package/src/feedback/dialog/template.js +23 -17
- package/src/feedback/snackbar/template.js +12 -10
- package/src/index.js +1 -1
- package/src/navigation/bottom-navigation/template.js +12 -6
- package/src/navigation/breadcrumbs/template.js +25 -22
- package/src/navigation/menu/template.js +10 -6
- package/src/navigation/pagination/template.js +18 -14
- package/src/navigation/speed-dial/template.js +9 -7
- package/src/navigation/stepper/template.js +5 -3
- package/src/surfaces/accordion/template.js +5 -3
- package/types/data-display/carousel.d.ts +1 -6
- package/types/data-display/typography.d.ts +1 -6
- package/types/navigation/pagination.d.ts +1 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inglorious/ui",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.2",
|
|
4
4
|
"description": "A design system for Inglorious Web with render-function components and customizable themes",
|
|
5
5
|
"author": "Matteo Antony Mistretta <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -300,28 +300,28 @@
|
|
|
300
300
|
"**/*.css"
|
|
301
301
|
],
|
|
302
302
|
"peerDependencies": {
|
|
303
|
-
"@inglorious/charts": "10.0.
|
|
304
|
-
"@inglorious/store": "11.0.
|
|
305
|
-
"@inglorious/utils": "
|
|
306
|
-
"@inglorious/web": "6.4.
|
|
303
|
+
"@inglorious/charts": "10.0.2",
|
|
304
|
+
"@inglorious/store": "11.0.2",
|
|
305
|
+
"@inglorious/utils": "4.0.0",
|
|
306
|
+
"@inglorious/web": "6.4.2"
|
|
307
307
|
},
|
|
308
308
|
"devDependencies": {
|
|
309
|
-
"@fontsource/material-symbols-outlined": "^5.
|
|
310
|
-
"@fortawesome/fontawesome-free": "^7.
|
|
311
|
-
"@storybook/addon-docs": "^10.5.6",
|
|
312
|
-
"@storybook/web-components-vite": "^10.5.6",
|
|
313
|
-
"happy-dom": "^15.11.0",
|
|
314
|
-
"jsdom": "^25.0.0",
|
|
315
|
-
"lucide": "^0.575.0",
|
|
316
|
-
"prettier": "^3.6.2",
|
|
317
|
-
"storybook": "^10.5.6",
|
|
318
|
-
"vite": "^7.3.1",
|
|
319
|
-
"vitest": "^4.0.15",
|
|
309
|
+
"@fontsource/material-symbols-outlined": "^5.3.5",
|
|
310
|
+
"@fortawesome/fontawesome-free": "^7.3.1",
|
|
320
311
|
"@inglorious/eslint-config": "1.1.2",
|
|
321
|
-
"@inglorious/
|
|
322
|
-
"@inglorious/
|
|
323
|
-
"@inglorious/vite-plugin-vue": "1.0.
|
|
324
|
-
"@inglorious/web": "6.4.
|
|
312
|
+
"@inglorious/store": "11.0.2",
|
|
313
|
+
"@inglorious/vite-plugin-jsx": "2.0.2",
|
|
314
|
+
"@inglorious/vite-plugin-vue": "1.0.3",
|
|
315
|
+
"@inglorious/web": "6.4.2",
|
|
316
|
+
"@storybook/addon-docs": "^10.6.0",
|
|
317
|
+
"@storybook/web-components-vite": "^10.6.0",
|
|
318
|
+
"happy-dom": "^20.14.0",
|
|
319
|
+
"jsdom": "^30.0.1",
|
|
320
|
+
"lucide": "^1.41.0",
|
|
321
|
+
"prettier": "^3.9.6",
|
|
322
|
+
"storybook": "^10.6.0",
|
|
323
|
+
"vite": "^8.2.2",
|
|
324
|
+
"vitest": "^5.0.0"
|
|
325
325
|
},
|
|
326
326
|
"engines": {
|
|
327
327
|
"node": ">= 22"
|
|
@@ -75,9 +75,11 @@ export function render(props) {
|
|
|
75
75
|
children: html`
|
|
76
76
|
${icon ? html`<span class="iw-button-icon">${icon}</span>` : null}
|
|
77
77
|
${children ?? label}
|
|
78
|
-
${
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
${
|
|
79
|
+
iconAfter
|
|
80
|
+
? html`<span class="iw-button-icon">${iconAfter}</span>`
|
|
81
|
+
: null
|
|
82
|
+
}
|
|
81
83
|
`,
|
|
82
84
|
variant: itemVariant ?? variant,
|
|
83
85
|
color: itemColor ?? color,
|
|
@@ -46,9 +46,11 @@ export const Combobox = {
|
|
|
46
46
|
[`iw-combobox-${props.size}`]: props.size !== "md",
|
|
47
47
|
})}
|
|
48
48
|
>
|
|
49
|
-
${
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
${
|
|
50
|
+
props.label
|
|
51
|
+
? html`<label class="iw-combobox-label">${props.label}</label>`
|
|
52
|
+
: null
|
|
53
|
+
}
|
|
52
54
|
${this.renderControl?.(props)}
|
|
53
55
|
${when(props.isOpen, () => this.renderDropdown?.(props))}
|
|
54
56
|
</div>`
|
|
@@ -118,9 +120,11 @@ export const Combobox = {
|
|
|
118
120
|
)
|
|
119
121
|
|
|
120
122
|
return html`<span class="iw-combobox-value"
|
|
121
|
-
>${
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
>${
|
|
124
|
+
selectedOption
|
|
125
|
+
? getOptionLabel(selectedOption)
|
|
126
|
+
: String(props.selectedValue)
|
|
127
|
+
}</span
|
|
124
128
|
>`
|
|
125
129
|
},
|
|
126
130
|
|
|
@@ -55,16 +55,20 @@ export function render(props) {
|
|
|
55
55
|
|
|
56
56
|
return html`
|
|
57
57
|
<div class=${classMap(wrapperClasses)}>
|
|
58
|
-
${
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
58
|
+
${
|
|
59
|
+
label
|
|
60
|
+
? html`
|
|
61
|
+
<label for=${uploadId} class="iw-upload-label">
|
|
62
|
+
${label}
|
|
63
|
+
${
|
|
64
|
+
isRequired
|
|
65
|
+
? html`<span class="iw-upload-required">*</span>`
|
|
66
|
+
: null
|
|
67
|
+
}
|
|
68
|
+
</label>
|
|
69
|
+
`
|
|
70
|
+
: null
|
|
71
|
+
}
|
|
68
72
|
|
|
69
73
|
<div class=${classMap(fieldClasses)}>
|
|
70
74
|
<input
|
|
@@ -90,11 +94,13 @@ export function render(props) {
|
|
|
90
94
|
|
|
91
95
|
<div class="iw-upload-field-summary">${summaryText}</div>
|
|
92
96
|
|
|
93
|
-
${
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
${
|
|
98
|
+
error
|
|
99
|
+
? html`<span class="iw-upload-error-message">${error}</span>`
|
|
100
|
+
: hint
|
|
101
|
+
? html`<span class="iw-upload-hint">${hint}</span>`
|
|
102
|
+
: null
|
|
103
|
+
}
|
|
98
104
|
</div>
|
|
99
105
|
`
|
|
100
106
|
}
|
|
@@ -27,9 +27,11 @@ export function render(props) {
|
|
|
27
27
|
<span class="iw-icon-button-content iw-icon-button-content-${direction}">
|
|
28
28
|
${icon ? html`<span class="iw-button-icon">${icon}</span>` : null}
|
|
29
29
|
${label}
|
|
30
|
-
${
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
${
|
|
31
|
+
iconAfter
|
|
32
|
+
? html`<span class="iw-button-icon">${iconAfter}</span>`
|
|
33
|
+
: null
|
|
34
|
+
}
|
|
33
35
|
</span>
|
|
34
36
|
`
|
|
35
37
|
|
|
@@ -63,16 +63,20 @@ export function render(props) {
|
|
|
63
63
|
|
|
64
64
|
return html`
|
|
65
65
|
<div class=${classMap(wrapperClasses)}>
|
|
66
|
-
${
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
${
|
|
67
|
+
label
|
|
68
|
+
? html`
|
|
69
|
+
<label for=${inputId} class="iw-input-label">
|
|
70
|
+
${label}
|
|
71
|
+
${
|
|
72
|
+
isRequired
|
|
73
|
+
? html`<span class="iw-input-required">*</span>`
|
|
74
|
+
: null
|
|
75
|
+
}
|
|
76
|
+
</label>
|
|
77
|
+
`
|
|
78
|
+
: null
|
|
79
|
+
}
|
|
76
80
|
|
|
77
81
|
<div class="iw-input-frame">
|
|
78
82
|
${icon ? html`<span class="iw-input-icon">${icon}</span>` : null}
|
|
@@ -93,18 +97,22 @@ export function render(props) {
|
|
|
93
97
|
${ref((element) => applyElementProps(element, rest))}
|
|
94
98
|
/>
|
|
95
99
|
|
|
96
|
-
${
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
${
|
|
101
|
+
iconAfter
|
|
102
|
+
? html`<span class="iw-input-icon iw-input-icon-after"
|
|
103
|
+
>${iconAfter}</span
|
|
104
|
+
>`
|
|
105
|
+
: null
|
|
106
|
+
}
|
|
101
107
|
</div>
|
|
102
108
|
|
|
103
|
-
${
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
109
|
+
${
|
|
110
|
+
error
|
|
111
|
+
? html`<span class="iw-input-error-message">${error}</span>`
|
|
112
|
+
: hint
|
|
113
|
+
? html`<span class="iw-input-hint">${hint}</span>`
|
|
114
|
+
: null
|
|
115
|
+
}
|
|
108
116
|
</div>
|
|
109
117
|
`
|
|
110
118
|
}
|
|
@@ -45,9 +45,11 @@ export function render(props) {
|
|
|
45
45
|
?disabled=${isDisabled}
|
|
46
46
|
${ref((element) => applyElementProps(element, rest))}
|
|
47
47
|
>
|
|
48
|
-
${
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
${
|
|
49
|
+
label
|
|
50
|
+
? html`<legend class="iw-radio-group-label">${label}</legend>`
|
|
51
|
+
: null
|
|
52
|
+
}
|
|
51
53
|
${options.map((option) => {
|
|
52
54
|
const {
|
|
53
55
|
label: optionLabel,
|
|
@@ -48,15 +48,21 @@ export function render(props) {
|
|
|
48
48
|
|
|
49
49
|
return html`
|
|
50
50
|
<div class=${classMap(classes)}>
|
|
51
|
-
${
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
${
|
|
52
|
+
(label || isValueVisible) &&
|
|
53
|
+
html`<div class="iw-slider-header">
|
|
54
|
+
${
|
|
55
|
+
label
|
|
56
|
+
? html`<label for=${inputId}>${label}</label>`
|
|
57
|
+
: html`<span></span>`
|
|
58
|
+
}
|
|
59
|
+
${
|
|
60
|
+
isValueVisible
|
|
61
|
+
? html`<output class="iw-slider-value">${value}</output>`
|
|
62
|
+
: null
|
|
63
|
+
}
|
|
64
|
+
</div>`
|
|
65
|
+
}
|
|
60
66
|
<input
|
|
61
67
|
id=${inputId}
|
|
62
68
|
class="iw-slider-input"
|
|
@@ -57,16 +57,20 @@ export function render(props) {
|
|
|
57
57
|
|
|
58
58
|
return html`
|
|
59
59
|
<div class=${classMap(wrapperClasses)}>
|
|
60
|
-
${
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
60
|
+
${
|
|
61
|
+
label
|
|
62
|
+
? html`
|
|
63
|
+
<label for=${textareaId} class="iw-textarea-label">
|
|
64
|
+
${label}
|
|
65
|
+
${
|
|
66
|
+
isRequired
|
|
67
|
+
? html`<span class="iw-textarea-required">*</span>`
|
|
68
|
+
: null
|
|
69
|
+
}
|
|
70
|
+
</label>
|
|
71
|
+
`
|
|
72
|
+
: null
|
|
73
|
+
}
|
|
70
74
|
|
|
71
75
|
<textarea
|
|
72
76
|
id=${textareaId}
|
|
@@ -84,11 +88,13 @@ export function render(props) {
|
|
|
84
88
|
${ref((element) => applyElementProps(element, rest))}
|
|
85
89
|
></textarea>
|
|
86
90
|
|
|
87
|
-
${
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
${
|
|
92
|
+
error
|
|
93
|
+
? html`<span class="iw-textarea-error-message">${error}</span>`
|
|
94
|
+
: hint
|
|
95
|
+
? html`<span class="iw-textarea-hint">${hint}</span>`
|
|
96
|
+
: null
|
|
97
|
+
}
|
|
92
98
|
</div>
|
|
93
99
|
`
|
|
94
100
|
}
|
|
@@ -57,9 +57,11 @@ export function render(props) {
|
|
|
57
57
|
style=${styleMap(styles)}
|
|
58
58
|
@click=${onClick}
|
|
59
59
|
>
|
|
60
|
-
${
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
${
|
|
61
|
+
src
|
|
62
|
+
? html`<img class="iw-avatar-img" src=${src} alt=${alt} />`
|
|
63
|
+
: (children ?? initials ?? "?")
|
|
64
|
+
}
|
|
63
65
|
</span>`
|
|
64
66
|
}
|
|
65
67
|
|
|
@@ -31,10 +31,12 @@ export function render(props) {
|
|
|
31
31
|
|
|
32
32
|
return html`<span class=${classMap(classes)}>
|
|
33
33
|
<span class="iw-chip-label">${children}</span>
|
|
34
|
-
${
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
${
|
|
35
|
+
isRemovable
|
|
36
|
+
? html`<button type="button" class="iw-chip-remove" @click=${onClick}>
|
|
37
|
+
×
|
|
38
|
+
</button>`
|
|
39
|
+
: null
|
|
40
|
+
}
|
|
39
41
|
</span>`
|
|
40
42
|
}
|
|
@@ -96,9 +96,11 @@ export const List = {
|
|
|
96
96
|
meta,
|
|
97
97
|
index,
|
|
98
98
|
path: [...path, index],
|
|
99
|
-
})}${
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
})}${
|
|
100
|
+
shouldDivide
|
|
101
|
+
? html`<li class="iw-list-divider" role="separator"></li>`
|
|
102
|
+
: null
|
|
103
|
+
}`
|
|
102
104
|
},
|
|
103
105
|
)
|
|
104
106
|
|
|
@@ -77,22 +77,24 @@ export const PrimitiveSection = {
|
|
|
77
77
|
description ??
|
|
78
78
|
"This section is wired for per-primitive docs and examples.",
|
|
79
79
|
})}
|
|
80
|
-
${
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
80
|
+
${
|
|
81
|
+
useCases.length
|
|
82
|
+
? html`
|
|
83
|
+
<div style="margin-top: 16px; text-align: left;">
|
|
84
|
+
${Typography.render({
|
|
85
|
+
variant: "body2",
|
|
86
|
+
color: "secondary",
|
|
87
|
+
children: "Common use cases",
|
|
88
|
+
})}
|
|
89
|
+
<ul style="margin: 8px 0 0; padding-left: 20px;">
|
|
90
|
+
${useCases.map(
|
|
91
|
+
(useCase) => html`<li>${useCase}</li>`,
|
|
92
|
+
)}
|
|
93
|
+
</ul>
|
|
94
|
+
</div>
|
|
95
|
+
`
|
|
96
|
+
: ""
|
|
97
|
+
}
|
|
96
98
|
</div>
|
|
97
99
|
`,
|
|
98
100
|
}),
|
|
@@ -123,10 +125,9 @@ export const PrimitiveSection = {
|
|
|
123
125
|
color: "secondary",
|
|
124
126
|
children: "Code",
|
|
125
127
|
}),
|
|
126
|
-
html`<pre
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"// Example coming soon."}</code></pre>`,
|
|
128
|
+
html`<pre class="iw-primitive-code"><code>${
|
|
129
|
+
exampleCode ?? "// Example coming soon."
|
|
130
|
+
}</code></pre>`,
|
|
130
131
|
],
|
|
131
132
|
}),
|
|
132
133
|
Flex.render({
|
|
@@ -139,10 +140,12 @@ export const PrimitiveSection = {
|
|
|
139
140
|
children: "Result",
|
|
140
141
|
}),
|
|
141
142
|
html`<div class="iw-primitive-preview">
|
|
142
|
-
${
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
${
|
|
144
|
+
examplePreview ??
|
|
145
|
+
html`<div class="iw-primitive-preview-empty">
|
|
146
|
+
Preview coming soon.
|
|
147
|
+
</div>`
|
|
148
|
+
}
|
|
146
149
|
</div>`,
|
|
147
150
|
],
|
|
148
151
|
}),
|
|
@@ -55,24 +55,30 @@ export function render(props) {
|
|
|
55
55
|
${icon ? html`<div class="iw-alert-icon">${icon}</div>` : null}
|
|
56
56
|
<div class="iw-alert-content">
|
|
57
57
|
${title ? html`<div class="iw-alert-title">${title}</div>` : null}
|
|
58
|
-
${
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
${
|
|
59
|
+
content
|
|
60
|
+
? html`<div class="iw-alert-description">${content}</div>`
|
|
61
|
+
: null
|
|
62
|
+
}
|
|
61
63
|
</div>
|
|
62
|
-
${
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
64
|
+
${
|
|
65
|
+
hasTrailing
|
|
66
|
+
? html`<div class="iw-alert-trailing">
|
|
67
|
+
${action ? html`<div class="iw-alert-action">${action}</div>` : null}
|
|
68
|
+
${
|
|
69
|
+
onClose
|
|
70
|
+
? html`<button
|
|
71
|
+
type="button"
|
|
72
|
+
class="iw-alert-close"
|
|
73
|
+
aria-label="Dismiss"
|
|
74
|
+
@click=${onClose}
|
|
75
|
+
>
|
|
76
|
+
×
|
|
77
|
+
</button>`
|
|
78
|
+
: null
|
|
79
|
+
}
|
|
80
|
+
</div>`
|
|
81
|
+
: null
|
|
82
|
+
}
|
|
77
83
|
</div>`
|
|
78
84
|
}
|
|
@@ -43,23 +43,29 @@ export function render(props) {
|
|
|
43
43
|
aria-modal="true"
|
|
44
44
|
@click=${(event) => event.stopPropagation()}
|
|
45
45
|
>
|
|
46
|
-
${
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
46
|
+
${
|
|
47
|
+
(title || onClose) &&
|
|
48
|
+
html`<div class="iw-dialog-header">
|
|
49
|
+
${title ? html`<div class="iw-dialog-title">${title}</div>` : null}
|
|
50
|
+
${
|
|
51
|
+
onClose
|
|
52
|
+
? html`<button
|
|
53
|
+
type="button"
|
|
54
|
+
class="iw-dialog-close"
|
|
55
|
+
aria-label="Close"
|
|
56
|
+
@click=${onClose}
|
|
57
|
+
>
|
|
58
|
+
×
|
|
59
|
+
</button>`
|
|
60
|
+
: null
|
|
61
|
+
}
|
|
62
|
+
</div>`
|
|
63
|
+
}
|
|
64
|
+
${
|
|
65
|
+
description
|
|
66
|
+
? html`<div class="iw-dialog-description">${description}</div>`
|
|
67
|
+
: null
|
|
68
|
+
}
|
|
63
69
|
${children ? html`<div class="iw-dialog-body">${children}</div>` : null}
|
|
64
70
|
${actions ? html`<div class="iw-dialog-actions">${actions}</div>` : null}
|
|
65
71
|
</div>
|
|
@@ -43,16 +43,18 @@ export function render(props) {
|
|
|
43
43
|
<div class="iw-snackbar-content">
|
|
44
44
|
<span class="iw-snackbar-message">${message}</span>
|
|
45
45
|
${action ? html`<span class="iw-snackbar-action">${action}</span>` : null}
|
|
46
|
-
${
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
${
|
|
47
|
+
onClose
|
|
48
|
+
? html`<button
|
|
49
|
+
type="button"
|
|
50
|
+
class="iw-snackbar-close"
|
|
51
|
+
aria-label="Dismiss"
|
|
52
|
+
@click=${onClose}
|
|
53
|
+
>
|
|
54
|
+
×
|
|
55
|
+
</button>`
|
|
56
|
+
: null
|
|
57
|
+
}
|
|
56
58
|
</div>
|
|
57
59
|
</div>`
|
|
58
60
|
}
|
package/src/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { Button } from "./controls/button/index.js"
|
|
|
2
2
|
export { ButtonGroup } from "./controls/button-group/index.js"
|
|
3
3
|
export { Checkbox } from "./controls/checkbox/index.js"
|
|
4
4
|
export { Fab } from "./controls/fab/index.js"
|
|
5
|
+
export { FileUpload } from "./controls/file-upload/index.js"
|
|
5
6
|
export { IconButton } from "./controls/icon-button/index.js"
|
|
6
7
|
export { Input } from "./controls/input/index.js"
|
|
7
8
|
export { RadioGroup } from "./controls/radio-group/index.js"
|
|
@@ -10,7 +11,6 @@ export { Select } from "./controls/select/index.js"
|
|
|
10
11
|
export { Slider } from "./controls/slider/index.js"
|
|
11
12
|
export { Switch } from "./controls/switch/index.js"
|
|
12
13
|
export { Textarea } from "./controls/textarea/index.js"
|
|
13
|
-
export { FileUpload } from "./controls/file-upload/index.js"
|
|
14
14
|
export { Avatar } from "./data-display/avatar/index.js"
|
|
15
15
|
export { Badge } from "./data-display/badge/index.js"
|
|
16
16
|
export { BeforeAfter } from "./data-display/before-after/index.js"
|
|
@@ -79,12 +79,18 @@ export const BottomNavigation = {
|
|
|
79
79
|
props.onChange?.(currentValue)
|
|
80
80
|
}}
|
|
81
81
|
>
|
|
82
|
-
${
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
82
|
+
${
|
|
83
|
+
action.icon
|
|
84
|
+
? html`<span class="iw-bottom-navigation-icon">${action.icon}</span>`
|
|
85
|
+
: null
|
|
86
|
+
}
|
|
87
|
+
${
|
|
88
|
+
props.hasLabels
|
|
89
|
+
? html`<span class="iw-bottom-navigation-label"
|
|
90
|
+
>${action.label}</span
|
|
91
|
+
>`
|
|
92
|
+
: null
|
|
93
|
+
}
|
|
88
94
|
</button>`
|
|
89
95
|
},
|
|
90
96
|
}
|
|
@@ -51,12 +51,13 @@ export const Breadcrumbs = {
|
|
|
51
51
|
<ol class="iw-breadcrumbs-list">
|
|
52
52
|
${items.map(
|
|
53
53
|
(item, index) =>
|
|
54
|
-
html`${this.renderItem(item, index, props)}${
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
html`${this.renderItem(item, index, props)}${
|
|
55
|
+
index < items.length - 1
|
|
56
|
+
? html`<li class="iw-breadcrumbs-separator" aria-hidden="true">
|
|
57
|
+
${separator}
|
|
58
|
+
</li>`
|
|
59
|
+
: null
|
|
60
|
+
}`,
|
|
60
61
|
)}
|
|
61
62
|
</ol>
|
|
62
63
|
</nav>`
|
|
@@ -74,22 +75,24 @@ export const Breadcrumbs = {
|
|
|
74
75
|
const isLast = index === props.items.length - 1
|
|
75
76
|
|
|
76
77
|
return html`<li class="iw-breadcrumbs-item iw-typography">
|
|
77
|
-
${
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
78
|
+
${
|
|
79
|
+
item.href && !isLast
|
|
80
|
+
? html`<a
|
|
81
|
+
href=${item.href}
|
|
82
|
+
class="iw-breadcrumbs-link"
|
|
83
|
+
@click=${item.onClick ?? null}
|
|
84
|
+
>
|
|
85
|
+
${item.label}
|
|
86
|
+
</a>`
|
|
87
|
+
: html`<span
|
|
88
|
+
class=${classMap({
|
|
89
|
+
"iw-breadcrumbs-current": isLast,
|
|
90
|
+
})}
|
|
91
|
+
aria-current=${isLast ? "page" : "false"}
|
|
92
|
+
>
|
|
93
|
+
${item.label}
|
|
94
|
+
</span>`
|
|
95
|
+
}
|
|
93
96
|
</li>`
|
|
94
97
|
},
|
|
95
98
|
}
|
|
@@ -85,13 +85,17 @@ export const Menu = {
|
|
|
85
85
|
props.onItemClick?.(item.value ?? index, item)
|
|
86
86
|
}}
|
|
87
87
|
>
|
|
88
|
-
${
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
${
|
|
89
|
+
item.icon
|
|
90
|
+
? html`<span class="iw-menu-item-icon">${item.icon}</span>`
|
|
91
|
+
: null
|
|
92
|
+
}
|
|
91
93
|
<span class="iw-menu-item-label">${item.label}</span>
|
|
92
|
-
${
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
${
|
|
95
|
+
item.trailing
|
|
96
|
+
? html`<span class="iw-menu-item-trailing">${item.trailing}</span>`
|
|
97
|
+
: null
|
|
98
|
+
}
|
|
95
99
|
</button>`
|
|
96
100
|
},
|
|
97
101
|
}
|
|
@@ -52,13 +52,15 @@ export const Pagination = {
|
|
|
52
52
|
class=${classMap({ "iw-pagination": true, ...extraClasses })}
|
|
53
53
|
aria-label="Pagination"
|
|
54
54
|
>
|
|
55
|
-
${
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
55
|
+
${
|
|
56
|
+
isFirstButtonVisible
|
|
57
|
+
? this.renderControl(props, {
|
|
58
|
+
label: "«",
|
|
59
|
+
target: 1,
|
|
60
|
+
isDisabled: page <= PRETTY_PAGE || isDisabled,
|
|
61
|
+
})
|
|
62
|
+
: null
|
|
63
|
+
}
|
|
62
64
|
${this.renderControl(props, {
|
|
63
65
|
label: "‹",
|
|
64
66
|
target: Math.max(PRETTY_PAGE, page - PRETTY_PAGE),
|
|
@@ -70,13 +72,15 @@ export const Pagination = {
|
|
|
70
72
|
target: Math.min(count, page + PRETTY_PAGE),
|
|
71
73
|
isDisabled: page >= count || isDisabled,
|
|
72
74
|
})}
|
|
73
|
-
${
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
${
|
|
76
|
+
isLastButtonVisible
|
|
77
|
+
? this.renderControl(props, {
|
|
78
|
+
label: "»",
|
|
79
|
+
target: count,
|
|
80
|
+
isDisabled: page >= count || isDisabled,
|
|
81
|
+
})
|
|
82
|
+
: null
|
|
83
|
+
}
|
|
80
84
|
</nav>`
|
|
81
85
|
},
|
|
82
86
|
|
|
@@ -40,13 +40,15 @@ export const SpeedDial = {
|
|
|
40
40
|
"iw-speed-dial-open": isOpen,
|
|
41
41
|
})}
|
|
42
42
|
>
|
|
43
|
-
${
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
${
|
|
44
|
+
isOpen
|
|
45
|
+
? html`<div class="iw-speed-dial-actions">
|
|
46
|
+
${actions.map((action, index) =>
|
|
47
|
+
this.renderAction(action, index, props),
|
|
48
|
+
)}
|
|
49
|
+
</div>`
|
|
50
|
+
: null
|
|
51
|
+
}
|
|
50
52
|
<button
|
|
51
53
|
type="button"
|
|
52
54
|
class="iw-speed-dial-trigger"
|
|
@@ -67,9 +67,11 @@ export const Stepper = {
|
|
|
67
67
|
<span class="iw-stepper-indicator">${completed ? "✓" : index + 1}</span>
|
|
68
68
|
<span class="iw-stepper-content">
|
|
69
69
|
<span class="iw-stepper-label">${step.label}</span>
|
|
70
|
-
${
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
${
|
|
71
|
+
step.optional
|
|
72
|
+
? html`<span class="iw-stepper-optional">${step.optional}</span>`
|
|
73
|
+
: null
|
|
74
|
+
}
|
|
73
75
|
</span>
|
|
74
76
|
</li>`
|
|
75
77
|
},
|
|
@@ -93,9 +93,11 @@ export const Accordion = {
|
|
|
93
93
|
<span class="iw-accordion-title">${title}</span>
|
|
94
94
|
<span class="iw-accordion-caret">▾</span>
|
|
95
95
|
</button>
|
|
96
|
-
${
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
${
|
|
97
|
+
isExpanded
|
|
98
|
+
? html`<div class="iw-accordion-panel">${content}</div>`
|
|
99
|
+
: null
|
|
100
|
+
}
|
|
99
101
|
</section>`
|
|
100
102
|
},
|
|
101
103
|
}
|
|
@@ -7,12 +7,7 @@ export type CarouselDirection = "previous" | "next"
|
|
|
7
7
|
export type CarouselArrowPlacement = "inside" | "outside"
|
|
8
8
|
export type CarouselArrowVariant = "default" | "outline" | "ghost"
|
|
9
9
|
export type CarouselArrowColor =
|
|
10
|
-
| "
|
|
11
|
-
| "secondary"
|
|
12
|
-
| "success"
|
|
13
|
-
| "warning"
|
|
14
|
-
| "error"
|
|
15
|
-
| "info"
|
|
10
|
+
"primary" | "secondary" | "success" | "warning" | "error" | "info"
|
|
16
11
|
|
|
17
12
|
export interface CarouselProps {
|
|
18
13
|
id?: string
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import type { TemplateResult } from "@inglorious/web"
|
|
2
2
|
|
|
3
3
|
export type TypographyVariant =
|
|
4
|
-
| "
|
|
5
|
-
| "h1"
|
|
6
|
-
| "h2"
|
|
7
|
-
| "h3"
|
|
8
|
-
| "caption"
|
|
9
|
-
| "overline"
|
|
4
|
+
"body" | "h1" | "h2" | "h3" | "caption" | "overline"
|
|
10
5
|
|
|
11
6
|
export interface TypographyProps {
|
|
12
7
|
id?: string
|
|
@@ -11,12 +11,7 @@ export interface PaginationProps {
|
|
|
11
11
|
isDisabled?: boolean
|
|
12
12
|
buttonVariant?: "default" | "outline" | "ghost"
|
|
13
13
|
buttonColor?:
|
|
14
|
-
| "
|
|
15
|
-
| "secondary"
|
|
16
|
-
| "success"
|
|
17
|
-
| "warning"
|
|
18
|
-
| "error"
|
|
19
|
-
| "info"
|
|
14
|
+
"primary" | "secondary" | "success" | "warning" | "error" | "info"
|
|
20
15
|
buttonSize?: "sm" | "md" | "lg"
|
|
21
16
|
itemClassName?: string
|
|
22
17
|
className?: string
|