@crewlethq/icons 0.39.0 → 0.40.0
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/dist/glyphs-registry.d.ts +28 -4
- package/dist/glyphs-registry.js +9 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ActivityGlyph, ArrowDownGlyph, ArrowDownToLineGlyph, ArrowRightGlyph, ArrowUpGlyph, ArrowUpDownGlyph, ArrowUpRightGlyph, BadgePercentGlyph, BanGlyph, BellGlyph, BoldGlyph, BookOpenGlyph, BotGlyph, BrainGlyph, BugGlyph, BuildingComplexGlyph, CalendarGlyph, CalendarClockGlyph, CameraGlyph, ChartColumnGlyph, ChartNoAxesGanttGlyph, ChartPieGlyph, CheckGlyph, ChevronDownGlyph, ChevronLeftGlyph, ChevronRightGlyph, ChevronUpGlyph, ChevronsLeftGlyph, ChevronsRightGlyph, ChevronsUpDownGlyph, CircleGlyph, CircleAlertGlyph, CircleCheckGlyph, CircleQuestionMarkGlyph, ClockGlyph, CodeGlyph, CogGlyph, CoinsGlyph, Columns3Glyph, CommandGlyph, CompassGlyph, CopyGlyph, CornerDownLeftGlyph, CpuGlyph, CrownGlyph, DatabaseGlyph, DiffGlyph, EllipsisGlyph, EllipsisVerticalGlyph, ExternalLinkGlyph, EyeGlyph, EyeOffGlyph, FileCodeGlyph, FileTextGlyph, FlagGlyph, FoldVerticalGlyph, FolderGlyph, FolderInputGlyph, FolderKanbanGlyph, FolderPlusGlyph, FrameGlyph, FullscreenGlyph, GaugeGlyph, GlobeGlyph, GripVerticalGlyph, GroupGlyph, HandGlyph, HandGrabGlyph, HashGlyph, HeadingGlyph, Heading1Glyph, Heading2Glyph, Heading3Glyph, HouseGlyph, ImageGlyph, InboxGlyph, InfoGlyph, ItalicGlyph, KeyGlyph, LaptopGlyph, LayersGlyph, LayoutDashboardGlyph, LayoutGridGlyph, LinkGlyph, ListGlyph, ListChecksGlyph, ListFilterGlyph, ListOrderedGlyph, LockGlyph, LogInGlyph, LogOutGlyph, MaximizeGlyph, Maximize2Glyph, MenuGlyph, MessageCircleQuestionMarkGlyph, MessageSquareGlyph, MinimizeGlyph, MinusGlyph, MonitorGlyph, MoonGlyph, MousePointer2Glyph, MoveDiagonal2Glyph, NetworkGlyph, PackageGlyph, PaletteGlyph, PaperclipGlyph, PauseGlyph, PencilGlyph, PinGlyph, PlugGlyph, PlusGlyph, PowerGlyph, PresentationGlyph, RadioGlyph, RedoGlyph, RefreshCcwGlyph, RefreshCwGlyph, Repeat2Glyph, RotateCcwGlyph, RotateCcwClockGlyph, RotateCwGlyph, SaveGlyph, SearchGlyph, SendGlyph, SeparatorHorizontalGlyph, ServerGlyph, SettingsGlyph, Settings2Glyph, Share2Glyph, ShieldGlyph, ShieldUserGlyph, SlidersVerticalGlyph, SmartphoneGlyph, SplitGlyph, SquareCodeGlyph, SquareKanbanGlyph, SquareTerminalGlyph, StarGlyph, StickyNoteGlyph, StrikethroughGlyph, SunGlyph, TableGlyph, TabletGlyph, TargetGlyph, TextAlignCenterGlyph, TextAlignEndGlyph, TextAlignStartGlyph, TextCursorGlyph, TextQuoteGlyph, TrashGlyph, TriangleAlertGlyph, TypeGlyph, UndoGlyph, UngroupGlyph, UnlinkGlyph, UploadGlyph, UserGlyph, UserPlusGlyph, UsersGlyph, WandSparklesGlyph, WrenchGlyph, XGlyph, ZapGlyph, ZoomInGlyph, ZoomOutGlyph, GlyphName } from './glyphs.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import '
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { ComponentType } from 'react';
|
|
4
|
+
import { GlyphProps } from './glyphs.js';
|
|
4
5
|
|
|
5
6
|
declare const GLYPHS: {
|
|
6
7
|
readonly activity: typeof ActivityGlyph;
|
|
@@ -170,6 +171,27 @@ declare const GLYPHS: {
|
|
|
170
171
|
readonly "zoom-out": typeof ZoomOutGlyph;
|
|
171
172
|
};
|
|
172
173
|
|
|
174
|
+
/**
|
|
175
|
+
* The component that draws a name, typed to the props every glyph takes.
|
|
176
|
+
*
|
|
177
|
+
* `glyphByName` answers with the glyph's own type, so a caller holding a
|
|
178
|
+
* `GlyphName` union gets a union of components it cannot render without
|
|
179
|
+
* narrowing. This is that narrowing, once: a name, the props every glyph
|
|
180
|
+
* takes, and nothing a single glyph adds. A caller that wants `filled` knows
|
|
181
|
+
* which glyph it is drawing and imports it by name.
|
|
182
|
+
*/
|
|
183
|
+
declare function glyphFor(name: GlyphName): ComponentType<GlyphProps>;
|
|
184
|
+
interface NamedGlyphProps extends GlyphProps {
|
|
185
|
+
/** The vendored name of the drawing, as `GlyphName` spells it. */
|
|
186
|
+
name: GlyphName;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* A glyph drawn from a name, for a caller that holds a value rather than a
|
|
190
|
+
* glyph: a navigation table, a work type, an attention reason. It is
|
|
191
|
+
* decoration unless `title` names it, as every glyph is.
|
|
192
|
+
*/
|
|
193
|
+
declare function NamedGlyph({ name, ...rest }: NamedGlyphProps): react.JSX.Element;
|
|
194
|
+
|
|
173
195
|
/**
|
|
174
196
|
* `@crewlethq/icons/glyphs/registry`: a glyph chosen from a value.
|
|
175
197
|
*
|
|
@@ -184,9 +206,11 @@ declare const GLYPHS: {
|
|
|
184
206
|
* exist is a type error rather than a blank square nobody notices. The answer
|
|
185
207
|
* is the component registered under that name with its own type, so a
|
|
186
208
|
* FILLABLE name answers with a component that takes `filled` and every other
|
|
187
|
-
* name with one that does not.
|
|
209
|
+
* name with one that does not. `NamedGlyph` and `glyphFor` are the same lookup
|
|
210
|
+
* typed to the props every glyph takes, for a caller whose name is a union.
|
|
188
211
|
*/
|
|
189
212
|
|
|
190
213
|
declare function glyphByName<Name extends GlyphName>(name: Name): (typeof GLYPHS)[Name];
|
|
191
214
|
|
|
192
|
-
export { GLYPHS, glyphByName };
|
|
215
|
+
export { GLYPHS, NamedGlyph, glyphByName, glyphFor };
|
|
216
|
+
export type { NamedGlyphProps };
|
package/dist/glyphs-registry.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ZoomOutGlyph, ZoomInGlyph, ZapGlyph, XGlyph, WrenchGlyph, WandSparklesGlyph, UsersGlyph, UserPlusGlyph, UserGlyph, UploadGlyph, UnlinkGlyph, UngroupGlyph, UndoGlyph, TypeGlyph, TriangleAlertGlyph, TrashGlyph, TextQuoteGlyph, TextCursorGlyph, TextAlignStartGlyph, TextAlignEndGlyph, TextAlignCenterGlyph, TargetGlyph, TabletGlyph, TableGlyph, SunGlyph, StrikethroughGlyph, StickyNoteGlyph, StarGlyph, SquareTerminalGlyph, SquareKanbanGlyph, SquareCodeGlyph, SplitGlyph, SmartphoneGlyph, SlidersVerticalGlyph, ShieldUserGlyph, ShieldGlyph, Share2Glyph, Settings2Glyph, SettingsGlyph, ServerGlyph, SeparatorHorizontalGlyph, SendGlyph, SearchGlyph, SaveGlyph, RotateCwGlyph, RotateCcwClockGlyph, RotateCcwGlyph, Repeat2Glyph, RefreshCwGlyph, RefreshCcwGlyph, RedoGlyph, RadioGlyph, PresentationGlyph, PowerGlyph, PlusGlyph, PlugGlyph, PinGlyph, PencilGlyph, PauseGlyph, PaperclipGlyph, PaletteGlyph, PackageGlyph, NetworkGlyph, MoveDiagonal2Glyph, MousePointer2Glyph, MoonGlyph, MonitorGlyph, MinusGlyph, MinimizeGlyph, MessageSquareGlyph, MessageCircleQuestionMarkGlyph, MenuGlyph, Maximize2Glyph, MaximizeGlyph, LogOutGlyph, LogInGlyph, LockGlyph, ListOrderedGlyph, ListFilterGlyph, ListChecksGlyph, ListGlyph, LinkGlyph, LayoutGridGlyph, LayoutDashboardGlyph, LayersGlyph, LaptopGlyph, KeyGlyph, ItalicGlyph, InfoGlyph, InboxGlyph, ImageGlyph, HouseGlyph, Heading3Glyph, Heading2Glyph, Heading1Glyph, HeadingGlyph, HashGlyph, HandGrabGlyph, HandGlyph, GroupGlyph, GripVerticalGlyph, GlobeGlyph, GaugeGlyph, FullscreenGlyph, FrameGlyph, FolderPlusGlyph, FolderKanbanGlyph, FolderInputGlyph, FolderGlyph, FoldVerticalGlyph, FlagGlyph, FileTextGlyph, FileCodeGlyph, EyeOffGlyph, EyeGlyph, ExternalLinkGlyph, EllipsisVerticalGlyph, EllipsisGlyph, DiffGlyph, DatabaseGlyph, CrownGlyph, CpuGlyph, CornerDownLeftGlyph, CopyGlyph, CompassGlyph, CommandGlyph, Columns3Glyph, CoinsGlyph, CogGlyph, CodeGlyph, ClockGlyph, CircleQuestionMarkGlyph, CircleCheckGlyph, CircleAlertGlyph, CircleGlyph, ChevronsUpDownGlyph, ChevronsRightGlyph, ChevronsLeftGlyph, ChevronUpGlyph, ChevronRightGlyph, ChevronLeftGlyph, ChevronDownGlyph, CheckGlyph, ChartPieGlyph, ChartNoAxesGanttGlyph, ChartColumnGlyph, CameraGlyph, CalendarClockGlyph, CalendarGlyph, BuildingComplexGlyph, BugGlyph, BrainGlyph, BotGlyph, BookOpenGlyph, BoldGlyph, BellGlyph, BanGlyph, BadgePercentGlyph, ArrowUpRightGlyph, ArrowUpDownGlyph, ArrowUpGlyph, ArrowRightGlyph, ArrowDownToLineGlyph, ArrowDownGlyph, ActivityGlyph } from './chunk-4QUMLJLY.js';
|
|
2
2
|
import './chunk-TOSJN7HA.js';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
4
|
|
|
4
5
|
// src/generated/glyphs/registry.ts
|
|
5
6
|
var GLYPHS = {
|
|
@@ -169,10 +170,17 @@ var GLYPHS = {
|
|
|
169
170
|
"zoom-in": ZoomInGlyph,
|
|
170
171
|
"zoom-out": ZoomOutGlyph
|
|
171
172
|
};
|
|
173
|
+
function glyphFor(name) {
|
|
174
|
+
return GLYPHS[name];
|
|
175
|
+
}
|
|
176
|
+
function NamedGlyph({ name, ...rest }) {
|
|
177
|
+
const Drawing = glyphFor(name);
|
|
178
|
+
return /* @__PURE__ */ jsx(Drawing, { ...rest });
|
|
179
|
+
}
|
|
172
180
|
|
|
173
181
|
// src/glyphs-registry.ts
|
|
174
182
|
function glyphByName(name) {
|
|
175
183
|
return GLYPHS[name];
|
|
176
184
|
}
|
|
177
185
|
|
|
178
|
-
export { GLYPHS, glyphByName };
|
|
186
|
+
export { GLYPHS, NamedGlyph, glyphByName, glyphFor };
|
package/package.json
CHANGED