@nice2dev/icons 1.3.8 → 1.3.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,51 @@
1
1
  # @nice2dev/icons — Changelog
2
2
 
3
+ ## 1.3.9
4
+
5
+ ### Patch Changes
6
+
7
+ - f5f6251: **NiceIconPicker: a bindable value, stored as HTML, with icons stacked in its panel; a tidier NiceIconStacker.**
8
+
9
+ NiceIconPicker:
10
+
11
+ - Binds both ways: `value` / `defaultValue` + `onChange` (and `values` / `defaultValues` in
12
+ multi-select). Without a value it keeps its own selection — before, an uncontrolled picker showed
13
+ nothing after a pick.
14
+ - `valueFormat="html"`: the value is the icon drawn as an `<svg>` (1em, `currentColor`) to store in a
15
+ database, with what it was drawn from in `data-ntd-*` attributes, so the picker reads it back. The
16
+ ids inside are named after the drawing, so the markup can sit in another page. `parseIconHtml(html)`
17
+ reads it; `NiceIconHtml` draws it in React from the data, never injecting the markup.
18
+ - `stackable`: an "Overlays" tab in the panel with the NiceIconStacker — icons put on the chosen one,
19
+ nested, placed, sized, with text and colours; the stack goes into the same HTML (the default format
20
+ then). Swapping the icon keeps its stack.
21
+ - `displayMode`: the trigger shows the icon alone or the icon and its name; `optionDisplayMode` lists
22
+ the panel's icons alone or with names. Names show without `Ntd` everywhere (grid, search, names
23
+ read aloud), or as the entry's new `label`.
24
+ - `name` (a hidden input for forms), `aria-label` (the field's label, the icon's name after it), `id`,
25
+ `testId`, `iconProps` (what the icons are drawn with; the accent now follows the page background,
26
+ so cut-outs and stacked icons show in a dark theme).
27
+ - The panel opens above the trigger when there is more room there and never grows past what the
28
+ window and clipping ancestors leave visible.
29
+ - Fixed: the favourites star was a button inside the icon's button (invalid HTML, a console error);
30
+ with several icons selected the trigger shows their count (it showed the first icon); Escape while
31
+ picking an icon to stack goes back to the stack.
32
+
33
+ NiceIconStacker:
34
+
35
+ - Laid out to fit the picker's panel and less technical: the stack drawn large and small, the layers
36
+ as a list (select one to edit it — new icons go into it; Delete removes it), and under it the
37
+ selected layer only — its position on a pad shaped like its parent instead of a list of
38
+ `half-top-left`-style values, its size and text; turn, nudge, colours (swatches) and binding fold
39
+ under "More", the JSX code under "JSX code". Names show without `Ntd`.
40
+ - `onAddClick(target)` (the add button asks the host for the icon), the handle's `add(icon?)`,
41
+ `iconLabel`, `showCode`, `keepBase`.
42
+ - `addStackLayer` / `removeStackLayer` / `iconDisplayName` exported; new layers get short ids (`'1'`,
43
+ `'2'`…).
44
+
45
+ Behaviour changes: `values` passed as a constant `[]` no longer falls back to the picker's own
46
+ selection (a frozen controlled value, as with any controlled prop); the stacker's DOM is new (tests
47
+ that queried its `select` or radios need updating).
48
+
3
49
  ## 1.3.8
4
50
 
5
51
  ### Patch Changes