@alacris/ui 0.6.1 → 0.7.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/README.md
CHANGED
|
@@ -47,9 +47,9 @@ The published package is plain ESM. Point an import map at a pinned CDN build of
|
|
|
47
47
|
{
|
|
48
48
|
"imports": {
|
|
49
49
|
"@alacris/core": "https://cdn.jsdelivr.net/npm/@alacris/core@0.11.5/dist/alacris.js",
|
|
50
|
-
"@alacris/ui": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.
|
|
51
|
-
"@alacris/ui/theme": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.
|
|
52
|
-
"@alacris/ui/components/": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.
|
|
50
|
+
"@alacris/ui": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.7.0/src/index.js",
|
|
51
|
+
"@alacris/ui/theme": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.7.0/src/theme/index.js",
|
|
52
|
+
"@alacris/ui/components/": "https://cdn.jsdelivr.net/npm/@alacris/ui@0.7.0/src/components/"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
</script>
|
package/package.json
CHANGED
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
// removes itself.
|
|
12
12
|
//
|
|
13
13
|
// @prop {string} variant='assist' — assist | filter | input | suggestion
|
|
14
|
-
// @prop {boolean} selected=false — filter chips
|
|
14
|
+
// @prop {boolean} selected=false — filter chips (toggle, check icon) and input chips
|
|
15
|
+
// (MD3 selected input chip: filled, no check;
|
|
16
|
+
// the app owns the state and its ARIA)
|
|
15
17
|
// @prop {boolean} disabled=false
|
|
16
18
|
// @prop {string} icon='' — leading icon name (check replaces it while
|
|
17
19
|
// a filter chip is selected)
|
|
@@ -73,7 +75,7 @@ const styles = css`
|
|
|
73
75
|
border-color ${sys.duration.short2} ${sys.easing.standard},
|
|
74
76
|
padding-inline-start ${sys.duration.short4} ${sys.easing.emphasized};
|
|
75
77
|
}
|
|
76
|
-
.
|
|
78
|
+
.checked .control { padding-inline-start: ${sys.space(2)}; }
|
|
77
79
|
.lead {
|
|
78
80
|
display: inline-flex;
|
|
79
81
|
align-items: center;
|
|
@@ -159,9 +161,11 @@ define('ui-chip', {
|
|
|
159
161
|
});
|
|
160
162
|
|
|
161
163
|
const checkWhen = computed(() => variant() === 'filter' && selected());
|
|
164
|
+
const filled = computed(() => checkWhen() || (variant() === 'input' && selected()));
|
|
162
165
|
const rootCls = computed(() =>
|
|
163
166
|
[
|
|
164
|
-
|
|
167
|
+
filled() ? 'selected' : '',
|
|
168
|
+
checkWhen() ? 'checked' : '',
|
|
165
169
|
icon() ? 'with-lead' : '',
|
|
166
170
|
dismissible() ? 'with-dismiss' : '',
|
|
167
171
|
].filter(Boolean).join(' '));
|
|
@@ -120,6 +120,9 @@ const styles = css`
|
|
|
120
120
|
|
|
121
121
|
.std {
|
|
122
122
|
display: block;
|
|
123
|
+
/* The host is display: contents, so this panel is the flex item when the
|
|
124
|
+
sheet sits in a row: it must keep its width, not shrink to nothing. */
|
|
125
|
+
flex: none;
|
|
123
126
|
block-size: 100%;
|
|
124
127
|
inline-size: 0;
|
|
125
128
|
overflow: hidden;
|