@adea-ai/ui 0.95.6 → 0.95.7
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/components/composites/catalog-browser/catalog-browser-group.d.ts.map +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser-group.js +1 -1
- package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -1
- package/dist/r/src/components/composites/catalog-browser/catalog-browser-group.tsx +6 -1
- package/package.json +1 -1
- package/src/components/composites/catalog-browser/catalog-browser-group.tsx +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-browser-group.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/catalog-browser/catalog-browser-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AAMzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE/F,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,eAqB3D;
|
|
1
|
+
{"version":3,"file":"catalog-browser-group.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/catalog-browser/catalog-browser-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AAMzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE/F,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,eAqB3D;AAsDD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,EAAE;IAChD,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC,CAAA;IAC1B,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,OAAO,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAA;IAC/C,aAAa,EAAE,CAAC,OAAO,EAAE,SAAS,mBAAmB,CAAC,KAAK,CAAC,EAAE,EAAE,cAAc,EAAE,MAAM,KAAK,MAAM,CAAA;IACjG,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,GAAG,CAAC,OAAO,CAAA;IACzC,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAClE,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,SAAS,KAAK,IAAI,CAAA;IACpE,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/B,eAwDA"}
|
|
@@ -53,7 +53,7 @@ function CatalogBrowserRow(props) {
|
|
|
53
53
|
},
|
|
54
54
|
variant: "outline",
|
|
55
55
|
size: "lg",
|
|
56
|
-
"class": "h-auto min-h-row-lg w-full min-w-0 justify-start gap-3 whitespace-normal",
|
|
56
|
+
"class": "h-auto! min-h-row-lg w-full min-w-0 justify-start gap-3 whitespace-normal",
|
|
57
57
|
get disabled() {
|
|
58
58
|
return props.disabled;
|
|
59
59
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-browser-group.js","names":["createUniqueId","For","onCleanup","Show","JSX","ChevronDown","ChevronRight","ChevronUp","keyedRows","Badge","Button","Skeleton","CatalogBrowserEntry","CatalogBrowserGroup","CatalogGroup","CatalogLoadingState","props","label","_el$","_tmpl$","_$insert","_$createComponent","each","children","_el$2","_tmpl$2","_el$3","firstChild","_$effect","_$setAttribute","CatalogBrowserRow","entry","Value","groupId","installedLabel","publishedByLabel","publisher","disabled","renderIcon","value","Element","onSelect","key","onRef","element","HTMLButtonElement","JSON","stringify","id","undefined","ref","node","data-catalog-entry-id","variant","size","onClick","_el$4","_tmpl$3","_el$5","_tmpl$4","_el$6","_el$7","_el$8","nextSibling","_el$9","_el$0","name","when","installed","description","category","group","expanded","previewCount","showMoreLabel","entries","remainingCount","showLessLabel","onToggle","headingId","listId","hidden","slice","preview","rows","_el$1","_tmpl$5","_el$10","_el$11","_el$12","length","row","item","aria-expanded","fallback","_$memo","_$createComponent","_$setAttribute","_$memo"],"sources":["../../../../src/components/composites/catalog-browser/catalog-browser-group.tsx"],"sourcesContent":["import { createUniqueId, For, onCleanup, Show, type JSX } from 'solid-js'\nimport { ChevronDown, ChevronRight, ChevronUp } from 'lucide-solid'\nimport { keyedRows } from '#lib/keyed-rows'\nimport { Badge } from '../../ui/badge'\nimport { Button } from '../../ui/button'\nimport { Skeleton } from '../../ui/skeleton'\nimport type { CatalogBrowserEntry, CatalogBrowserGroup as CatalogGroup } from './catalog-types'\n\nexport function CatalogLoadingState(props: { label: string }) {\n return (\n <div\n class=\"grid min-w-0 grid-cols-1 gap-3 md:grid-cols-2\"\n aria-busy=\"true\"\n aria-label={props.label}\n >\n <For each={[0, 1, 2, 3, 4, 5, 6]}>\n {() => (\n <div class=\"flex min-w-0 items-center gap-3 rounded-xl border border-border p-3\">\n <Skeleton class=\"size-9 shrink-0\" />\n <div class=\"grid min-w-0 flex-1 gap-2\">\n <Skeleton class=\"h-4 w-2/5\" />\n <Skeleton class=\"h-3 w-4/5\" />\n <Skeleton class=\"h-3 w-3/5\" />\n </div>\n </div>\n )}\n </For>\n </div>\n )\n}\n\nfunction CatalogBrowserRow<Value>(props: {\n entry: CatalogBrowserEntry<Value>\n groupId: string\n installedLabel: string\n publishedByLabel: (publisher: string) => string\n disabled: boolean\n renderIcon: (value: Value) => JSX.Element\n onSelect: (entry: CatalogBrowserEntry<Value>, key: string) => void\n onRef: (key: string, element: HTMLButtonElement | undefined) => void\n}) {\n const key = JSON.stringify([props.groupId, props.entry.id])\n let element: HTMLButtonElement | undefined\n onCleanup(() => {\n if (element) props.onRef(key, undefined)\n })\n\n return (\n <Button\n ref={(node) => {\n element = node\n props.onRef(key, node)\n }}\n data-catalog-entry-id={props.entry.id}\n variant=\"outline\"\n size=\"lg\"\n class=\"h-auto min-h-row-lg w-full min-w-0 justify-start gap-3 whitespace-normal\"\n disabled={props.disabled}\n onClick={() => props.onSelect(props.entry, key)}\n >\n <span class=\"shrink-0\">{props.renderIcon(props.entry.value)}</span>\n <span class=\"flex min-w-0 flex-1 flex-col gap-1 text-left\">\n <span class=\"flex min-w-0 flex-wrap items-center gap-2\">\n <strong class=\"min-w-0 truncate\">{props.entry.name}</strong>\n <Show when={props.entry.installed}>\n <Badge variant=\"secondary\">{props.installedLabel}</Badge>\n </Show>\n </span>\n <span class=\"text-muted-foreground line-clamp-2 text-xs\">{props.entry.description}</span>\n <span class=\"text-muted-foreground truncate text-2xs\">\n {props.publishedByLabel(props.entry.publisher)} · {props.entry.category}\n </span>\n </span>\n <ChevronRight aria-hidden=\"true\" />\n </Button>\n )\n}\n\nexport function CatalogBrowserGroup<Value>(props: {\n group: CatalogGroup<Value>\n expanded: boolean\n previewCount: number\n disabled: boolean\n installedLabel: string\n publishedByLabel: (publisher: string) => string\n showMoreLabel: (entries: readonly CatalogBrowserEntry<Value>[], remainingCount: number) => string\n showLessLabel: string\n renderIcon: (value: Value) => JSX.Element\n onSelect: (entry: CatalogBrowserEntry<Value>, key: string) => void\n onRef: (key: string, element: HTMLButtonElement | undefined) => void\n onToggle: (id: string) => void\n}) {\n const headingId = `catalog-browser-group-${createUniqueId()}`\n const listId = `catalog-browser-items-${createUniqueId()}`\n const hidden = () => props.group.entries.slice(props.previewCount)\n const preview = () =>\n props.expanded ? props.group.entries : props.group.entries.slice(0, props.previewCount)\n const rows = keyedRows(preview, (entry) => entry.id)\n\n return (\n <section class=\"grid min-w-0 gap-2\" aria-labelledby={headingId}>\n <header class=\"flex min-w-0 items-center gap-2\">\n <h3 id={headingId} class=\"min-w-0 flex-1 truncate text-sm font-semibold\">\n {props.group.label}\n </h3>\n <Badge variant=\"outline\">{props.group.entries.length}</Badge>\n </header>\n <div id={listId} class=\"grid min-w-0 grid-cols-1 gap-2 md:grid-cols-2\">\n <For each={rows()}>\n {(row) => (\n <CatalogBrowserRow\n entry={row.item()}\n groupId={props.group.id}\n installedLabel={props.installedLabel}\n publishedByLabel={props.publishedByLabel}\n disabled={props.disabled}\n renderIcon={props.renderIcon}\n onSelect={props.onSelect}\n onRef={props.onRef}\n />\n )}\n </For>\n </div>\n <Show when={hidden().length > 0}>\n <Button\n variant=\"ghost\"\n size=\"lg\"\n disabled={props.disabled}\n aria-expanded={props.expanded}\n aria-controls={listId}\n onClick={() => props.onToggle(props.group.id)}\n >\n <Show\n when={props.expanded}\n fallback={\n <>\n {props.showMoreLabel(hidden(), hidden().length)}{' '}\n <ChevronDown data-icon=\"inline-end\" aria-hidden=\"true\" />\n </>\n }\n >\n {props.showLessLabel} <ChevronUp data-icon=\"inline-end\" aria-hidden=\"true\" />\n </Show>\n </Button>\n </Show>\n </section>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAQA,SAAgBe,oBAAoBC,OAA0B;CAC5D,cAAA;EAAA,IAAAE,OAAAC,OAAA;EAAAC,OAAAF,MAAAG,gBAMKpB,KAAG;GAACqB,MAAM;IAAC;IAAG;IAAG;IAAG;IAAG;IAAG;IAAG;GAAC;GAACC,uBAC7B;IAAA,IAAAC,QAAAC,QAAA,GAAAC,QAAAF,MAAAG;IAAAP,OAAAI,OAAAH,gBAEIV,UAAQ,EAAA,SAAA,kBAAA,CAAA,GAAAe,KAAA;IAAAN,OAAAM,OAAAL,gBAENV,UAAQ,EAAA,SAAA,YAAA,CAAA,GAAA,IAAA;IAAAS,OAAAM,OAAAL,gBACRV,UAAQ,EAAA,SAAA,YAAA,CAAA,GAAA,IAAA;IAAAS,OAAAM,OAAAL,gBACRV,UAAQ,EAAA,SAAA,YAAA,CAAA,GAAA,IA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A,CAAA,GAAA,IAAA;EAAA,OAAA8E;CAAA,EAAA,CAAA;AAM5C"}
|
|
1
|
+
{"version":3,"file":"catalog-browser-group.js","names":["createUniqueId","For","onCleanup","Show","JSX","ChevronDown","ChevronRight","ChevronUp","keyedRows","Badge","Button","Skeleton","CatalogBrowserEntry","CatalogBrowserGroup","CatalogGroup","CatalogLoadingState","props","label","_el$","_tmpl$","_$insert","_$createComponent","each","children","_el$2","_tmpl$2","_el$3","firstChild","_$effect","_$setAttribute","CatalogBrowserRow","entry","Value","groupId","installedLabel","publishedByLabel","publisher","disabled","renderIcon","value","Element","onSelect","key","onRef","element","HTMLButtonElement","JSON","stringify","id","undefined","ref","node","data-catalog-entry-id","variant","size","onClick","_el$4","_tmpl$3","_el$5","_tmpl$4","_el$6","_el$7","_el$8","nextSibling","_el$9","_el$0","name","when","installed","description","category","group","expanded","previewCount","showMoreLabel","entries","remainingCount","showLessLabel","onToggle","headingId","listId","hidden","slice","preview","rows","_el$1","_tmpl$5","_el$10","_el$11","_el$12","length","row","item","aria-expanded","fallback","_$memo","_$createComponent","_$setAttribute","_$memo"],"sources":["../../../../src/components/composites/catalog-browser/catalog-browser-group.tsx"],"sourcesContent":["import { createUniqueId, For, onCleanup, Show, type JSX } from 'solid-js'\nimport { ChevronDown, ChevronRight, ChevronUp } from 'lucide-solid'\nimport { keyedRows } from '#lib/keyed-rows'\nimport { Badge } from '../../ui/badge'\nimport { Button } from '../../ui/button'\nimport { Skeleton } from '../../ui/skeleton'\nimport type { CatalogBrowserEntry, CatalogBrowserGroup as CatalogGroup } from './catalog-types'\n\nexport function CatalogLoadingState(props: { label: string }) {\n return (\n <div\n class=\"grid min-w-0 grid-cols-1 gap-3 md:grid-cols-2\"\n aria-busy=\"true\"\n aria-label={props.label}\n >\n <For each={[0, 1, 2, 3, 4, 5, 6]}>\n {() => (\n <div class=\"flex min-w-0 items-center gap-3 rounded-xl border border-border p-3\">\n <Skeleton class=\"size-9 shrink-0\" />\n <div class=\"grid min-w-0 flex-1 gap-2\">\n <Skeleton class=\"h-4 w-2/5\" />\n <Skeleton class=\"h-3 w-4/5\" />\n <Skeleton class=\"h-3 w-3/5\" />\n </div>\n </div>\n )}\n </For>\n </div>\n )\n}\n\nfunction CatalogBrowserRow<Value>(props: {\n entry: CatalogBrowserEntry<Value>\n groupId: string\n installedLabel: string\n publishedByLabel: (publisher: string) => string\n disabled: boolean\n renderIcon: (value: Value) => JSX.Element\n onSelect: (entry: CatalogBrowserEntry<Value>, key: string) => void\n onRef: (key: string, element: HTMLButtonElement | undefined) => void\n}) {\n const key = JSON.stringify([props.groupId, props.entry.id])\n let element: HTMLButtonElement | undefined\n onCleanup(() => {\n if (element) props.onRef(key, undefined)\n })\n\n return (\n <Button\n ref={(node) => {\n element = node\n props.onRef(key, node)\n }}\n data-catalog-entry-id={props.entry.id}\n variant=\"outline\"\n size=\"lg\"\n // `h-auto!` must stay important: the size token's fixed `h-control-lg`\n // is a custom class tailwind-merge cannot conflict-resolve, so an\n // unimportant `h-auto` loses the stylesheet sort and clamps this\n // multi-line row to one control line, spilling its content over the\n // neighbouring rows.\n class=\"h-auto! min-h-row-lg w-full min-w-0 justify-start gap-3 whitespace-normal\"\n disabled={props.disabled}\n onClick={() => props.onSelect(props.entry, key)}\n >\n <span class=\"shrink-0\">{props.renderIcon(props.entry.value)}</span>\n <span class=\"flex min-w-0 flex-1 flex-col gap-1 text-left\">\n <span class=\"flex min-w-0 flex-wrap items-center gap-2\">\n <strong class=\"min-w-0 truncate\">{props.entry.name}</strong>\n <Show when={props.entry.installed}>\n <Badge variant=\"secondary\">{props.installedLabel}</Badge>\n </Show>\n </span>\n <span class=\"text-muted-foreground line-clamp-2 text-xs\">{props.entry.description}</span>\n <span class=\"text-muted-foreground truncate text-2xs\">\n {props.publishedByLabel(props.entry.publisher)} · {props.entry.category}\n </span>\n </span>\n <ChevronRight aria-hidden=\"true\" />\n </Button>\n )\n}\n\nexport function CatalogBrowserGroup<Value>(props: {\n group: CatalogGroup<Value>\n expanded: boolean\n previewCount: number\n disabled: boolean\n installedLabel: string\n publishedByLabel: (publisher: string) => string\n showMoreLabel: (entries: readonly CatalogBrowserEntry<Value>[], remainingCount: number) => string\n showLessLabel: string\n renderIcon: (value: Value) => JSX.Element\n onSelect: (entry: CatalogBrowserEntry<Value>, key: string) => void\n onRef: (key: string, element: HTMLButtonElement | undefined) => void\n onToggle: (id: string) => void\n}) {\n const headingId = `catalog-browser-group-${createUniqueId()}`\n const listId = `catalog-browser-items-${createUniqueId()}`\n const hidden = () => props.group.entries.slice(props.previewCount)\n const preview = () =>\n props.expanded ? props.group.entries : props.group.entries.slice(0, props.previewCount)\n const rows = keyedRows(preview, (entry) => entry.id)\n\n return (\n <section class=\"grid min-w-0 gap-2\" aria-labelledby={headingId}>\n <header class=\"flex min-w-0 items-center gap-2\">\n <h3 id={headingId} class=\"min-w-0 flex-1 truncate text-sm font-semibold\">\n {props.group.label}\n </h3>\n <Badge variant=\"outline\">{props.group.entries.length}</Badge>\n </header>\n <div id={listId} class=\"grid min-w-0 grid-cols-1 gap-2 md:grid-cols-2\">\n <For each={rows()}>\n {(row) => (\n <CatalogBrowserRow\n entry={row.item()}\n groupId={props.group.id}\n installedLabel={props.installedLabel}\n publishedByLabel={props.publishedByLabel}\n disabled={props.disabled}\n renderIcon={props.renderIcon}\n onSelect={props.onSelect}\n onRef={props.onRef}\n />\n )}\n </For>\n </div>\n <Show when={hidden().length > 0}>\n <Button\n variant=\"ghost\"\n size=\"lg\"\n disabled={props.disabled}\n aria-expanded={props.expanded}\n aria-controls={listId}\n onClick={() => props.onToggle(props.group.id)}\n >\n <Show\n when={props.expanded}\n fallback={\n <>\n {props.showMoreLabel(hidden(), hidden().length)}{' '}\n <ChevronDown data-icon=\"inline-end\" aria-hidden=\"true\" />\n </>\n }\n >\n {props.showLessLabel} <ChevronUp data-icon=\"inline-end\" aria-hidden=\"true\" />\n </Show>\n </Button>\n </Show>\n </section>\n )\n}\n"],"mappings":";;;;;;;;;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dQ;KACfzB,eAAevC,MAAM8D,SAAS9D,MAAMuD,MAAMvB,EAAE;KAAC,IAAAzB,WAAA;MAAA,OAAAF,gBAE5ClB,MAAI;OAAA,IACHgE,OAAI;QAAA,OAAEnD,MAAMwD;OAAQ;OAAA,IACpBsB,WAAQ;QAAA,OAAA;SAAAC,WAEH/E,MAAM0D,cAAcO,OAAO,GAAGA,OAAO,CAAC,CAACS,MAAM,CAAC;SAAE;SAAGrE,gBACnDhB,aAAW;UAAA,aAAA;UAAA,eAAA;SAAA,CAAA;QAAA;OAAA;OAAA,IAAAkB,WAAA;QAAA,OAAA;SAAAwE,WAIf/E,MAAM6D,aAAa;SAAA;SAAAxD,gBAAGd,WAAS;UAAA,aAAA;UAAA,eAAA;SAAA,CAAA;QAAA;OAAA;MAAA,CAAA;KAAA;IAAA,CAAA;GAAA;EAAA,CAAA,GAAA,IAAA;EAAA,OAAA8E;CAAA,EAAA,CAAA;AAM5C"}
|
|
@@ -54,7 +54,12 @@ function CatalogBrowserRow<Value>(props: {
|
|
|
54
54
|
data-catalog-entry-id={props.entry.id}
|
|
55
55
|
variant="outline"
|
|
56
56
|
size="lg"
|
|
57
|
-
|
|
57
|
+
// `h-auto!` must stay important: the size token's fixed `h-control-lg`
|
|
58
|
+
// is a custom class tailwind-merge cannot conflict-resolve, so an
|
|
59
|
+
// unimportant `h-auto` loses the stylesheet sort and clamps this
|
|
60
|
+
// multi-line row to one control line, spilling its content over the
|
|
61
|
+
// neighbouring rows.
|
|
62
|
+
class="h-auto! min-h-row-lg w-full min-w-0 justify-start gap-3 whitespace-normal"
|
|
58
63
|
disabled={props.disabled}
|
|
59
64
|
onClick={() => props.onSelect(props.entry, key)}
|
|
60
65
|
>
|
package/package.json
CHANGED
|
@@ -54,7 +54,12 @@ function CatalogBrowserRow<Value>(props: {
|
|
|
54
54
|
data-catalog-entry-id={props.entry.id}
|
|
55
55
|
variant="outline"
|
|
56
56
|
size="lg"
|
|
57
|
-
|
|
57
|
+
// `h-auto!` must stay important: the size token's fixed `h-control-lg`
|
|
58
|
+
// is a custom class tailwind-merge cannot conflict-resolve, so an
|
|
59
|
+
// unimportant `h-auto` loses the stylesheet sort and clamps this
|
|
60
|
+
// multi-line row to one control line, spilling its content over the
|
|
61
|
+
// neighbouring rows.
|
|
62
|
+
class="h-auto! min-h-row-lg w-full min-w-0 justify-start gap-3 whitespace-normal"
|
|
58
63
|
disabled={props.disabled}
|
|
59
64
|
onClick={() => props.onSelect(props.entry, key)}
|
|
60
65
|
>
|