@ixfx/components 0.10.5 → 0.10.6

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.
@@ -40,6 +40,7 @@ This directory contains documentation for each component and some architectural
40
40
  - [range-input](./range-input.md)
41
41
  - [rating](./rating.md)
42
42
  - [select-horiz](./select-horiz.md)
43
+ - [shapefill-value](./shapefill-value.md)
43
44
  - [slider-input](./slider-input.md)
44
45
  - [snackbar](./snackbar.md)
45
46
  - [snap-container](./snap-container.md)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ixfx/components",
3
- "version": "0.10.5",
4
- "generated": "2026-09-15T20:31:17.553Z",
3
+ "version": "0.10.6",
4
+ "generated": "2026-09-16T09:39:40.476Z",
5
5
  "components": [
6
6
  {
7
7
  "name": "ac-text",
@@ -183,6 +183,11 @@
183
183
  "summary": "A horizontally scrolling, snap-to-center single-item picker. Children are ordinary elements you provide — the component doesn't render its own item markup, it just lays them out with scroll-snap, keep",
184
184
  "path": "docs-user/select-horiz.md"
185
185
  },
186
+ {
187
+ "name": "shapefill-value",
188
+ "summary": "A click-and-drag value input, sharing interaction semantics with `ixfx-radial-input`, but depicted as a shape outline (`rectangle` or `circle`) containing a concentric inner shape scaled to the curren",
189
+ "path": "docs-user/shapefill-value.md"
190
+ },
186
191
  {
187
192
  "name": "slider-input",
188
193
  "summary": "A linear SVG-based slider. Supports horizontal and vertical orientations, three value modes (single/dual/triple), three single-mode styles (range/bipolar/unipolar), triangle/needle/dot markers, and `v",
@@ -47,6 +47,7 @@ import '@ixfx/components/data-grid';
47
47
  - [range-input](docs-user/range-input.md): A label-free, fully styled range slider wrapping `<input type="range">`. Supports horizontal and vertical orientations, CSS variable theming, gradient fills, custom thumb shapes, and an optional value
48
48
  - [rating](docs-user/rating.md): A rating input that renders a row of glyphs (star / heart / square). Supports half-step increments, keyboard control, per-rank theming via CSS variables, and prominence-based hover feedback. Clicking
49
49
  - [select-horiz](docs-user/select-horiz.md): A horizontally scrolling, snap-to-center single-item picker. Children are ordinary elements you provide — the component doesn't render its own item markup, it just lays them out with scroll-snap, keep
50
+ - [shapefill-value](docs-user/shapefill-value.md): A click-and-drag value input, sharing interaction semantics with `ixfx-radial-input`, but depicted as a shape outline (`rectangle` or `circle`) containing a concentric inner shape scaled to the curren
50
51
  - [slider-input](docs-user/slider-input.md): A linear SVG-based slider. Supports horizontal and vertical orientations, three value modes (single/dual/triple), three single-mode styles (range/bipolar/unipolar), triangle/needle/dot markers, and `v
51
52
  - [snackbar](docs-user/snackbar.md): A small floating toolbar anchored in visual proximity to another element on the page (the "target"), built on the native Popover and CSS Anchor Positioning APIs.
52
53
  - [snap-container](docs-user/snap-container.md): A container that positions its child element at configurable snap positions along an axis. The child can be dragged, clicked to snap, or controlled via keyboard.
@@ -0,0 +1,125 @@
1
+ # ixfx-shapefill-value
2
+
3
+ A click-and-drag value input, sharing interaction semantics with `ixfx-radial-input`, but depicted as a shape outline (`rectangle` or `circle`) containing a concentric inner shape scaled to the current value. A value of 50% draws an inner shape at half the outline's size.
4
+
5
+ ---
6
+
7
+ ## Basic Usage
8
+
9
+ ```html
10
+ <ixfx-shapefill-value min="0" max="1" value="0.5"></ixfx-shapefill-value>
11
+ ```
12
+
13
+ The component has an intrinsic size of `2em x 2em`. Set width/height via CSS to resize:
14
+
15
+ ```html
16
+ <ixfx-shapefill-value display="rectangle" min="0" max="100" value="30" style="width: 60px; height: 60px;"></ixfx-shapefill-value>
17
+ ```
18
+
19
+ To fill a container:
20
+
21
+ ```html
22
+ <div style="width: 80px; height: 80px;">
23
+ <ixfx-shapefill-value min="0" max="1" value="0.5" style="width: 100%; height: 100%;"></ixfx-shapefill-value>
24
+ </div>
25
+ ```
26
+
27
+ ---
28
+
29
+ ## Attributes & Properties
30
+
31
+ | Attribute / Property | Type | Default | Description |
32
+ |---|---|---|---|
33
+ | `display` | `"circle"` \| `"rectangle"` | `"circle"` | Outline/fill shape |
34
+ | `fill-mode` | `"centre"` \| `"left"` \| `"right"` | `"centre"` | How the inner shape grows (see [Fill Modes](#fill-modes)) |
35
+ | `value` | `number` | `0` | Current value, within `min`…`max` |
36
+ | `min` | `number` | `0` | Minimum value |
37
+ | `max` | `number` | `100` | Maximum value |
38
+ | `step` | `number` | `undefined` | Keyboard step size. If unset, defaults to 10% of range |
39
+ | `stops` | `number` | `undefined` | Quantise to N discrete positions. Also sets keyboard step size |
40
+ | `disabled` | `boolean` | `false` | Disables all interaction. Reflected as attribute |
41
+ | `lighttouch` | `boolean` | `false` | Mouse wheel adjusts on hover, without requiring focus |
42
+
43
+ ### Sizing
44
+
45
+ Size via CSS `width`/`height`.
46
+
47
+ - `display="rectangle"` stretches to fill the host, so a landscape or portrait box produces a matching landscape or portrait rectangle:
48
+
49
+ ```html
50
+ <ixfx-shapefill-value display="rectangle" style="width: 160px; height: 60px;" min="0" max="1" value="0.6"></ixfx-shapefill-value>
51
+ ```
52
+
53
+ - `display="circle"` always keeps a 1:1 aspect ratio and letterboxes within a non-square host, so it stays a true circle rather than an ellipse.
54
+
55
+ ---
56
+
57
+ ## Fill Modes
58
+
59
+ - **`centre`** (default): the inner shape stays concentric with the outline, growing from the middle in all directions. A value of 50% is half the outline's size.
60
+ - **`left`** / **`right`**: the inner shape grows from the outline's left or right edge (mirror images of each other).
61
+ - For `rectangle`, this is a classic slider-bar fill: fixed height, width scales with value.
62
+ - For `circle`, the value circle's x-origin travels from the outline's left/right perimeter (value 0%) to the outline's centre (value 100%), while its radius grows the same way as `centre` — the combined effect is a circle that inflates outward from that edge.
63
+
64
+ ```html
65
+ <ixfx-shapefill-value display="rectangle" fill-mode="left" min="0" max="1" value="0.6"></ixfx-shapefill-value>
66
+ <ixfx-shapefill-value display="rectangle" fill-mode="right" min="0" max="1" value="0.6"></ixfx-shapefill-value>
67
+ <ixfx-shapefill-value display="circle" fill-mode="left" min="0" max="1" value="0.6"></ixfx-shapefill-value>
68
+ <ixfx-shapefill-value display="circle" fill-mode="right" min="0" max="1" value="0.6"></ixfx-shapefill-value>
69
+ ```
70
+
71
+ ---
72
+
73
+ ## Styling
74
+
75
+ CSS custom properties, set on the host:
76
+
77
+ | Variable | Default | Description |
78
+ |---|---|---|
79
+ | `--shapefill-value-outline-color` | `var(--surface-4)` | Outline stroke colour |
80
+ | `--shapefill-value-outline-width` | `2` | Outline stroke width (viewBox units) |
81
+ | `--shapefill-value-fill-color` | `var(--accent)` | Inner shape fill colour |
82
+ | `--shapefill-value-fill-transition` | `none` | Transition applied to the inner shape (e.g. `fill-opacity 0.15s ease`) |
83
+ | `--shapefill-value-focus-outline` | `2px solid var(--accent)` | Focus ring |
84
+ | `--shapefill-value-focus-outline-offset` | `2px` | Focus ring offset |
85
+
86
+ ```html
87
+ <ixfx-shapefill-value
88
+ style="
89
+ --shapefill-value-outline-color: hsl(280, 30%, 40%);
90
+ --shapefill-value-fill-color: hsl(280, 100%, 60%);
91
+ "
92
+ min="0" max="1" value="0.6"
93
+ ></ixfx-shapefill-value>
94
+ ```
95
+
96
+ ---
97
+
98
+ ## Events
99
+
100
+ | Event | Detail | Fired |
101
+ |---|---|---|
102
+ | `input` | `{ value, valueRelative }` | Continuously during user interaction (drag, keyboard, wheel) |
103
+ | `change` | `{ value, valueRelative, previousValue }` | Debounced ~150ms after user interaction settles, or immediately for programmatic value changes |
104
+
105
+ ```typescript
106
+ el.addEventListener('input', (event) => {
107
+ const { value, valueRelative } = event.detail;
108
+ });
109
+ ```
110
+
111
+ ---
112
+
113
+ ## Interaction
114
+
115
+ - **Mouse/touch:** press and drag vertically — up increases, down decreases. Full min-to-max range covers 2x the element's height. Hold Shift while dragging for finer control.
116
+ - **Keyboard:** the element must have focus. Arrow Up/Right increases, Arrow Down/Left decreases, by `step` (or 10% of range if unset). Home/End jump to `min`/`max`. Hold Shift for a finer step.
117
+ - **Mouse wheel:** requires focus by default; set `lighttouch` to react on hover instead.
118
+
119
+ ---
120
+
121
+ ## Disabled state
122
+
123
+ ```html
124
+ <ixfx-shapefill-value disabled min="0" max="1" value="0.7"></ixfx-shapefill-value>
125
+ ```
package/llms.txt CHANGED
@@ -47,6 +47,7 @@ import '@ixfx/components/data-grid';
47
47
  - [range-input](docs-user/range-input.md): A label-free, fully styled range slider wrapping `<input type="range">`. Supports horizontal and vertical orientations, CSS variable theming, gradient fills, custom thumb shapes, and an optional value
48
48
  - [rating](docs-user/rating.md): A rating input that renders a row of glyphs (star / heart / square). Supports half-step increments, keyboard control, per-rank theming via CSS variables, and prominence-based hover feedback. Clicking
49
49
  - [select-horiz](docs-user/select-horiz.md): A horizontally scrolling, snap-to-center single-item picker. Children are ordinary elements you provide — the component doesn't render its own item markup, it just lays them out with scroll-snap, keep
50
+ - [shapefill-value](docs-user/shapefill-value.md): A click-and-drag value input, sharing interaction semantics with `ixfx-radial-input`, but depicted as a shape outline (`rectangle` or `circle`) containing a concentric inner shape scaled to the curren
50
51
  - [slider-input](docs-user/slider-input.md): A linear SVG-based slider. Supports horizontal and vertical orientations, three value modes (single/dual/triple), three single-mode styles (range/bipolar/unipolar), triangle/needle/dot markers, and `v
51
52
  - [snackbar](docs-user/snackbar.md): A small floating toolbar anchored in visual proximity to another element on the page (the "target"), built on the native Popover and CSS Anchor Positioning APIs.
52
53
  - [snap-container](docs-user/snap-container.md): A container that positions its child element at configurable snap positions along an axis. The child can be dragged, clicked to snap, or controlled via keyboard.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ixfx/components",
3
3
  "type": "module",
4
- "version": "0.10.5",
4
+ "version": "0.10.6",
5
5
  "packageManager": "pnpm@10.0.0",
6
6
  "description": "Web components for ixfx — Lit-based UI toolkit",
7
7
  "author": "Clint Heyer",