anentrypoint-design 0.0.359 → 0.0.360

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anentrypoint-design",
3
- "version": "0.0.359",
3
+ "version": "0.0.360",
4
4
  "description": "247420 design system SDK — webjsx + modified ripple-ui, single-file ESM bundle for reproducible use of the AnEntrypoint design.",
5
5
  "type": "module",
6
6
  "main": "./dist/247420.js",
@@ -27,12 +27,15 @@ export function Brand({ name = '247420', leaf } = {}) {
27
27
  * @param {string} [props.tone=''] - semantic color tone (empty = neutral).
28
28
  * @param {'sm'|'md'|'lg'} [props.size='md']
29
29
  * @param {boolean} [props.tag=false] - true renders a rectangular sentence-case variant for dense data (drops the all-caps pill styling). Orthogonal to tone.
30
+ * @param {Function} [props.onRemove] - if given, renders a trailing dismiss (x) button that calls onRemove() on click. Omitted entirely (no button) when not supplied.
30
31
  * @param {*} props.children
31
32
  * @returns {*} webjsx vnode
32
33
  */
33
- export function Chip({ tone = '', size = 'md', tag = false, children }) {
34
+ export function Chip({ tone = '', size = 'md', tag = false, onRemove, children }) {
34
35
  const sizeCls = size === 'sm' ? ' chip--sm' : (size === 'lg' ? ' chip--lg' : '');
35
- return h('span', { class: 'chip' + sizeCls + (tag ? ' chip--tag' : '') + (tone ? ' tone-' + tone : '') }, children);
36
+ return h('span', { class: 'chip' + sizeCls + (tag ? ' chip--tag' : '') + (tone ? ' tone-' + tone : '') + (onRemove ? ' ds-chip-removable' : '') },
37
+ children,
38
+ onRemove ? h('button', { type: 'button', class: 'ds-chip-remove-btn', 'aria-label': 'Remove', onclick: (e) => { e.stopPropagation(); onRemove(); } }, Icon('x')) : null);
36
39
  }
37
40
 
38
41
  /**
@@ -175,6 +175,25 @@
175
175
  .chip.tone-orange { background: color-mix(in oklab, var(--flame) 30%, var(--sun) 70%); color: var(--ink); }
176
176
  .chip.tone-yellow { background: var(--sun); color: var(--ink); }
177
177
 
178
+ /* Removable chip — a trailing dismiss (x) button for editable tag/filter
179
+ chip lists (session tags, saved-search chips). Reuses the chip's own
180
+ tone/size; the button itself stays neutral-at-rest, per the standing
181
+ color-reserved-for-meaning convention, tinting only on hover/focus. */
182
+ .chip.ds-chip-removable { padding-right: var(--space-1); }
183
+ .ds-chip-remove-btn {
184
+ display: inline-flex; align-items: center; justify-content: center;
185
+ width: 16px; height: 16px; margin-left: var(--space-half);
186
+ padding: 0; border: none; border-radius: var(--r-pill);
187
+ background: transparent; color: currentColor; opacity: 0.7;
188
+ cursor: pointer;
189
+ }
190
+ .ds-chip-remove-btn:hover, .ds-chip-remove-btn:focus-visible { opacity: 1; background: color-mix(in oklab, currentColor 16%, transparent); }
191
+ .ds-chip-remove-btn svg { width: 10px; height: 10px; }
192
+ @media (pointer: coarse) {
193
+ .ds-chip-remove-btn { width: 24px; height: 24px; margin-left: 0; }
194
+ .ds-chip-remove-btn svg { width: 12px; height: 12px; }
195
+ }
196
+
178
197
  /* ds-pill — plain neutral chip, distinct from the toned .ds-badge/.chip family
179
198
  (gmsniff's .pill: a bare rounded label with no semantic tone). */
180
199
  .ds-pill {