@univers42/ui-collection 1.0.1
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 +652 -0
- package/dist/components/blocks/ColorPickerBoard.d.ts +2 -0
- package/dist/components/blocks/ColorPickerBoard.d.ts.map +1 -0
- package/dist/components/blocks/ColorPickerBoard.js +13 -0
- package/dist/components/blocks/ColorPickerBoard.js.map +1 -0
- package/dist/components/blocks/EmojiPickerBoard.d.ts +2 -0
- package/dist/components/blocks/EmojiPickerBoard.d.ts.map +1 -0
- package/dist/components/blocks/EmojiPickerBoard.js +13 -0
- package/dist/components/blocks/EmojiPickerBoard.js.map +1 -0
- package/dist/components/blocks/IconPickerBoard.d.ts +2 -0
- package/dist/components/blocks/IconPickerBoard.d.ts.map +1 -0
- package/dist/components/blocks/IconPickerBoard.js +13 -0
- package/dist/components/blocks/IconPickerBoard.js.map +1 -0
- package/dist/components/blocks/SlashMenuIcons.d.ts +2 -0
- package/dist/components/blocks/SlashMenuIcons.d.ts.map +1 -0
- package/dist/components/blocks/SlashMenuIcons.js +2 -0
- package/dist/components/blocks/SlashMenuIcons.js.map +1 -0
- package/dist/components/blocks/SlashMenuIconsBasic.d.ts +2 -0
- package/dist/components/blocks/SlashMenuIconsBasic.d.ts.map +1 -0
- package/dist/components/blocks/SlashMenuIconsBasic.js +2 -0
- package/dist/components/blocks/SlashMenuIconsBasic.js.map +1 -0
- package/dist/components/blocks/SlashMenuIconsExtended.d.ts +2 -0
- package/dist/components/blocks/SlashMenuIconsExtended.d.ts.map +1 -0
- package/dist/components/blocks/SlashMenuIconsExtended.js +2 -0
- package/dist/components/blocks/SlashMenuIconsExtended.js.map +1 -0
- package/dist/components/blocks/slashMenuCatalog.d.ts +2 -0
- package/dist/components/blocks/slashMenuCatalog.d.ts.map +1 -0
- package/dist/components/blocks/slashMenuCatalog.js +2 -0
- package/dist/components/blocks/slashMenuCatalog.js.map +1 -0
- package/dist/library/catalogs/index.d.ts +3 -0
- package/dist/library/catalogs/index.d.ts.map +1 -0
- package/dist/library/catalogs/index.js +3 -0
- package/dist/library/catalogs/index.js.map +1 -0
- package/dist/library/catalogs/slashMenuCatalog.d.ts +17 -0
- package/dist/library/catalogs/slashMenuCatalog.d.ts.map +1 -0
- package/dist/library/catalogs/slashMenuCatalog.js +294 -0
- package/dist/library/catalogs/slashMenuCatalog.js.map +1 -0
- package/dist/library/catalogs/types.d.ts +4 -0
- package/dist/library/catalogs/types.d.ts.map +1 -0
- package/dist/library/catalogs/types.js +13 -0
- package/dist/library/catalogs/types.js.map +1 -0
- package/dist/library/components/react/analytics/formula/FormulaCharts.d.ts +22 -0
- package/dist/library/components/react/analytics/formula/FormulaCharts.d.ts.map +1 -0
- package/dist/library/components/react/analytics/formula/FormulaCharts.js +91 -0
- package/dist/library/components/react/analytics/formula/FormulaCharts.js.map +1 -0
- package/dist/library/components/react/analytics/formula/TextDistributionCard.d.ts +8 -0
- package/dist/library/components/react/analytics/formula/TextDistributionCard.d.ts.map +1 -0
- package/dist/library/components/react/analytics/formula/TextDistributionCard.js +43 -0
- package/dist/library/components/react/analytics/formula/TextDistributionCard.js.map +1 -0
- package/dist/library/components/react/analytics/formula/index.d.ts +3 -0
- package/dist/library/components/react/analytics/formula/index.d.ts.map +1 -0
- package/dist/library/components/react/analytics/formula/index.js +14 -0
- package/dist/library/components/react/analytics/formula/index.js.map +1 -0
- package/dist/library/components/react/analytics/index.d.ts +3 -0
- package/dist/library/components/react/analytics/index.d.ts.map +1 -0
- package/dist/library/components/react/analytics/index.js +14 -0
- package/dist/library/components/react/analytics/index.js.map +1 -0
- package/dist/library/components/react/analytics/relation-rollup/RelationRollupCards.d.ts +21 -0
- package/dist/library/components/react/analytics/relation-rollup/RelationRollupCards.d.ts.map +1 -0
- package/dist/library/components/react/analytics/relation-rollup/RelationRollupCards.js +77 -0
- package/dist/library/components/react/analytics/relation-rollup/RelationRollupCards.js.map +1 -0
- package/dist/library/components/react/analytics/relation-rollup/RelationRollupCharts.d.ts +61 -0
- package/dist/library/components/react/analytics/relation-rollup/RelationRollupCharts.d.ts.map +1 -0
- package/dist/library/components/react/analytics/relation-rollup/RelationRollupCharts.js +58 -0
- package/dist/library/components/react/analytics/relation-rollup/RelationRollupCharts.js.map +1 -0
- package/dist/library/components/react/analytics/relation-rollup/RollupEditorHelpers.d.ts +51 -0
- package/dist/library/components/react/analytics/relation-rollup/RollupEditorHelpers.d.ts.map +1 -0
- package/dist/library/components/react/analytics/relation-rollup/RollupEditorHelpers.js +82 -0
- package/dist/library/components/react/analytics/relation-rollup/RollupEditorHelpers.js.map +1 -0
- package/dist/library/components/react/analytics/relation-rollup/index.d.ts +4 -0
- package/dist/library/components/react/analytics/relation-rollup/index.d.ts.map +1 -0
- package/dist/library/components/react/analytics/relation-rollup/index.js +15 -0
- package/dist/library/components/react/analytics/relation-rollup/index.js.map +1 -0
- package/dist/library/components/react/asset-picker/AssetPickerBoard.d.ts +20 -0
- package/dist/library/components/react/asset-picker/AssetPickerBoard.d.ts.map +1 -0
- package/dist/library/components/react/asset-picker/AssetPickerBoard.js +229 -0
- package/dist/library/components/react/asset-picker/AssetPickerBoard.js.map +1 -0
- package/dist/library/components/react/asset-picker/defaultTabs.d.ts +28 -0
- package/dist/library/components/react/asset-picker/defaultTabs.d.ts.map +1 -0
- package/dist/library/components/react/asset-picker/defaultTabs.js +104 -0
- package/dist/library/components/react/asset-picker/defaultTabs.js.map +1 -0
- package/dist/library/components/react/asset-picker/index.d.ts +4 -0
- package/dist/library/components/react/asset-picker/index.d.ts.map +1 -0
- package/dist/library/components/react/asset-picker/index.js +4 -0
- package/dist/library/components/react/asset-picker/index.js.map +1 -0
- package/dist/library/components/react/asset-picker/types.d.ts +45 -0
- package/dist/library/components/react/asset-picker/types.d.ts.map +1 -0
- package/dist/library/components/react/asset-picker/types.js +2 -0
- package/dist/library/components/react/asset-picker/types.js.map +1 -0
- package/dist/library/components/react/charts/BarCharts.d.ts +8 -0
- package/dist/library/components/react/charts/BarCharts.d.ts.map +1 -0
- package/dist/library/components/react/charts/BarCharts.js +38 -0
- package/dist/library/components/react/charts/BarCharts.js.map +1 -0
- package/dist/library/components/react/charts/DonutPieChart.d.ts +8 -0
- package/dist/library/components/react/charts/DonutPieChart.d.ts.map +1 -0
- package/dist/library/components/react/charts/DonutPieChart.js +52 -0
- package/dist/library/components/react/charts/DonutPieChart.js.map +1 -0
- package/dist/library/components/react/charts/LineChart.d.ts +7 -0
- package/dist/library/components/react/charts/LineChart.d.ts.map +1 -0
- package/dist/library/components/react/charts/LineChart.js +34 -0
- package/dist/library/components/react/charts/LineChart.js.map +1 -0
- package/dist/library/components/react/charts/MultiLineChart.d.ts +23 -0
- package/dist/library/components/react/charts/MultiLineChart.d.ts.map +1 -0
- package/dist/library/components/react/charts/MultiLineChart.js +93 -0
- package/dist/library/components/react/charts/MultiLineChart.js.map +1 -0
- package/dist/library/components/react/charts/SVGCharts.d.ts +17 -0
- package/dist/library/components/react/charts/SVGCharts.d.ts.map +1 -0
- package/dist/library/components/react/charts/SVGCharts.js +63 -0
- package/dist/library/components/react/charts/SVGCharts.js.map +1 -0
- package/dist/library/components/react/charts/chartUtils.d.ts +19 -0
- package/dist/library/components/react/charts/chartUtils.d.ts.map +1 -0
- package/dist/library/components/react/charts/chartUtils.js +64 -0
- package/dist/library/components/react/charts/chartUtils.js.map +1 -0
- package/dist/library/components/react/charts/index.d.ts +8 -0
- package/dist/library/components/react/charts/index.d.ts.map +1 -0
- package/dist/library/components/react/charts/index.js +18 -0
- package/dist/library/components/react/charts/index.js.map +1 -0
- package/dist/library/components/react/color-picker/ColorPickerBoard.d.ts +18 -0
- package/dist/library/components/react/color-picker/ColorPickerBoard.d.ts.map +1 -0
- package/dist/library/components/react/color-picker/ColorPickerBoard.js +382 -0
- package/dist/library/components/react/color-picker/ColorPickerBoard.js.map +1 -0
- package/dist/library/components/react/color-picker/index.d.ts +2 -0
- package/dist/library/components/react/color-picker/index.d.ts.map +1 -0
- package/dist/library/components/react/color-picker/index.js +13 -0
- package/dist/library/components/react/color-picker/index.js.map +1 -0
- package/dist/library/components/react/emoji-picker/EmojiPickerBoard.d.ts +14 -0
- package/dist/library/components/react/emoji-picker/EmojiPickerBoard.d.ts.map +1 -0
- package/dist/library/components/react/emoji-picker/EmojiPickerBoard.js +26 -0
- package/dist/library/components/react/emoji-picker/EmojiPickerBoard.js.map +1 -0
- package/dist/library/components/react/emoji-picker/emojiPickerData.d.ts +10 -0
- package/dist/library/components/react/emoji-picker/emojiPickerData.d.ts.map +1 -0
- package/dist/library/components/react/emoji-picker/emojiPickerData.js +27 -0
- package/dist/library/components/react/emoji-picker/emojiPickerData.js.map +1 -0
- package/dist/library/components/react/emoji-picker/index.d.ts +3 -0
- package/dist/library/components/react/emoji-picker/index.d.ts.map +1 -0
- package/dist/library/components/react/emoji-picker/index.js +14 -0
- package/dist/library/components/react/emoji-picker/index.js.map +1 -0
- package/dist/library/components/react/formula/ExampleBlock.d.ts +8 -0
- package/dist/library/components/react/formula/ExampleBlock.d.ts.map +1 -0
- package/dist/library/components/react/formula/ExampleBlock.js +41 -0
- package/dist/library/components/react/formula/ExampleBlock.js.map +1 -0
- package/dist/library/components/react/formula/index.d.ts +2 -0
- package/dist/library/components/react/formula/index.d.ts.map +1 -0
- package/dist/library/components/react/formula/index.js +13 -0
- package/dist/library/components/react/formula/index.js.map +1 -0
- package/dist/library/components/react/icon-picker/IconPickerBoard.d.ts +14 -0
- package/dist/library/components/react/icon-picker/IconPickerBoard.d.ts.map +1 -0
- package/dist/library/components/react/icon-picker/IconPickerBoard.js +26 -0
- package/dist/library/components/react/icon-picker/IconPickerBoard.js.map +1 -0
- package/dist/library/components/react/icon-picker/iconPickerData.d.ts +11 -0
- package/dist/library/components/react/icon-picker/iconPickerData.d.ts.map +1 -0
- package/dist/library/components/react/icon-picker/iconPickerData.js +52 -0
- package/dist/library/components/react/icon-picker/iconPickerData.js.map +1 -0
- package/dist/library/components/react/icon-picker/index.d.ts +3 -0
- package/dist/library/components/react/icon-picker/index.d.ts.map +1 -0
- package/dist/library/components/react/icon-picker/index.js +14 -0
- package/dist/library/components/react/icon-picker/index.js.map +1 -0
- package/dist/library/components/react/index.d.ts +10 -0
- package/dist/library/components/react/index.d.ts.map +1 -0
- package/dist/library/components/react/index.js +21 -0
- package/dist/library/components/react/index.js.map +1 -0
- package/dist/library/components/react/primitives/SettingsPrimitives.d.ts +39 -0
- package/dist/library/components/react/primitives/SettingsPrimitives.d.ts.map +1 -0
- package/dist/library/components/react/primitives/SettingsPrimitives.js +35 -0
- package/dist/library/components/react/primitives/SettingsPrimitives.js.map +1 -0
- package/dist/library/components/react/primitives/index.d.ts +2 -0
- package/dist/library/components/react/primitives/index.d.ts.map +1 -0
- package/dist/library/components/react/primitives/index.js +13 -0
- package/dist/library/components/react/primitives/index.js.map +1 -0
- package/dist/library/components/react/theme/ThemeToggle.d.ts +12 -0
- package/dist/library/components/react/theme/ThemeToggle.d.ts.map +1 -0
- package/dist/library/components/react/theme/ThemeToggle.js +57 -0
- package/dist/library/components/react/theme/ThemeToggle.js.map +1 -0
- package/dist/library/components/react/theme/index.d.ts +2 -0
- package/dist/library/components/react/theme/index.d.ts.map +1 -0
- package/dist/library/components/react/theme/index.js +13 -0
- package/dist/library/components/react/theme/index.js.map +1 -0
- package/dist/library/icons/react/cn.d.ts +2 -0
- package/dist/library/icons/react/cn.d.ts.map +1 -0
- package/dist/library/icons/react/cn.js +15 -0
- package/dist/library/icons/react/cn.js.map +1 -0
- package/dist/library/icons/react/index.d.ts +2 -0
- package/dist/library/icons/react/index.d.ts.map +1 -0
- package/dist/library/icons/react/index.js +2 -0
- package/dist/library/icons/react/index.js.map +1 -0
- package/dist/library/icons/react/slash-menu/SlashMenuIconsBasic.d.ts +20 -0
- package/dist/library/icons/react/slash-menu/SlashMenuIconsBasic.d.ts.map +1 -0
- package/dist/library/icons/react/slash-menu/SlashMenuIconsBasic.js +72 -0
- package/dist/library/icons/react/slash-menu/SlashMenuIconsBasic.js.map +1 -0
- package/dist/library/icons/react/slash-menu/SlashMenuIconsExtended.d.ts +14 -0
- package/dist/library/icons/react/slash-menu/SlashMenuIconsExtended.d.ts.map +1 -0
- package/dist/library/icons/react/slash-menu/SlashMenuIconsExtended.js +54 -0
- package/dist/library/icons/react/slash-menu/SlashMenuIconsExtended.js.map +1 -0
- package/dist/library/icons/react/slash-menu/index.d.ts +3 -0
- package/dist/library/icons/react/slash-menu/index.d.ts.map +1 -0
- package/dist/library/icons/react/slash-menu/index.js +14 -0
- package/dist/library/icons/react/slash-menu/index.js.map +1 -0
- package/dist/library/index.d.ts +11 -0
- package/dist/library/index.d.ts.map +1 -0
- package/dist/library/index.js +9 -0
- package/dist/library/index.js.map +1 -0
- package/dist/library/media/collections/emojis.d.ts +2 -0
- package/dist/library/media/collections/emojis.d.ts.map +1 -0
- package/dist/library/media/collections/emojis.js +44 -0
- package/dist/library/media/collections/emojis.js.map +1 -0
- package/dist/library/media/collections/index.d.ts +12 -0
- package/dist/library/media/collections/index.d.ts.map +1 -0
- package/dist/library/media/collections/index.js +34 -0
- package/dist/library/media/collections/index.js.map +1 -0
- package/dist/library/media/collections/other-media.d.ts +2 -0
- package/dist/library/media/collections/other-media.d.ts.map +1 -0
- package/dist/library/media/collections/other-media.js +60 -0
- package/dist/library/media/collections/other-media.js.map +1 -0
- package/dist/library/media/collections/photos.d.ts +2 -0
- package/dist/library/media/collections/photos.d.ts.map +1 -0
- package/dist/library/media/collections/photos.js +25 -0
- package/dist/library/media/collections/photos.js.map +1 -0
- package/dist/library/media/collections/svg.d.ts +2 -0
- package/dist/library/media/collections/svg.d.ts.map +1 -0
- package/dist/library/media/collections/svg.js +51 -0
- package/dist/library/media/collections/svg.js.map +1 -0
- package/dist/library/media/collections/videos.d.ts +2 -0
- package/dist/library/media/collections/videos.d.ts.map +1 -0
- package/dist/library/media/collections/videos.js +35 -0
- package/dist/library/media/collections/videos.js.map +1 -0
- package/dist/library/media/index.d.ts +6 -0
- package/dist/library/media/index.d.ts.map +1 -0
- package/dist/library/media/index.js +6 -0
- package/dist/library/media/index.js.map +1 -0
- package/dist/library/media/providers.d.ts +13 -0
- package/dist/library/media/providers.d.ts.map +1 -0
- package/dist/library/media/providers.js +39 -0
- package/dist/library/media/providers.js.map +1 -0
- package/dist/library/media/registry.d.ts +19 -0
- package/dist/library/media/registry.d.ts.map +1 -0
- package/dist/library/media/registry.js +35 -0
- package/dist/library/media/registry.js.map +1 -0
- package/dist/library/media/types.d.ts +53 -0
- package/dist/library/media/types.d.ts.map +1 -0
- package/dist/library/media/types.js +26 -0
- package/dist/library/media/types.js.map +1 -0
- package/dist/library/media/utils.d.ts +6 -0
- package/dist/library/media/utils.d.ts.map +1 -0
- package/dist/library/media/utils.js +77 -0
- package/dist/library/media/utils.js.map +1 -0
- package/package.json +143 -0
package/README.md
ADDED
|
@@ -0,0 +1,652 @@
|
|
|
1
|
+
# @univers42/ui-collection
|
|
2
|
+
|
|
3
|
+
Reusable UI library for:
|
|
4
|
+
|
|
5
|
+
- media registries and curated assets
|
|
6
|
+
- React slash-menu icons
|
|
7
|
+
- slash-menu block catalogs
|
|
8
|
+
- color picker boards
|
|
9
|
+
- a unified tabbed asset picker for emojis, SVGs, icons, and future asset families
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @univers42/ui-collection react
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Local Build
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install
|
|
21
|
+
npm run build
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Releases and Upgrades
|
|
25
|
+
|
|
26
|
+
This package is set up to be consumed as a normal npm package, so downstream repositories can upgrade with:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm update @univers42/ui-collection
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
For that to work:
|
|
33
|
+
|
|
34
|
+
- this repository must publish new semver versions to an npm-compatible registry
|
|
35
|
+
- downstream repositories must depend on a semver range such as `^0.1.0`, not an exact pinned version
|
|
36
|
+
|
|
37
|
+
The repository now includes:
|
|
38
|
+
|
|
39
|
+
- `prepack` packaging hooks in [package.json](/home/settes/cursus/trascendence/UI-Collection/package.json)
|
|
40
|
+
- a publish workflow in [.github/workflows/publish-package.yml](/home/settes/cursus/trascendence/UI-Collection/.github/workflows/publish-package.yml)
|
|
41
|
+
- a release guide in [RELEASING.md](/home/settes/cursus/trascendence/UI-Collection/RELEASING.md)
|
|
42
|
+
|
|
43
|
+
### Using This Package in Another Repository
|
|
44
|
+
|
|
45
|
+
#### 1. Install it
|
|
46
|
+
|
|
47
|
+
Use a semver range so the dependency can receive future compatible updates:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm install @univers42/ui-collection@^1.0.0 react
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If the current published series is still `0.x`, install the matching range instead:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm install @univers42/ui-collection@^0.1.0 react
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
#### 2. Check how it is saved in `package.json`
|
|
60
|
+
|
|
61
|
+
Recommended:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"@univers42/ui-collection": "^1.0.0"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Avoid exact pinned versions such as `"1.0.0"` if you want `npm update` to move forward automatically within the allowed semver range.
|
|
72
|
+
|
|
73
|
+
#### 3. Update it later
|
|
74
|
+
|
|
75
|
+
When a newer compatible version is published, update it with:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm update @univers42/ui-collection
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Then review the lockfile diff and run the consumer repository checks as usual.
|
|
82
|
+
|
|
83
|
+
#### 4. If `npm update` does not upgrade anything
|
|
84
|
+
|
|
85
|
+
Check these points:
|
|
86
|
+
|
|
87
|
+
- the new version has actually been published to the registry
|
|
88
|
+
- the consumer repository depends on a range such as `^1.0.0`
|
|
89
|
+
- the new version is still compatible with that range
|
|
90
|
+
- the consumer project is using the same registry where this package is published
|
|
91
|
+
|
|
92
|
+
Example:
|
|
93
|
+
|
|
94
|
+
- if the consumer has `^1.0.0`, `npm update` can move to `1.1.0` or `1.2.3`
|
|
95
|
+
- it will not move to `2.0.0`
|
|
96
|
+
- if the consumer has `1.0.0` exactly, it will stay pinned
|
|
97
|
+
|
|
98
|
+
## Entry Points
|
|
99
|
+
|
|
100
|
+
The library exposes these entry points:
|
|
101
|
+
|
|
102
|
+
- `@univers42/ui-collection`
|
|
103
|
+
- `@univers42/ui-collection/library`
|
|
104
|
+
- `@univers42/ui-collection/library/media`
|
|
105
|
+
- `@univers42/ui-collection/library/catalogs`
|
|
106
|
+
- `@univers42/ui-collection/library/icons/react`
|
|
107
|
+
- `@univers42/ui-collection/library/icons/react/slash-menu`
|
|
108
|
+
- `@univers42/ui-collection/library/components/react`
|
|
109
|
+
- `@univers42/ui-collection/library/components/react/asset-picker`
|
|
110
|
+
- `@univers42/ui-collection/library/components/react/color-picker`
|
|
111
|
+
- `@univers42/ui-collection/library/components/react/icon-picker`
|
|
112
|
+
- `@univers42/ui-collection/library/components/react/emoji-picker`
|
|
113
|
+
- `@univers42/ui-collection/library/components/react/charts`
|
|
114
|
+
- `@univers42/ui-collection/library/components/react/analytics`
|
|
115
|
+
- `@univers42/ui-collection/library/components/react/analytics/formula`
|
|
116
|
+
- `@univers42/ui-collection/library/components/react/analytics/relation-rollup`
|
|
117
|
+
- `@univers42/ui-collection/library/components/react/formula`
|
|
118
|
+
- `@univers42/ui-collection/library/components/react/primitives`
|
|
119
|
+
- `@univers42/ui-collection/library/components/react/theme`
|
|
120
|
+
|
|
121
|
+
Legacy re-exports are still available:
|
|
122
|
+
|
|
123
|
+
- `@univers42/ui-collection/components/blocks/ColorPickerBoard`
|
|
124
|
+
- `@univers42/ui-collection/components/blocks/IconPickerBoard`
|
|
125
|
+
- `@univers42/ui-collection/components/blocks/EmojiPickerBoard`
|
|
126
|
+
- `@univers42/ui-collection/components/blocks/SlashMenuIcons`
|
|
127
|
+
- `@univers42/ui-collection/components/blocks/SlashMenuIconsBasic`
|
|
128
|
+
- `@univers42/ui-collection/components/blocks/SlashMenuIconsExtended`
|
|
129
|
+
- `@univers42/ui-collection/components/blocks/slashMenuCatalog`
|
|
130
|
+
|
|
131
|
+
## Import Patterns
|
|
132
|
+
|
|
133
|
+
### Import from the root
|
|
134
|
+
|
|
135
|
+
```tsx
|
|
136
|
+
import {
|
|
137
|
+
AssetPickerBoard,
|
|
138
|
+
ColorPickerBoard,
|
|
139
|
+
IconPickerBoard,
|
|
140
|
+
EmojiPickerBoard,
|
|
141
|
+
SLASH_ITEMS,
|
|
142
|
+
SECTION_LABELS,
|
|
143
|
+
getMediaItem,
|
|
144
|
+
getMediaCollection,
|
|
145
|
+
getMediaByKind,
|
|
146
|
+
getMediaByProvider,
|
|
147
|
+
searchMedia,
|
|
148
|
+
resolveMediaUrl,
|
|
149
|
+
DEFAULT_ASSET_PICKER_TABS,
|
|
150
|
+
DEFAULT_COLOR_PRESETS,
|
|
151
|
+
DEFAULT_ICON_PICKER_ITEMS,
|
|
152
|
+
DEFAULT_EMOJI_PICKER_ITEMS,
|
|
153
|
+
} from '@univers42/ui-collection';
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Import a specific module
|
|
157
|
+
|
|
158
|
+
```tsx
|
|
159
|
+
import { getMediaItem, searchMedia } from '@univers42/ui-collection/library/media';
|
|
160
|
+
import { SLASH_ITEMS } from '@univers42/ui-collection/library/catalogs';
|
|
161
|
+
import { IconText, IconBoard } from '@univers42/ui-collection/library/icons/react/slash-menu';
|
|
162
|
+
import {
|
|
163
|
+
AssetPickerBoard,
|
|
164
|
+
createMediaCollectionPickerTab,
|
|
165
|
+
} from '@univers42/ui-collection/library/components/react/asset-picker';
|
|
166
|
+
import { ColorPickerBoard } from '@univers42/ui-collection/library/components/react/color-picker';
|
|
167
|
+
import { IconPickerBoard } from '@univers42/ui-collection/library/components/react/icon-picker';
|
|
168
|
+
import { EmojiPickerBoard } from '@univers42/ui-collection/library/components/react/emoji-picker';
|
|
169
|
+
import { LineChart } from '@univers42/ui-collection/library/components/react/charts';
|
|
170
|
+
import { FormulaTypePie } from '@univers42/ui-collection/library/components/react/analytics/formula';
|
|
171
|
+
import { ThemeToggle } from '@univers42/ui-collection/library/components/react/theme';
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Import legacy paths
|
|
175
|
+
|
|
176
|
+
```tsx
|
|
177
|
+
import { ColorPickerBoard } from '@univers42/ui-collection/components/blocks/ColorPickerBoard';
|
|
178
|
+
import { IconText } from '@univers42/ui-collection/components/blocks/SlashMenuIcons';
|
|
179
|
+
import { SLASH_ITEMS } from '@univers42/ui-collection/components/blocks/slashMenuCatalog';
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Library Contents
|
|
183
|
+
|
|
184
|
+
### 1. React Components
|
|
185
|
+
|
|
186
|
+
Available from:
|
|
187
|
+
|
|
188
|
+
- `@univers42/ui-collection`: curated root surface
|
|
189
|
+
- `@univers42/ui-collection/library/components/react`: full React component catalog
|
|
190
|
+
|
|
191
|
+
The root API is intentionally small and stable. More specialized modules live under dedicated `library/components/react/*` entry points.
|
|
192
|
+
|
|
193
|
+
Root exports include:
|
|
194
|
+
|
|
195
|
+
- `AssetPickerBoard`
|
|
196
|
+
- `ColorPickerBoard`
|
|
197
|
+
- `IconPickerBoard`
|
|
198
|
+
- `EmojiPickerBoard`
|
|
199
|
+
- `DEFAULT_ASSET_PICKER_TABS`
|
|
200
|
+
- `DEFAULT_COLOR_PRESETS`
|
|
201
|
+
- `DEFAULT_ICON_PICKER_ITEMS`
|
|
202
|
+
- `DEFAULT_EMOJI_PICKER_ITEMS`
|
|
203
|
+
- `AssetPickerBoardProps`
|
|
204
|
+
- `AssetPickerBoardTab`
|
|
205
|
+
- `AssetPickerBoardItem`
|
|
206
|
+
- `AssetPickerBoardValue`
|
|
207
|
+
- `AssetPickerBoardSelection`
|
|
208
|
+
- `ColorPickerBoardProps`
|
|
209
|
+
- `ColorPickerPreset`
|
|
210
|
+
- `IconPickerBoardProps`
|
|
211
|
+
- `IconPickerItem`
|
|
212
|
+
- `EmojiPickerBoardProps`
|
|
213
|
+
- `EmojiPickerItem`
|
|
214
|
+
|
|
215
|
+
Full React component exports include:
|
|
216
|
+
|
|
217
|
+
- `AssetPickerBoard`
|
|
218
|
+
- `ColorPickerBoard`
|
|
219
|
+
- `IconPickerBoard`
|
|
220
|
+
- `EmojiPickerBoard`
|
|
221
|
+
- `VerticalBarChart`
|
|
222
|
+
- `HorizontalBarChart`
|
|
223
|
+
- `LineChart`
|
|
224
|
+
- `DonutPieChart`
|
|
225
|
+
- `MultiLineChart`
|
|
226
|
+
- `DonutChart`
|
|
227
|
+
- `AreaChartSVG`
|
|
228
|
+
- `ProgressRing`
|
|
229
|
+
- `FormulaTypePie`
|
|
230
|
+
- `ErrorBarChart`
|
|
231
|
+
- `ComplexityChart`
|
|
232
|
+
- `TextDistributionCard`
|
|
233
|
+
- `KpiCard`
|
|
234
|
+
- `DisplayBadge`
|
|
235
|
+
- `RollupCellValue`
|
|
236
|
+
- `RelationMapSection`
|
|
237
|
+
- `FunctionDistSection`
|
|
238
|
+
- `DisplayFormatSection`
|
|
239
|
+
- `CompletionRingsSection`
|
|
240
|
+
- `DataFlowSection`
|
|
241
|
+
- `ExampleBlock`
|
|
242
|
+
- `SettingsHeader`
|
|
243
|
+
- `SettingsSectionLabel`
|
|
244
|
+
- `MenuDivider`
|
|
245
|
+
- `ViewTypeCard`
|
|
246
|
+
- `PanelSectionLabel`
|
|
247
|
+
- `ThemeToggle`
|
|
248
|
+
|
|
249
|
+
Default datasets available from the root:
|
|
250
|
+
|
|
251
|
+
- `DEFAULT_ASSET_PICKER_TABS`: default tabs for emojis, SVGs, and icons
|
|
252
|
+
- `DEFAULT_COLOR_PRESETS`: 8 presets
|
|
253
|
+
- `DEFAULT_ICON_PICKER_ITEMS`: 30 icons
|
|
254
|
+
- `DEFAULT_EMOJI_PICKER_ITEMS`: 24 emojis
|
|
255
|
+
|
|
256
|
+
#### Unified Asset Picker
|
|
257
|
+
|
|
258
|
+
`AssetPickerBoard` is the shared board used for asset selection. The default configuration groups emojis, SVGs, and icons into one tabbed picker, and the `asset-picker` subpath exposes factory helpers so new asset families can be added without duplicating UI.
|
|
259
|
+
|
|
260
|
+
```tsx
|
|
261
|
+
import {
|
|
262
|
+
AssetPickerBoard,
|
|
263
|
+
DEFAULT_ASSET_PICKER_TABS,
|
|
264
|
+
} from '@univers42/ui-collection';
|
|
265
|
+
|
|
266
|
+
export function Demo() {
|
|
267
|
+
return (
|
|
268
|
+
<AssetPickerBoard
|
|
269
|
+
label="Block asset picker"
|
|
270
|
+
tabs={DEFAULT_ASSET_PICKER_TABS}
|
|
271
|
+
onChange={({ tab, item }) => console.log(tab.id, item.value)}
|
|
272
|
+
/>
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
#### Which Picker Should You Import?
|
|
278
|
+
|
|
279
|
+
Use `AssetPickerBoard` when you want the general-purpose board with all default asset families in one place. You do not need to import `IconPickerBoard` or `EmojiPickerBoard` to use the unified board.
|
|
280
|
+
|
|
281
|
+
```tsx
|
|
282
|
+
import { AssetPickerBoard } from '@univers42/ui-collection';
|
|
283
|
+
|
|
284
|
+
export function Demo() {
|
|
285
|
+
return (
|
|
286
|
+
<AssetPickerBoard
|
|
287
|
+
label="Block asset picker"
|
|
288
|
+
onChange={({ tab, item }) => {
|
|
289
|
+
console.log(tab.id); // emojis | svg | icons
|
|
290
|
+
console.log(item.value); // selected value
|
|
291
|
+
}}
|
|
292
|
+
/>
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
Use `IconPickerBoard` or `EmojiPickerBoard` only when you want a single-family picker with the legacy API shape.
|
|
298
|
+
|
|
299
|
+
Use the `asset-picker` subpath when you want to customize the tabs or add new asset families while keeping the same shared board UI.
|
|
300
|
+
|
|
301
|
+
```tsx
|
|
302
|
+
import {
|
|
303
|
+
AssetPickerBoard,
|
|
304
|
+
createEmojiPickerTab,
|
|
305
|
+
createIconPickerTab,
|
|
306
|
+
createMediaCollectionPickerTab,
|
|
307
|
+
} from '@univers42/ui-collection/library/components/react/asset-picker';
|
|
308
|
+
|
|
309
|
+
const tabs = [
|
|
310
|
+
createEmojiPickerTab(),
|
|
311
|
+
createMediaCollectionPickerTab('svg'),
|
|
312
|
+
createIconPickerTab(),
|
|
313
|
+
];
|
|
314
|
+
|
|
315
|
+
export function Demo() {
|
|
316
|
+
return <AssetPickerBoard label="Custom asset picker" tabs={tabs} />;
|
|
317
|
+
}
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
#### Compatibility Wrappers
|
|
321
|
+
|
|
322
|
+
`IconPickerBoard` and `EmojiPickerBoard` are still available, but they now wrap the shared unified picker internally. This keeps compatibility while the implementation stays modular and scalable.
|
|
323
|
+
|
|
324
|
+
```tsx
|
|
325
|
+
import {
|
|
326
|
+
ColorPickerBoard,
|
|
327
|
+
IconPickerBoard,
|
|
328
|
+
EmojiPickerBoard,
|
|
329
|
+
} from '@univers42/ui-collection';
|
|
330
|
+
|
|
331
|
+
export function Demo() {
|
|
332
|
+
return (
|
|
333
|
+
<>
|
|
334
|
+
<ColorPickerBoard label="Brand palette" onChange={(hex) => console.log(hex)} />
|
|
335
|
+
<IconPickerBoard label="Slash icons" onChange={(iconId) => console.log(iconId)} />
|
|
336
|
+
<EmojiPickerBoard label="Reaction picker" onChange={(emoji) => console.log(emoji)} />
|
|
337
|
+
</>
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
### 2. React Slash-Menu Icons
|
|
343
|
+
|
|
344
|
+
Available from:
|
|
345
|
+
|
|
346
|
+
- `@univers42/ui-collection`
|
|
347
|
+
- `@univers42/ui-collection/library/icons/react`
|
|
348
|
+
- `@univers42/ui-collection/library/icons/react/slash-menu`
|
|
349
|
+
- `@univers42/ui-collection/components/blocks/SlashMenuIcons`
|
|
350
|
+
|
|
351
|
+
Exported icons:
|
|
352
|
+
|
|
353
|
+
- `IconText`
|
|
354
|
+
- `IconH1`
|
|
355
|
+
- `IconH2`
|
|
356
|
+
- `IconH3`
|
|
357
|
+
- `IconH4`
|
|
358
|
+
- `IconH5`
|
|
359
|
+
- `IconH6`
|
|
360
|
+
- `IconBullet`
|
|
361
|
+
- `IconNumbered`
|
|
362
|
+
- `IconTodo`
|
|
363
|
+
- `IconToggle`
|
|
364
|
+
- `IconPage`
|
|
365
|
+
- `IconCallout`
|
|
366
|
+
- `IconQuote`
|
|
367
|
+
- `IconTable`
|
|
368
|
+
- `IconDivider`
|
|
369
|
+
- `IconLinkToPage`
|
|
370
|
+
- `IconImage`
|
|
371
|
+
- `IconVideo`
|
|
372
|
+
- `IconAudio`
|
|
373
|
+
- `IconCode`
|
|
374
|
+
- `IconFile`
|
|
375
|
+
- `IconBookmark`
|
|
376
|
+
- `IconBoard`
|
|
377
|
+
- `IconGallery`
|
|
378
|
+
- `IconList`
|
|
379
|
+
- `IconColumns`
|
|
380
|
+
- `IconTOC`
|
|
381
|
+
- `IconEquation`
|
|
382
|
+
- `IconSpacer`
|
|
383
|
+
- `IconEmbed`
|
|
384
|
+
- `IconBreadcrumb`
|
|
385
|
+
|
|
386
|
+
```tsx
|
|
387
|
+
import { IconText, IconBoard, IconImage } from '@univers42/ui-collection';
|
|
388
|
+
|
|
389
|
+
export function Toolbar() {
|
|
390
|
+
return (
|
|
391
|
+
<div>
|
|
392
|
+
<IconText />
|
|
393
|
+
<IconBoard />
|
|
394
|
+
<IconImage />
|
|
395
|
+
</div>
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
### 3. Catalogs
|
|
401
|
+
|
|
402
|
+
Available from:
|
|
403
|
+
|
|
404
|
+
- `@univers42/ui-collection`
|
|
405
|
+
- `@univers42/ui-collection/library/catalogs`
|
|
406
|
+
- `@univers42/ui-collection/components/blocks/slashMenuCatalog`
|
|
407
|
+
|
|
408
|
+
Exports:
|
|
409
|
+
|
|
410
|
+
- `SLASH_ITEMS`
|
|
411
|
+
- `SECTION_LABELS`
|
|
412
|
+
- `SlashMenuItem`
|
|
413
|
+
- `SlashMenuBlockType`
|
|
414
|
+
- `SlashMenuSection`
|
|
415
|
+
|
|
416
|
+
`SLASH_ITEMS` currently contains 35 entries.
|
|
417
|
+
|
|
418
|
+
Section labels:
|
|
419
|
+
|
|
420
|
+
- `basic` -> `Basic blocks`
|
|
421
|
+
- `media` -> `Media`
|
|
422
|
+
- `layout` -> `Layout`
|
|
423
|
+
- `advanced` -> `Advanced`
|
|
424
|
+
- `database` -> `Database`
|
|
425
|
+
|
|
426
|
+
```tsx
|
|
427
|
+
import { SECTION_LABELS, SLASH_ITEMS } from '@univers42/ui-collection/library/catalogs';
|
|
428
|
+
|
|
429
|
+
const mediaItems = SLASH_ITEMS.filter((item) => item.section === 'media');
|
|
430
|
+
const label = SECTION_LABELS.media;
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
### 4. Media Registry and Assets
|
|
434
|
+
|
|
435
|
+
Available from:
|
|
436
|
+
|
|
437
|
+
- `@univers42/ui-collection`
|
|
438
|
+
- `@univers42/ui-collection/library/media`
|
|
439
|
+
|
|
440
|
+
Built-in providers:
|
|
441
|
+
|
|
442
|
+
- `local`
|
|
443
|
+
- `url`
|
|
444
|
+
- `api`
|
|
445
|
+
- `unsplash`
|
|
446
|
+
- `picker`
|
|
447
|
+
|
|
448
|
+
Built-in collections:
|
|
449
|
+
|
|
450
|
+
- `svg`
|
|
451
|
+
- `emojis`
|
|
452
|
+
- `photos`
|
|
453
|
+
- `videos`
|
|
454
|
+
- `other-media`
|
|
455
|
+
|
|
456
|
+
Built-in kinds:
|
|
457
|
+
|
|
458
|
+
- `svg`
|
|
459
|
+
- `emoji`
|
|
460
|
+
- `photo`
|
|
461
|
+
- `video`
|
|
462
|
+
- `audio`
|
|
463
|
+
- `document`
|
|
464
|
+
- `lottie`
|
|
465
|
+
- `model-3d`
|
|
466
|
+
|
|
467
|
+
Exported types and utilities:
|
|
468
|
+
|
|
469
|
+
- `BUILTIN_MEDIA_PROVIDERS`
|
|
470
|
+
- `BUILTIN_MEDIA_COLLECTIONS`
|
|
471
|
+
- `BUILTIN_MEDIA_KINDS`
|
|
472
|
+
- `MediaProvider`
|
|
473
|
+
- `MediaCollectionName`
|
|
474
|
+
- `MediaKind`
|
|
475
|
+
- `MediaRef`
|
|
476
|
+
- `MediaItem`
|
|
477
|
+
- `MediaCollection`
|
|
478
|
+
- `MediaCollectionInput`
|
|
479
|
+
- `MediaLibraryIndex`
|
|
480
|
+
- `MediaSearchFilters`
|
|
481
|
+
- `MediaUrlResolver`
|
|
482
|
+
- `MediaResolverMap`
|
|
483
|
+
- `MediaRegistryOptions`
|
|
484
|
+
- `MediaRegistry`
|
|
485
|
+
- `DEFAULT_MEDIA_RESOLVERS`
|
|
486
|
+
- `createMediaRef`
|
|
487
|
+
- `parseMediaRef`
|
|
488
|
+
- `createMediaResolver`
|
|
489
|
+
- `resolveMediaUrl`
|
|
490
|
+
- `defineMediaCollection`
|
|
491
|
+
- `createMediaLibraryIndex`
|
|
492
|
+
- `filterMediaItems`
|
|
493
|
+
- `searchMediaItems`
|
|
494
|
+
- `createMediaRegistry`
|
|
495
|
+
- `mediaCollections`
|
|
496
|
+
- `mediaRegistry`
|
|
497
|
+
- `mediaLibrary`
|
|
498
|
+
- `getMediaItem`
|
|
499
|
+
- `getMediaCollection`
|
|
500
|
+
- `getMediaByKind`
|
|
501
|
+
- `getMediaByProvider`
|
|
502
|
+
- `searchMedia`
|
|
503
|
+
- `extendMediaLibrary`
|
|
504
|
+
|
|
505
|
+
Fetch an asset by id:
|
|
506
|
+
|
|
507
|
+
```ts
|
|
508
|
+
import { getMediaItem, resolveMediaUrl } from '@univers42/ui-collection/library/media';
|
|
509
|
+
|
|
510
|
+
const item = getMediaItem('video-intro-loop');
|
|
511
|
+
const src = item ? resolveMediaUrl(item.ref) : '';
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
Fetch a full collection:
|
|
515
|
+
|
|
516
|
+
```ts
|
|
517
|
+
import { getMediaCollection } from '@univers42/ui-collection/library/media';
|
|
518
|
+
|
|
519
|
+
const videos = getMediaCollection('videos');
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
Filter by kind:
|
|
523
|
+
|
|
524
|
+
```ts
|
|
525
|
+
import { getMediaByKind } from '@univers42/ui-collection/library/media';
|
|
526
|
+
|
|
527
|
+
const emojis = getMediaByKind('emoji');
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
Filter by provider:
|
|
531
|
+
|
|
532
|
+
```ts
|
|
533
|
+
import { getMediaByProvider } from '@univers42/ui-collection/library/media';
|
|
534
|
+
|
|
535
|
+
const externalUrls = getMediaByProvider('url');
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
Search by text or tags:
|
|
539
|
+
|
|
540
|
+
```ts
|
|
541
|
+
import { searchMedia } from '@univers42/ui-collection/library/media';
|
|
542
|
+
|
|
543
|
+
const results = searchMedia('rocket');
|
|
544
|
+
const onlySvg = searchMedia('hero', { collection: 'svg' });
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
Resolve custom references:
|
|
548
|
+
|
|
549
|
+
```ts
|
|
550
|
+
import { createMediaResolver } from '@univers42/ui-collection/library/media';
|
|
551
|
+
|
|
552
|
+
const resolve = createMediaResolver({
|
|
553
|
+
cdn: (value) => `https://cdn.example.com/${value}`,
|
|
554
|
+
});
|
|
555
|
+
|
|
556
|
+
const src = resolve('cdn:icons/logo.svg');
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
Extend the library:
|
|
560
|
+
|
|
561
|
+
```ts
|
|
562
|
+
import {
|
|
563
|
+
createMediaRef,
|
|
564
|
+
defineMediaCollection,
|
|
565
|
+
extendMediaLibrary,
|
|
566
|
+
} from '@univers42/ui-collection/library/media';
|
|
567
|
+
|
|
568
|
+
const stickers = defineMediaCollection({
|
|
569
|
+
name: 'stickers',
|
|
570
|
+
label: 'Stickers',
|
|
571
|
+
items: [
|
|
572
|
+
{
|
|
573
|
+
id: 'sticker-party',
|
|
574
|
+
label: 'Party sticker',
|
|
575
|
+
category: 'custom',
|
|
576
|
+
kind: 'emoji',
|
|
577
|
+
ref: createMediaRef('url', 'https://cdn.example.com/stickers/party.webp'),
|
|
578
|
+
},
|
|
579
|
+
],
|
|
580
|
+
});
|
|
581
|
+
|
|
582
|
+
const registry = extendMediaLibrary([stickers]);
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
Current curated asset inventory:
|
|
586
|
+
|
|
587
|
+
- `svg`: 5 items
|
|
588
|
+
- `emojis`: 4 items
|
|
589
|
+
- `photos`: 2 items
|
|
590
|
+
- `videos`: 3 items
|
|
591
|
+
- `other-media`: 6 items
|
|
592
|
+
|
|
593
|
+
Curated external asset sources are documented in [library/media/SOURCES.md](/home/settes/cursus/trascendence/UI-Collection/library/media/SOURCES.md).
|
|
594
|
+
|
|
595
|
+
Current sources:
|
|
596
|
+
|
|
597
|
+
- Heroicons
|
|
598
|
+
- MDN Shared Assets
|
|
599
|
+
- Twemoji
|
|
600
|
+
- W3C
|
|
601
|
+
- Khronos glTF Sample Assets
|
|
602
|
+
|
|
603
|
+
## Root Export Summary
|
|
604
|
+
|
|
605
|
+
Importing from `@univers42/ui-collection` gives you:
|
|
606
|
+
|
|
607
|
+
- the unified `AssetPickerBoard`
|
|
608
|
+
- the color, icon, and emoji picker wrappers
|
|
609
|
+
- the React slash-menu icons
|
|
610
|
+
- `SLASH_ITEMS` and `SECTION_LABELS`
|
|
611
|
+
- the media registry and helpers
|
|
612
|
+
- the default color, icon, emoji, and asset-picker datasets
|
|
613
|
+
|
|
614
|
+
## Full Example
|
|
615
|
+
|
|
616
|
+
```tsx
|
|
617
|
+
import {
|
|
618
|
+
AssetPickerBoard,
|
|
619
|
+
ColorPickerBoard,
|
|
620
|
+
DEFAULT_ASSET_PICKER_TABS,
|
|
621
|
+
DEFAULT_ICON_PICKER_ITEMS,
|
|
622
|
+
EmojiPickerBoard,
|
|
623
|
+
IconPickerBoard,
|
|
624
|
+
SLASH_ITEMS,
|
|
625
|
+
getMediaCollection,
|
|
626
|
+
getMediaItem,
|
|
627
|
+
resolveMediaUrl,
|
|
628
|
+
} from '@univers42/ui-collection';
|
|
629
|
+
|
|
630
|
+
const heroVideo = getMediaItem('video-mdn-flower');
|
|
631
|
+
const emojiAssets = getMediaCollection('emojis');
|
|
632
|
+
const src = heroVideo ? resolveMediaUrl(heroVideo.ref) : '';
|
|
633
|
+
|
|
634
|
+
console.log(DEFAULT_ICON_PICKER_ITEMS.length);
|
|
635
|
+
console.log(SLASH_ITEMS.length);
|
|
636
|
+
console.log(emojiAssets.length);
|
|
637
|
+
console.log(src);
|
|
638
|
+
|
|
639
|
+
export function Demo() {
|
|
640
|
+
return (
|
|
641
|
+
<>
|
|
642
|
+
<AssetPickerBoard
|
|
643
|
+
label="Unified asset picker"
|
|
644
|
+
tabs={DEFAULT_ASSET_PICKER_TABS}
|
|
645
|
+
/>
|
|
646
|
+
<ColorPickerBoard label="Brand palette" />
|
|
647
|
+
<IconPickerBoard label="Slash icon picker" />
|
|
648
|
+
<EmojiPickerBoard label="Emoji picker" />
|
|
649
|
+
</>
|
|
650
|
+
);
|
|
651
|
+
}
|
|
652
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorPickerBoard.d.ts","sourceRoot":"","sources":["../../../components/blocks/ColorPickerBoard.tsx"],"names":[],"mappings":"AAYA,cAAc,iEAAiE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* ************************************************************************** */
|
|
2
|
+
/* */
|
|
3
|
+
/* ::: :::::::: */
|
|
4
|
+
/* ColorPickerBoard.tsx :+: :+: :+: */
|
|
5
|
+
/* +:+ +:+ +:+ */
|
|
6
|
+
/* By: rstancu <rstancu@student.42madrid.com> +#+ +:+ +#+ */
|
|
7
|
+
/* +#+#+#+#+#+ +#+ */
|
|
8
|
+
/* Created: 2026/04/09 11:33:25 by rstancu #+# #+# */
|
|
9
|
+
/* Updated: 2026/04/09 11:49:25 by rstancu ### ########.fr */
|
|
10
|
+
/* */
|
|
11
|
+
/* ************************************************************************** */
|
|
12
|
+
export * from '../../library/components/react/color-picker/ColorPickerBoard.js';
|
|
13
|
+
//# sourceMappingURL=ColorPickerBoard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorPickerBoard.js","sourceRoot":"","sources":["../../../components/blocks/ColorPickerBoard.tsx"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAEhF,cAAc,iEAAiE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmojiPickerBoard.d.ts","sourceRoot":"","sources":["../../../components/blocks/EmojiPickerBoard.tsx"],"names":[],"mappings":"AAYA,cAAc,iEAAiE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* ************************************************************************** */
|
|
2
|
+
/* */
|
|
3
|
+
/* ::: :::::::: */
|
|
4
|
+
/* EmojiPickerBoard.tsx :+: :+: :+: */
|
|
5
|
+
/* +:+ +:+ +:+ */
|
|
6
|
+
/* By: rstancu <rstancu@student.42madrid.com> +#+ +:+ +#+ */
|
|
7
|
+
/* +#+#+#+#+#+ +#+ */
|
|
8
|
+
/* Created: 2026/04/09 11:38:08 by rstancu #+# #+# */
|
|
9
|
+
/* Updated: 2026/04/09 11:49:25 by rstancu ### ########.fr */
|
|
10
|
+
/* */
|
|
11
|
+
/* ************************************************************************** */
|
|
12
|
+
export * from '../../library/components/react/emoji-picker/EmojiPickerBoard.js';
|
|
13
|
+
//# sourceMappingURL=EmojiPickerBoard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmojiPickerBoard.js","sourceRoot":"","sources":["../../../components/blocks/EmojiPickerBoard.tsx"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAEhF,cAAc,iEAAiE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconPickerBoard.d.ts","sourceRoot":"","sources":["../../../components/blocks/IconPickerBoard.tsx"],"names":[],"mappings":"AAYA,cAAc,+DAA+D,CAAC"}
|