@craftzbay/ui 0.8.1 → 0.9.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-lib/components/ui/Icon.d.ts +34 -0
- package/dist-lib/icons/index.d.ts +80 -3
- package/dist-lib/index.cjs +2 -2
- package/dist-lib/index.cjs.map +1 -1
- package/dist-lib/index.d.ts +1 -0
- package/dist-lib/index.js +1459 -1315
- package/dist-lib/index.js.map +1 -1
- package/dist-lib/styles.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { default as dynamicIconImports } from 'lucide-react/dynamicIconImports';
|
|
3
|
+
import { LucideProps } from 'lucide-react';
|
|
4
|
+
/** Every lucide icon name, kebab-case — e.g. `calendar`, `chevrons-up-down`. */
|
|
5
|
+
export type IconName = keyof typeof dynamicIconImports;
|
|
6
|
+
/** All available icon names (useful for pickers and docs). */
|
|
7
|
+
export declare const iconNames: IconName[];
|
|
8
|
+
export interface IconProps extends Omit<LucideProps, 'ref'> {
|
|
9
|
+
/** Lucide icon name in kebab-case, e.g. `name="calendar"`. Autocompletes. */
|
|
10
|
+
name: IconName;
|
|
11
|
+
/**
|
|
12
|
+
* Shown while the icon chunk loads (first use only — icons are cached).
|
|
13
|
+
* Defaults to an invisible square so layout doesn't shift.
|
|
14
|
+
*/
|
|
15
|
+
fallback?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Name-addressed lucide icon. Use when the icon is dynamic (data-driven
|
|
19
|
+
* nav items, user-configurable dashboards) or when importing components for
|
|
20
|
+
* every icon is friction.
|
|
21
|
+
*
|
|
22
|
+
* Each icon is code-split and loaded on first use, so referencing the full
|
|
23
|
+
* lucide set costs nothing up front — `<Icon name="rocket" />` ships only
|
|
24
|
+
* the rocket.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* <Icon name="calendar" className="size-4" />
|
|
28
|
+
* <Icon name="chevrons-up-down" size={16} strokeWidth={1.5} />
|
|
29
|
+
*
|
|
30
|
+
* @do Use `size-4` (16px) inline with text, `size-5` (20px) inside buttons.
|
|
31
|
+
* @dont Reach for this in hot lists with hundreds of distinct icons on first
|
|
32
|
+
* paint — statically imported icons from `Icons` skip the lazy hop.
|
|
33
|
+
*/
|
|
34
|
+
export declare function Icon({ name, fallback, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,88 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Curated re-exports from
|
|
3
|
-
* here, never directly from
|
|
2
|
+
* Curated re-exports from lucide-react. Components should import icons from
|
|
3
|
+
* here, never directly from 'lucide-react', so the design system can swap
|
|
4
4
|
* icon sets later if needed and so unused icons stay tree-shakable.
|
|
5
5
|
*
|
|
6
|
+
* Icons are imported via their per-module paths (not the package barrel) on
|
|
7
|
+
* purpose: <Icon name="…"> lazy-loads arbitrary icons through
|
|
8
|
+
* lucide-react/dynamicIconImports, and if the barrel were in the static module
|
|
9
|
+
* graph, Rollup would co-locate every dynamically imported icon into the
|
|
10
|
+
* barrel's chunk — inlining the entire icon set instead of code-splitting it.
|
|
11
|
+
* (Type-only imports from 'lucide-react' are fine — they erase at build time.)
|
|
12
|
+
*
|
|
6
13
|
* Defaults applied at the call site:
|
|
7
14
|
* - 16px for inline-with-text usage
|
|
8
15
|
* - 20px for use inside buttons
|
|
9
16
|
* - strokeWidth 1.5
|
|
10
17
|
*/
|
|
11
|
-
export {
|
|
18
|
+
export { default as AlertCircle } from 'lucide-react/dist/esm/icons/alert-circle.js';
|
|
19
|
+
export { default as AlertTriangle } from 'lucide-react/dist/esm/icons/alert-triangle.js';
|
|
20
|
+
export { default as ArrowDown } from 'lucide-react/dist/esm/icons/arrow-down.js';
|
|
21
|
+
export { default as ArrowLeft } from 'lucide-react/dist/esm/icons/arrow-left.js';
|
|
22
|
+
export { default as ArrowRight } from 'lucide-react/dist/esm/icons/arrow-right.js';
|
|
23
|
+
export { default as ArrowUp } from 'lucide-react/dist/esm/icons/arrow-up.js';
|
|
24
|
+
export { default as ArrowUpDown } from 'lucide-react/dist/esm/icons/arrow-up-down.js';
|
|
25
|
+
export { default as AtSign } from 'lucide-react/dist/esm/icons/at-sign.js';
|
|
26
|
+
export { default as BarChart3 } from 'lucide-react/dist/esm/icons/bar-chart-3.js';
|
|
27
|
+
export { default as Bell } from 'lucide-react/dist/esm/icons/bell.js';
|
|
28
|
+
export { default as Bookmark } from 'lucide-react/dist/esm/icons/bookmark.js';
|
|
29
|
+
export { default as Calendar } from 'lucide-react/dist/esm/icons/calendar.js';
|
|
30
|
+
export { default as Check } from 'lucide-react/dist/esm/icons/check.js';
|
|
31
|
+
export { default as CheckCircle2 } from 'lucide-react/dist/esm/icons/check-circle-2.js';
|
|
32
|
+
export { default as ChevronDown } from 'lucide-react/dist/esm/icons/chevron-down.js';
|
|
33
|
+
export { default as ChevronLeft } from 'lucide-react/dist/esm/icons/chevron-left.js';
|
|
34
|
+
export { default as ChevronRight } from 'lucide-react/dist/esm/icons/chevron-right.js';
|
|
35
|
+
export { default as ChevronUp } from 'lucide-react/dist/esm/icons/chevron-up.js';
|
|
36
|
+
export { default as ChevronsLeft } from 'lucide-react/dist/esm/icons/chevrons-left.js';
|
|
37
|
+
export { default as ChevronsRight } from 'lucide-react/dist/esm/icons/chevrons-right.js';
|
|
38
|
+
export { default as ChevronsUpDown } from 'lucide-react/dist/esm/icons/chevrons-up-down.js';
|
|
39
|
+
export { default as Circle } from 'lucide-react/dist/esm/icons/circle.js';
|
|
40
|
+
export { default as Copy } from 'lucide-react/dist/esm/icons/copy.js';
|
|
41
|
+
export { default as CornerDownLeft } from 'lucide-react/dist/esm/icons/corner-down-left.js';
|
|
42
|
+
export { default as CreditCard } from 'lucide-react/dist/esm/icons/credit-card.js';
|
|
43
|
+
export { default as Download } from 'lucide-react/dist/esm/icons/download.js';
|
|
44
|
+
export { default as Edit2 } from 'lucide-react/dist/esm/icons/edit-2.js';
|
|
45
|
+
export { default as Ellipsis } from 'lucide-react/dist/esm/icons/ellipsis.js';
|
|
46
|
+
export { default as ExternalLink } from 'lucide-react/dist/esm/icons/external-link.js';
|
|
47
|
+
export { default as Eye } from 'lucide-react/dist/esm/icons/eye.js';
|
|
48
|
+
export { default as EyeOff } from 'lucide-react/dist/esm/icons/eye-off.js';
|
|
49
|
+
export { default as File } from 'lucide-react/dist/esm/icons/file.js';
|
|
50
|
+
export { default as FileText } from 'lucide-react/dist/esm/icons/file-text.js';
|
|
51
|
+
export { default as Filter } from 'lucide-react/dist/esm/icons/filter.js';
|
|
52
|
+
export { default as Folder } from 'lucide-react/dist/esm/icons/folder.js';
|
|
53
|
+
export { default as FolderOpen } from 'lucide-react/dist/esm/icons/folder-open.js';
|
|
54
|
+
export { default as Github } from 'lucide-react/dist/esm/icons/github.js';
|
|
55
|
+
export { default as GripVertical } from 'lucide-react/dist/esm/icons/grip-vertical.js';
|
|
56
|
+
export { default as Heart } from 'lucide-react/dist/esm/icons/heart.js';
|
|
57
|
+
export { default as HelpCircle } from 'lucide-react/dist/esm/icons/help-circle.js';
|
|
58
|
+
export { default as Home } from 'lucide-react/dist/esm/icons/home.js';
|
|
59
|
+
export { default as Inbox } from 'lucide-react/dist/esm/icons/inbox.js';
|
|
60
|
+
export { default as Info } from 'lucide-react/dist/esm/icons/info.js';
|
|
61
|
+
export { default as LayoutGrid } from 'lucide-react/dist/esm/icons/layout-grid.js';
|
|
62
|
+
export { default as Link2 } from 'lucide-react/dist/esm/icons/link-2.js';
|
|
63
|
+
export { default as Loader2 } from 'lucide-react/dist/esm/icons/loader-2.js';
|
|
64
|
+
export { default as Lock } from 'lucide-react/dist/esm/icons/lock.js';
|
|
65
|
+
export { default as LogOut } from 'lucide-react/dist/esm/icons/log-out.js';
|
|
66
|
+
export { default as Mail } from 'lucide-react/dist/esm/icons/mail.js';
|
|
67
|
+
export { default as Menu } from 'lucide-react/dist/esm/icons/menu.js';
|
|
68
|
+
export { default as Minus } from 'lucide-react/dist/esm/icons/minus.js';
|
|
69
|
+
export { default as Moon } from 'lucide-react/dist/esm/icons/moon.js';
|
|
70
|
+
export { default as MoreHorizontal } from 'lucide-react/dist/esm/icons/more-horizontal.js';
|
|
71
|
+
export { default as Package } from 'lucide-react/dist/esm/icons/package.js';
|
|
72
|
+
export { default as Pencil } from 'lucide-react/dist/esm/icons/pencil.js';
|
|
73
|
+
export { default as Plug } from 'lucide-react/dist/esm/icons/plug.js';
|
|
74
|
+
export { default as Plus } from 'lucide-react/dist/esm/icons/plus.js';
|
|
75
|
+
export { default as Search } from 'lucide-react/dist/esm/icons/search.js';
|
|
76
|
+
export { default as Settings } from 'lucide-react/dist/esm/icons/settings.js';
|
|
77
|
+
export { default as ShoppingCart } from 'lucide-react/dist/esm/icons/shopping-cart.js';
|
|
78
|
+
export { default as Sparkles } from 'lucide-react/dist/esm/icons/sparkles.js';
|
|
79
|
+
export { default as Star } from 'lucide-react/dist/esm/icons/star.js';
|
|
80
|
+
export { default as Sun } from 'lucide-react/dist/esm/icons/sun.js';
|
|
81
|
+
export { default as Trash2 } from 'lucide-react/dist/esm/icons/trash-2.js';
|
|
82
|
+
export { default as Upload } from 'lucide-react/dist/esm/icons/upload.js';
|
|
83
|
+
export { default as User } from 'lucide-react/dist/esm/icons/user.js';
|
|
84
|
+
export { default as Users } from 'lucide-react/dist/esm/icons/users.js';
|
|
85
|
+
export { default as X } from 'lucide-react/dist/esm/icons/x.js';
|
|
86
|
+
export { default as XCircle } from 'lucide-react/dist/esm/icons/x-circle.js';
|
|
87
|
+
export { default as Zap } from 'lucide-react/dist/esm/icons/zap.js';
|
|
88
|
+
export type { LucideIcon, LucideProps } from 'lucide-react';
|