@nice2dev/icons 1.3.8 → 1.3.10
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 +99 -0
- package/dist/cjs/NiceIconPicker.js +310 -92
- package/dist/cjs/NiceIconStacker.js +137 -120
- package/dist/cjs/NiceIconValue.js +44 -0
- package/dist/cjs/client.js +11 -0
- package/dist/cjs/iconHtml.js +104 -0
- package/dist/cjs/iconStack.js +74 -1
- package/dist/cjs/iconValue.js +473 -0
- package/dist/cjs/icons/actions.js +39 -8
- package/dist/cjs/icons/files.js +23 -2
- package/dist/cjs/icons/fintech.js +12 -5
- package/dist/cjs/icons/index.js +1 -0
- package/dist/cjs/icons/media.js +7 -4
- package/dist/cjs/icons/realestate.js +8 -7
- package/dist/cjs/icons/shapes.js +55 -4
- package/dist/cjs/index.js +12 -0
- package/dist/cjs/nicetodev-icons.css +1 -1
- package/dist/esm/NiceIconPicker.js +313 -95
- package/dist/esm/NiceIconStacker.js +140 -123
- package/dist/esm/NiceIconValue.js +41 -0
- package/dist/esm/client.js +4 -1
- package/dist/esm/iconHtml.js +100 -0
- package/dist/esm/iconStack.js +72 -2
- package/dist/esm/iconValue.js +470 -0
- package/dist/esm/icons/actions.js +39 -9
- package/dist/esm/icons/files.js +23 -2
- package/dist/esm/icons/fintech.js +12 -5
- package/dist/esm/icons/index.js +1 -1
- package/dist/esm/icons/media.js +8 -5
- package/dist/esm/icons/realestate.js +8 -7
- package/dist/esm/icons/shapes.js +55 -4
- package/dist/esm/index.js +5 -2
- package/dist/esm/nicetodev-icons.css +1 -1
- package/dist/types/NiceIconPicker.d.ts +72 -20
- package/dist/types/NiceIconStacker.d.ts +30 -9
- package/dist/types/NiceIconValue.d.ts +40 -0
- package/dist/types/client.d.ts +8 -2
- package/dist/types/iconHtml.d.ts +22 -0
- package/dist/types/iconStack.d.ts +18 -0
- package/dist/types/iconValue.d.ts +22 -0
- package/dist/types/icons/actions.d.ts +1 -0
- package/dist/types/icons/index.d.ts +1 -1
- package/dist/types/index.d.ts +8 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,104 @@
|
|
|
1
1
|
# @nice2dev/icons — Changelog
|
|
2
2
|
|
|
3
|
+
## 1.3.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c694c87: **NiceIconPicker: a stack in every value format, stored as short code by default.**
|
|
8
|
+
|
|
9
|
+
`stackable` no longer needs HTML. With the default `valueFormat="name"` a plain icon stays its export
|
|
10
|
+
name (`NtdFolder`, as before), and a stack becomes short code. A folder with a star in its corner is
|
|
11
|
+
`Folder(Star@tr)`: 15 characters, against close to 1 kB as HTML.
|
|
12
|
+
|
|
13
|
+
The code nests like a function call, parent first, and gives each setting a sign of its own:
|
|
14
|
+
|
|
15
|
+
- `( , )`: what sits in the icon;
|
|
16
|
+
- `:o`: variant;
|
|
17
|
+
- `@tr`: position (`c t b l r`, corners, `h…` halfway);
|
|
18
|
+
- `%40`: size;
|
|
19
|
+
- `^15`: turn;
|
|
20
|
+
- `~5/-3`: nudge;
|
|
21
|
+
- `#2a2`: colours;
|
|
22
|
+
- `'3'`: text, with its own colour and size after it;
|
|
23
|
+
- `{count}`: bound text.
|
|
24
|
+
|
|
25
|
+
Names drop `Ntd`; a name or colour with one of the signs goes in backticks.
|
|
26
|
+
|
|
27
|
+
- **`valueFormat="json"`:** the same tree as JsonML, `["Folder",["Star",{"a":"tr"}]]`.
|
|
28
|
+
`valueFormat="html"` stays as in 1.3.9.
|
|
29
|
+
- **Every format is read, whatever the picker writes:** names, code, JSON and the HTML of 1.3.9.
|
|
30
|
+
Changing the format later breaks no stored value.
|
|
31
|
+
- **New:**
|
|
32
|
+
- `formatIconValue(layers, 'name' | 'json')` and `parseIconValue(text)`, outside React;
|
|
33
|
+
- `NiceIconValue`, which draws a stored value in any format and never injects markup.
|
|
34
|
+
- **`NiceIconHtml`** is now a deprecated wrapper of `NiceIconValue`.
|
|
35
|
+
- **`renderIconStack` / `NiceIconStack`** resolve a name without `Ntd` (`Star` → `NtdStar`).
|
|
36
|
+
|
|
37
|
+
Behaviour change: `stackable` without `valueFormat` used to write HTML (1.3.9) and now writes the
|
|
38
|
+
code. Pass `valueFormat="html"` to keep HTML. Values stored as HTML are still read; the next change
|
|
39
|
+
writes the picker's format.
|
|
40
|
+
|
|
41
|
+
- 4409530: Icons, showcase feedback round 40:
|
|
42
|
+
|
|
43
|
+
- **NtdFrameCorners** (new): the four-corner selection frame, shared with NtdGroup.
|
|
44
|
+
- NtdGroup: the frame is 2× the stroke width in the filled variants. Duotone shows the frame and
|
|
45
|
+
the top-left object in primary and the other object in secondary; vivid puts the frame in the
|
|
46
|
+
accent colour.
|
|
47
|
+
- NtdShuffle: redrawn as two S-curves, 2× the stroke width except in `outline`. The arrow
|
|
48
|
+
underneath breaks where the arrows cross, and the gap is worked out from the stroke width.
|
|
49
|
+
- NtdTruck: the filled variants are all primary. The box and the cab are one shape, level at
|
|
50
|
+
the bottom. Duotone and vivid now use the theme's colours (vivid had fixed blue and amber
|
|
51
|
+
wheels).
|
|
52
|
+
- NtdBitcoin: the ₿ alone, without the disc, 1.5× the stroke width.
|
|
53
|
+
- NtdBluetooth: 1.5× the stroke width except in `outline` (vivid had a fixed 2.2).
|
|
54
|
+
- NtdCopy: the back sheet is smaller; NtdApartment: the building and the door are narrower.
|
|
55
|
+
|
|
56
|
+
## 1.3.9
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- f5f6251: **NiceIconPicker: a bindable value, stored as HTML, with icons stacked in its panel; a tidier NiceIconStacker.**
|
|
61
|
+
|
|
62
|
+
NiceIconPicker:
|
|
63
|
+
|
|
64
|
+
- Binds both ways: `value` / `defaultValue` + `onChange` (and `values` / `defaultValues` in
|
|
65
|
+
multi-select). Without a value it keeps its own selection — before, an uncontrolled picker showed
|
|
66
|
+
nothing after a pick.
|
|
67
|
+
- `valueFormat="html"`: the value is the icon drawn as an `<svg>` (1em, `currentColor`) to store in a
|
|
68
|
+
database, with what it was drawn from in `data-ntd-*` attributes, so the picker reads it back. The
|
|
69
|
+
ids inside are named after the drawing, so the markup can sit in another page. `parseIconHtml(html)`
|
|
70
|
+
reads it; `NiceIconHtml` draws it in React from the data, never injecting the markup.
|
|
71
|
+
- `stackable`: an "Overlays" tab in the panel with the NiceIconStacker — icons put on the chosen one,
|
|
72
|
+
nested, placed, sized, with text and colours; the stack goes into the same HTML (the default format
|
|
73
|
+
then). Swapping the icon keeps its stack.
|
|
74
|
+
- `displayMode`: the trigger shows the icon alone or the icon and its name; `optionDisplayMode` lists
|
|
75
|
+
the panel's icons alone or with names. Names show without `Ntd` everywhere (grid, search, names
|
|
76
|
+
read aloud), or as the entry's new `label`.
|
|
77
|
+
- `name` (a hidden input for forms), `aria-label` (the field's label, the icon's name after it), `id`,
|
|
78
|
+
`testId`, `iconProps` (what the icons are drawn with; the accent now follows the page background,
|
|
79
|
+
so cut-outs and stacked icons show in a dark theme).
|
|
80
|
+
- The panel opens above the trigger when there is more room there and never grows past what the
|
|
81
|
+
window and clipping ancestors leave visible.
|
|
82
|
+
- Fixed: the favourites star was a button inside the icon's button (invalid HTML, a console error);
|
|
83
|
+
with several icons selected the trigger shows their count (it showed the first icon); Escape while
|
|
84
|
+
picking an icon to stack goes back to the stack.
|
|
85
|
+
|
|
86
|
+
NiceIconStacker:
|
|
87
|
+
|
|
88
|
+
- Laid out to fit the picker's panel and less technical: the stack drawn large and small, the layers
|
|
89
|
+
as a list (select one to edit it — new icons go into it; Delete removes it), and under it the
|
|
90
|
+
selected layer only — its position on a pad shaped like its parent instead of a list of
|
|
91
|
+
`half-top-left`-style values, its size and text; turn, nudge, colours (swatches) and binding fold
|
|
92
|
+
under "More", the JSX code under "JSX code". Names show without `Ntd`.
|
|
93
|
+
- `onAddClick(target)` (the add button asks the host for the icon), the handle's `add(icon?)`,
|
|
94
|
+
`iconLabel`, `showCode`, `keepBase`.
|
|
95
|
+
- `addStackLayer` / `removeStackLayer` / `iconDisplayName` exported; new layers get short ids (`'1'`,
|
|
96
|
+
`'2'`…).
|
|
97
|
+
|
|
98
|
+
Behaviour changes: `values` passed as a constant `[]` no longer falls back to the picker's own
|
|
99
|
+
selection (a frozen controlled value, as with any controlled prop); the stacker's DOM is new (tests
|
|
100
|
+
that queried its `select` or radios need updating).
|
|
101
|
+
|
|
3
102
|
## 1.3.8
|
|
4
103
|
|
|
5
104
|
### Patch Changes
|