@furystack/shades-common-components 12.1.0 → 12.2.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/CHANGELOG.md +16 -0
- package/esm/components/avatar.d.ts.map +1 -1
- package/esm/components/avatar.js +3 -1
- package/esm/components/avatar.js.map +1 -1
- package/esm/components/avatar.spec.js +4 -4
- package/esm/components/avatar.spec.js.map +1 -1
- package/esm/components/icons/icon-definitions.d.ts +82 -0
- package/esm/components/icons/icon-definitions.d.ts.map +1 -1
- package/esm/components/icons/icon-definitions.js +717 -0
- package/esm/components/icons/icon-definitions.js.map +1 -1
- package/esm/components/icons/icon-definitions.spec.js +22 -2
- package/esm/components/icons/icon-definitions.spec.js.map +1 -1
- package/esm/components/icons/icon-types.d.ts +10 -0
- package/esm/components/icons/icon-types.d.ts.map +1 -1
- package/esm/components/icons/index.d.ts +1 -1
- package/esm/components/icons/index.d.ts.map +1 -1
- package/esm/components/page-container/index.d.ts +1 -1
- package/esm/components/page-container/index.js +1 -1
- package/esm/components/page-container/page-header.d.ts +5 -5
- package/esm/components/page-container/page-header.d.ts.map +1 -1
- package/esm/components/page-container/page-header.js +3 -3
- package/esm/components/suggest/index.d.ts +1 -1
- package/esm/components/suggest/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/avatar.spec.tsx +4 -4
- package/src/components/avatar.tsx +3 -1
- package/src/components/icons/icon-definitions.spec.ts +28 -2
- package/src/components/icons/icon-definitions.ts +759 -0
- package/src/components/icons/icon-types.ts +12 -0
- package/src/components/icons/index.ts +1 -1
- package/src/components/page-container/index.tsx +1 -1
- package/src/components/page-container/page-header.tsx +5 -5
- package/src/components/suggest/index.tsx +1 -1
|
@@ -8,6 +8,9 @@ export type IconPath = {
|
|
|
8
8
|
fillRule?: 'evenodd' | 'nonzero'
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
/** Category for grouping icons in galleries */
|
|
12
|
+
export type IconCategory = 'Actions' | 'Navigation' | 'Status' | 'Content' | 'UI' | 'Common'
|
|
13
|
+
|
|
11
14
|
/**
|
|
12
15
|
* Defines an icon as a set of SVG paths with rendering metadata.
|
|
13
16
|
* Icons are lightweight objects containing only path data -- no embedded SVG markup.
|
|
@@ -45,4 +48,13 @@ export type IconDefinition = {
|
|
|
45
48
|
* @default 2
|
|
46
49
|
*/
|
|
47
50
|
strokeWidth?: number
|
|
51
|
+
|
|
52
|
+
/** Human-readable display name (e.g., "Check Circle", "Arrow Left") */
|
|
53
|
+
name?: string
|
|
54
|
+
/** Short description of the icon's intended use */
|
|
55
|
+
description?: string
|
|
56
|
+
/** Search keywords for filtering (e.g., ['dismiss', 'cancel', 'x'] for close) */
|
|
57
|
+
keywords?: string[]
|
|
58
|
+
/** Category for grouping in galleries */
|
|
59
|
+
category?: IconCategory
|
|
48
60
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { IconDefinition, IconPath } from './icon-types.js'
|
|
1
|
+
export type { IconCategory, IconDefinition, IconPath } from './icon-types.js'
|
|
2
2
|
export { Icon } from './icon.js'
|
|
3
3
|
export type { IconProps } from './icon.js'
|
|
4
4
|
export * as icons from './icon-definitions.js'
|
|
@@ -30,7 +30,7 @@ export type PageContainerProps = {
|
|
|
30
30
|
* ```tsx
|
|
31
31
|
* <PageContainer maxWidth="800px" centered padding="48px" gap="24px">
|
|
32
32
|
* <PageHeader
|
|
33
|
-
* icon=
|
|
33
|
+
* icon={<Icon icon={icons.users} />}
|
|
34
34
|
* title="Users"
|
|
35
35
|
* description="Manage user accounts and their roles."
|
|
36
36
|
* />
|
|
@@ -6,8 +6,8 @@ import { Paper } from '../paper.js'
|
|
|
6
6
|
* Props for the PageHeader component.
|
|
7
7
|
*/
|
|
8
8
|
export type PageHeaderProps = {
|
|
9
|
-
/** Optional icon (
|
|
10
|
-
icon?: string
|
|
9
|
+
/** Optional icon displayed before the title (string or JSX element such as an Icon component) */
|
|
10
|
+
icon?: JSX.Element | string
|
|
11
11
|
/** The page title */
|
|
12
12
|
title: string
|
|
13
13
|
/** Optional description text displayed below the title */
|
|
@@ -27,9 +27,9 @@ export type PageHeaderProps = {
|
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* ```tsx
|
|
30
|
-
* //
|
|
30
|
+
* // Header with an Icon component
|
|
31
31
|
* <PageHeader
|
|
32
|
-
* icon=
|
|
32
|
+
* icon={<Icon icon={icons.users} />}
|
|
33
33
|
* title="Users"
|
|
34
34
|
* description="Manage user accounts and their roles."
|
|
35
35
|
* />
|
|
@@ -39,7 +39,7 @@ export type PageHeaderProps = {
|
|
|
39
39
|
* ```tsx
|
|
40
40
|
* // Header with action buttons
|
|
41
41
|
* <PageHeader
|
|
42
|
-
* icon=
|
|
42
|
+
* icon={<Icon icon={icons.folder} />}
|
|
43
43
|
* title="Projects"
|
|
44
44
|
* description="View and manage your projects."
|
|
45
45
|
* actions={
|
|
@@ -16,7 +16,7 @@ export * from './suggestion-list.js'
|
|
|
16
16
|
export * from './suggestion-result.js'
|
|
17
17
|
|
|
18
18
|
export interface SuggestProps<T> {
|
|
19
|
-
defaultPrefix: string
|
|
19
|
+
defaultPrefix: JSX.Element | string
|
|
20
20
|
getEntries: (term: string) => Promise<T[]>
|
|
21
21
|
getSuggestionEntry: (entry: T) => SuggestionResult
|
|
22
22
|
onSelectSuggestion: (entry: T) => void
|