@gridui/source-list 1.0.1 → 1.0.4
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 +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +2 -2
- package/dist/styles.css +17 -17
- package/docs/catalog.json +35 -0
- package/package.json +7 -8
package/README.md
CHANGED
|
@@ -5,4 +5,4 @@ Core family. Public API: `SourceItem`, `SourceList`, `SourceListProps`.
|
|
|
5
5
|
Import components from `@gridui/source-list` and load `@gridui/source-list/styles.css` after Theme.
|
|
6
6
|
Load styles for any composed dependency used by this family. Applications own routes, labels, state persistence, and branding.
|
|
7
7
|
|
|
8
|
-
See [component ownership](
|
|
8
|
+
See [component ownership](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md) and [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-core/source-list/.changeset/history).
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/source-list/style.ts
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
|
-
var sourceListStyles = cva("m-0 min-w-0 list-decimal ps-gridui-32");
|
|
4
|
-
var sourceItemStyles = cva("border-b border-border py-gridui-8 wrap-anywhere [&_a]:text-link [&_blockquote]:mx-0 [&_blockquote]:border-s-2 [&_blockquote]:border-border [&_blockquote]:ps-gridui-16");
|
|
5
|
-
var sourceMetaStyles = cva("text-muted type-caption");
|
|
3
|
+
var sourceListStyles = cva("gridui-u-m-0 gridui-u-min-w-0 gridui-u-list-decimal gridui-u-ps-gridui-32");
|
|
4
|
+
var sourceItemStyles = cva("gridui-u-border-b gridui-u-border-border gridui-u-py-gridui-8 gridui-u-wrap-anywhere gridui-u-[&_a]:text-link gridui-u-[&_blockquote]:mx-0 gridui-u-[&_blockquote]:border-s-2 gridui-u-[&_blockquote]:border-border gridui-u-[&_blockquote]:ps-gridui-16");
|
|
5
|
+
var sourceMetaStyles = cva("gridui-u-text-muted gridui-u-type-caption");
|
|
6
6
|
|
|
7
7
|
// src/source-list/source-list.tsx
|
|
8
8
|
import { cn } from "@gridui/style-utils";
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/source-list/style.ts", "../src/source-list/source-list.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * @author WMXPY\n * @package Source List\n * @namespace SourceList\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const sourceListStyles = cva(\"m-0 min-w-0 list-decimal ps-gridui-32\");\n\nexport const sourceItemStyles = cva(\"border-b border-border py-gridui-8 wrap-anywhere [&_a]:text-link [&_blockquote]:mx-0 [&_blockquote]:border-s-2 [&_blockquote]:border-border [&_blockquote]:ps-gridui-16\");\n\nexport const sourceMetaStyles = cva(\"text-muted type-caption\");\n", "/**\n * @author WMXPY\n * @package Source List\n * @namespace SourceList\n * @description Source List\n */\n\nimport { sourceItemStyles, sourceListStyles, sourceMetaStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type SourceItem = {\n readonly id: string;\n readonly title: string;\n readonly href: string;\n readonly description?: string;\n readonly excerpt?: string;\n};\n\nexport type SourceListProps = Omit<ComponentPropsWithRef<\"ol\">, \"children\"> & {\n readonly sources: readonly SourceItem[];\n readonly label: string;\n readonly emptyLabel: string;\n};\n\nexport const SourceList: FC<SourceListProps> = (props: SourceListProps) => {\n const { sources, label, emptyLabel, className, ...restProps } = props;\n return (<ol\n {...restProps}\n aria-label={label}\n className={cn(sourceListStyles(), className)}\n >\n {sources.length === 0 && (<li\n className={sourceMetaStyles()}\n >\n {emptyLabel}\n </li>)}\n {sources.map(source => {\n return (<li\n key={source.id}\n className={sourceItemStyles()}\n >\n <a\n href={source.href}\n >\n {source.title}\n </a>\n {source.description && (<p\n className={sourceMetaStyles()}\n >\n {source.description}\n </p>)}\n {source.excerpt && (<blockquote>\n {source.excerpt}\n </blockquote>)}\n </li>);\n })}\n </ol>);\n};\n"],
|
|
5
|
-
"mappings": ";AAOA,SAAS,WAAW;AAEb,IAAM,mBAAmB,IAAI,
|
|
4
|
+
"sourcesContent": ["/**\n * @author WMXPY\n * @package Source List\n * @namespace SourceList\n * @description Style\n */\n\nimport { cva } from \"class-variance-authority\";\n\nexport const sourceListStyles = cva(\"gridui-u-m-0 gridui-u-min-w-0 gridui-u-list-decimal gridui-u-ps-gridui-32\");\n\nexport const sourceItemStyles = cva(\"gridui-u-border-b gridui-u-border-border gridui-u-py-gridui-8 gridui-u-wrap-anywhere gridui-u-[&_a]:text-link gridui-u-[&_blockquote]:mx-0 gridui-u-[&_blockquote]:border-s-2 gridui-u-[&_blockquote]:border-border gridui-u-[&_blockquote]:ps-gridui-16\");\n\nexport const sourceMetaStyles = cva(\"gridui-u-text-muted gridui-u-type-caption\");\n", "/**\n * @author WMXPY\n * @package Source List\n * @namespace SourceList\n * @description Source List\n */\n\nimport { sourceItemStyles, sourceListStyles, sourceMetaStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type SourceItem = {\n readonly id: string;\n readonly title: string;\n readonly href: string;\n readonly description?: string;\n readonly excerpt?: string;\n};\n\nexport type SourceListProps = Omit<ComponentPropsWithRef<\"ol\">, \"children\"> & {\n readonly sources: readonly SourceItem[];\n readonly label: string;\n readonly emptyLabel: string;\n};\n\nexport const SourceList: FC<SourceListProps> = (props: SourceListProps) => {\n const { sources, label, emptyLabel, className, ...restProps } = props;\n return (<ol\n {...restProps}\n aria-label={label}\n className={cn(sourceListStyles(), className)}\n >\n {sources.length === 0 && (<li\n className={sourceMetaStyles()}\n >\n {emptyLabel}\n </li>)}\n {sources.map(source => {\n return (<li\n key={source.id}\n className={sourceItemStyles()}\n >\n <a\n href={source.href}\n >\n {source.title}\n </a>\n {source.description && (<p\n className={sourceMetaStyles()}\n >\n {source.description}\n </p>)}\n {source.excerpt && (<blockquote>\n {source.excerpt}\n </blockquote>)}\n </li>);\n })}\n </ol>);\n};\n"],
|
|
5
|
+
"mappings": ";AAOA,SAAS,WAAW;AAEb,IAAM,mBAAmB,IAAI,2EAA2E;AAExG,IAAM,mBAAmB,IAAI,0PAA0P;AAEvR,IAAM,mBAAmB,IAAI,2CAA2C;;;ACL/E,SAAS,UAAU;AAwBe,cAMd,YANc;AAP3B,IAAM,aAAkC,CAAC,UAA2B;AACvE,QAAM,EAAE,SAAS,OAAO,YAAY,WAAW,GAAG,UAAU,IAAI;AAChE,SAAQ;AAAA,IAAC;AAAA;AAAA,MACJ,GAAG;AAAA,MACJ,cAAY;AAAA,MACZ,WAAW,GAAG,iBAAiB,GAAG,SAAS;AAAA,MAE1C;AAAA,gBAAQ,WAAW,KAAM;AAAA,UAAC;AAAA;AAAA,YACvB,WAAW,iBAAiB;AAAA,YAE3B;AAAA;AAAA,QACL;AAAA,QACC,QAAQ,IAAI,YAAU;AACnB,iBAAQ;AAAA,YAAC;AAAA;AAAA,cAEL,WAAW,iBAAiB;AAAA,cAE5B;AAAA;AAAA,kBAAC;AAAA;AAAA,oBACG,MAAM,OAAO;AAAA,oBAEZ,iBAAO;AAAA;AAAA,gBACZ;AAAA,gBACC,OAAO,eAAgB;AAAA,kBAAC;AAAA;AAAA,oBACrB,WAAW,iBAAiB;AAAA,oBAE3B,iBAAO;AAAA;AAAA,gBACZ;AAAA,gBACC,OAAO,WAAY,oBAAC,gBAChB,iBAAO,SACZ;AAAA;AAAA;AAAA,YAfK,OAAO;AAAA,UAgBhB;AAAA,QACJ,CAAC;AAAA;AAAA;AAAA,EACL;AACJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/styles.css
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
/*! tailwindcss v4.3.
|
|
1
|
+
/*! tailwindcss v4.3.4 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties;
|
|
3
3
|
@layer theme, base, components, utilities;
|
|
4
4
|
@layer utilities {
|
|
5
|
-
.m-0 {
|
|
5
|
+
.gridui-u-m-0 {
|
|
6
6
|
margin: 0px;
|
|
7
7
|
}
|
|
8
|
-
.min-w-0 {
|
|
8
|
+
.gridui-u-min-w-0 {
|
|
9
9
|
min-width: 0px;
|
|
10
10
|
}
|
|
11
|
-
.list-decimal {
|
|
11
|
+
.gridui-u-list-decimal {
|
|
12
12
|
list-style-type: decimal;
|
|
13
13
|
}
|
|
14
|
-
.border-b {
|
|
14
|
+
.gridui-u-border-b {
|
|
15
15
|
border-bottom-style: var(--tw-border-style);
|
|
16
16
|
border-bottom-width: 1px;
|
|
17
17
|
}
|
|
18
|
-
.border-border {
|
|
18
|
+
.gridui-u-border-border {
|
|
19
19
|
border-color: var(--gridui-border);
|
|
20
20
|
}
|
|
21
|
-
.py-gridui-8 {
|
|
21
|
+
.gridui-u-py-gridui-8 {
|
|
22
22
|
padding-block: var(--gridui-space-8);
|
|
23
23
|
}
|
|
24
|
-
.ps-gridui-32 {
|
|
24
|
+
.gridui-u-ps-gridui-32 {
|
|
25
25
|
padding-inline-start: var(--gridui-space-32);
|
|
26
26
|
}
|
|
27
|
-
.type-caption {
|
|
27
|
+
.gridui-u-type-caption {
|
|
28
28
|
font: var(--gridui-type-caption);
|
|
29
29
|
letter-spacing: normal;
|
|
30
30
|
}
|
|
31
|
-
.wrap-anywhere {
|
|
31
|
+
.gridui-u-wrap-anywhere {
|
|
32
32
|
overflow-wrap: anywhere;
|
|
33
33
|
}
|
|
34
|
-
.text-muted {
|
|
34
|
+
.gridui-u-text-muted {
|
|
35
35
|
color: var(--gridui-muted);
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
.gridui-u-\[\&_a\]\:text-link a {
|
|
38
38
|
color: var(--gridui-link);
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
.gridui-u-\[\&_blockquote\]\:mx-0 blockquote {
|
|
41
41
|
margin-inline: 0px;
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
.gridui-u-\[\&_blockquote\]\:border-s-2 blockquote {
|
|
44
44
|
border-inline-start-style: var(--tw-border-style);
|
|
45
45
|
border-inline-start-width: 2px;
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
.gridui-u-\[\&_blockquote\]\:border-border blockquote {
|
|
48
48
|
border-color: var(--gridui-border);
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
.gridui-u-\[\&_blockquote\]\:ps-gridui-16 blockquote {
|
|
51
51
|
padding-inline-start: var(--gridui-space-16);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
initial-value: solid;
|
|
58
58
|
}
|
|
59
59
|
@layer properties {
|
|
60
|
-
@supports ((-webkit-hyphens: none) and (not (margin-trim:
|
|
60
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
61
61
|
*, ::before, ::after, ::backdrop {
|
|
62
62
|
--tw-border-style: solid;
|
|
63
63
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"name": "@gridui/source-list",
|
|
4
|
+
"version": "1.0.4",
|
|
5
|
+
"category": "core",
|
|
6
|
+
"description": "GridUI React source list",
|
|
7
|
+
"usage": "GridUI React source list",
|
|
8
|
+
"documentation": [
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
11
|
+
"exports": [
|
|
12
|
+
{
|
|
13
|
+
"name": "SourceItem",
|
|
14
|
+
"kind": "type",
|
|
15
|
+
"importPath": "@gridui/source-list"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "SourceList",
|
|
19
|
+
"kind": "component",
|
|
20
|
+
"importPath": "@gridui/source-list"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "SourceListProps",
|
|
24
|
+
"kind": "type",
|
|
25
|
+
"importPath": "@gridui/source-list"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"styles": [
|
|
29
|
+
"@gridui/theme/styles.css",
|
|
30
|
+
"@gridui/source-list/styles.css"
|
|
31
|
+
],
|
|
32
|
+
"examples": [
|
|
33
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/source-list/stories/source-list.stories.tsx"
|
|
34
|
+
]
|
|
35
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/source-list",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "GridUI React source list",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
9
|
-
"README.md"
|
|
9
|
+
"README.md",
|
|
10
|
+
"docs"
|
|
10
11
|
],
|
|
11
12
|
"sideEffects": [
|
|
12
13
|
"**/*.css"
|
|
@@ -26,14 +27,14 @@
|
|
|
26
27
|
"react-dom": "^19.2.0"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"@gridui/style-utils": "^2.
|
|
30
|
-
"@gridui/theme": "^2.
|
|
30
|
+
"@gridui/style-utils": "^2.2.2",
|
|
31
|
+
"@gridui/theme": "^2.5.3",
|
|
31
32
|
"class-variance-authority": "0.7.1"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"@gridui-internal/configuration": "0.0.0-internal",
|
|
35
36
|
"@jest/globals": "30.5.2",
|
|
36
|
-
"@storybook/react-vite": "10.6.
|
|
37
|
+
"@storybook/react-vite": "10.6.6",
|
|
37
38
|
"@types/jest": "30.0.0",
|
|
38
39
|
"@types/node": "26.6.6",
|
|
39
40
|
"@types/react": "19.3.0",
|
|
@@ -45,8 +46,6 @@
|
|
|
45
46
|
},
|
|
46
47
|
"scripts": {
|
|
47
48
|
"build": "node ../../scripts/compilation/package.ts",
|
|
48
|
-
"compile": "tsc --project tsconfig.json"
|
|
49
|
-
"test": "jest",
|
|
50
|
-
"coverage": "jest --coverage"
|
|
49
|
+
"compile": "tsc --project tsconfig.json"
|
|
51
50
|
}
|
|
52
51
|
}
|