@gridui/metrics-section 1.0.1 → 1.0.2

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 CHANGED
@@ -5,7 +5,7 @@ Landing family. Public API: `MetricsSection`, `MetricsSectionItem`, `MetricsSect
5
5
  Import components from `@gridui/metrics-section` and load `@gridui/metrics-section/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](../../docs/component-ownership.md) and [release history](.changeset/history/).
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-landing/metrics-section/.changeset/history).
9
9
 
10
10
  ## Metric sections
11
11
 
package/dist/index.js CHANGED
@@ -2,12 +2,12 @@
2
2
  import { cn } from "@gridui/style-utils";
3
3
  import { cva } from "class-variance-authority";
4
4
  var metricsTitleStyles = cva(cn(
5
- "gridui-metrics-title type-supporting",
6
- "text-muted"
5
+ "gridui-metrics-title gridui-u-type-supporting",
6
+ "gridui-u-text-muted"
7
7
  ));
8
8
  var metricsSurfaceStyles = cva(cn(
9
9
  "gridui-metrics-surface",
10
- "h-full"
10
+ "gridui-u-h-full"
11
11
  ));
12
12
 
13
13
  // src/metrics-section/metrics-section.tsx
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/metrics-section/style.ts", "../src/metrics-section/metrics-section.tsx"],
4
- "sourcesContent": ["/**\n * @author WMXPY\n * @package Metrics Section\n * @namespace MetricsSection\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const metricsTitleStyles = cva(cn(\n \"gridui-metrics-title type-supporting\",\n \"text-muted\",\n));\n\nexport const metricsSurfaceStyles = cva(cn(\n \"gridui-metrics-surface\",\n \"h-full\",\n));\n", "/**\n * @author WMXPY\n * @package Metrics Section\n * @namespace MetricsSection\n * @description Metrics Section\n */\n\nimport { metricsSurfaceStyles, metricsTitleStyles } from \"./style\";\nimport { FrameSection, type FrameSectionProps, Grid, GridItem } from \"@gridui/grid\";\nimport { LoadingSurface } from \"@gridui/loading-surface\";\nimport { Metric } from \"@gridui/metric\";\nimport { ContentPanel } from \"@gridui/panel\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentProps, FC, ReactNode } from \"react\";\n\nexport type MetricsSectionItem = Pick<ComponentProps<typeof Metric>, \"label\" | \"value\" | \"valueId\" | \"description\"> & {\n readonly id: string;\n};\n\nexport type MetricsSectionProps = Omit<FrameSectionProps, \"children\" | \"title\"> & {\n readonly title: string;\n readonly items: readonly MetricsSectionItem[];\n readonly loading: boolean;\n readonly failed?: boolean;\n readonly notice?: ReactNode;\n};\n\nexport const MetricsSection: FC<MetricsSectionProps> = (props: MetricsSectionProps) => {\n const {\n title,\n items,\n loading,\n failed = false,\n notice,\n ...restProps\n } = props;\n return (<FrameSection\n {...restProps}\n >\n <Grid\n frame=\"internal\"\n columns={{\n base: 1,\n md: 2,\n }}\n fillLastRow\n >\n <GridItem\n span=\"full\"\n >\n <ContentPanel\n paddingInline={24}\n paddingBlock={16}\n >\n <h2\n className={cn(metricsTitleStyles())}\n >\n {title}\n </h2>\n </ContentPanel>\n </GridItem>\n {failed ? (<GridItem\n span=\"full\"\n padding={24}\n >\n {notice}\n </GridItem>) : items.map(({ id, ...metric }, index) => {\n return (<GridItem\n key={id}\n >\n <LoadingSurface\n loading={loading}\n phase={index}\n asChild\n hideContent\n >\n <ContentPanel\n className={cn(metricsSurfaceStyles())}\n >\n <Metric\n {...metric}\n />\n </ContentPanel>\n </LoadingSurface>\n </GridItem>);\n })}\n </Grid>\n </FrameSection>);\n};\n"],
4
+ "sourcesContent": ["/**\n * @author WMXPY\n * @package Metrics Section\n * @namespace MetricsSection\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const metricsTitleStyles = cva(cn(\n \"gridui-metrics-title gridui-u-type-supporting\",\n \"gridui-u-text-muted\",\n));\n\nexport const metricsSurfaceStyles = cva(cn(\n \"gridui-metrics-surface\",\n \"gridui-u-h-full\",\n));\n", "/**\n * @author WMXPY\n * @package Metrics Section\n * @namespace MetricsSection\n * @description Metrics Section\n */\n\nimport { metricsSurfaceStyles, metricsTitleStyles } from \"./style\";\nimport { FrameSection, type FrameSectionProps, Grid, GridItem } from \"@gridui/grid\";\nimport { LoadingSurface } from \"@gridui/loading-surface\";\nimport { Metric } from \"@gridui/metric\";\nimport { ContentPanel } from \"@gridui/panel\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentProps, FC, ReactNode } from \"react\";\n\nexport type MetricsSectionItem = Pick<ComponentProps<typeof Metric>, \"label\" | \"value\" | \"valueId\" | \"description\"> & {\n readonly id: string;\n};\n\nexport type MetricsSectionProps = Omit<FrameSectionProps, \"children\" | \"title\"> & {\n readonly title: string;\n readonly items: readonly MetricsSectionItem[];\n readonly loading: boolean;\n readonly failed?: boolean;\n readonly notice?: ReactNode;\n};\n\nexport const MetricsSection: FC<MetricsSectionProps> = (props: MetricsSectionProps) => {\n const {\n title,\n items,\n loading,\n failed = false,\n notice,\n ...restProps\n } = props;\n return (<FrameSection\n {...restProps}\n >\n <Grid\n frame=\"internal\"\n columns={{\n base: 1,\n md: 2,\n }}\n fillLastRow\n >\n <GridItem\n span=\"full\"\n >\n <ContentPanel\n paddingInline={24}\n paddingBlock={16}\n >\n <h2\n className={cn(metricsTitleStyles())}\n >\n {title}\n </h2>\n </ContentPanel>\n </GridItem>\n {failed ? (<GridItem\n span=\"full\"\n padding={24}\n >\n {notice}\n </GridItem>) : items.map(({ id, ...metric }, index) => {\n return (<GridItem\n key={id}\n >\n <LoadingSurface\n loading={loading}\n phase={index}\n asChild\n hideContent\n >\n <ContentPanel\n className={cn(metricsSurfaceStyles())}\n >\n <Metric\n {...metric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A,sBACP,SAAO;AAAA,sBACP,aAAW;AAAA,sBAEX;AAAA,wBAAC;AAAA;AAAA,0BACG,WAAWA,IAAG,qBAAqB,CAAC;AAAA,0BAEpC;AAAA,4BAAC;AAAA;AAAA,8BACI,GAAG;AAAA;AAAA,0BACR;AAAA;AAAA,sBACJ;AAAA;AAAA,kBACJ;AAAA;AAAA,gBAfK;AAAA,cAgBT;AAAA,YACJ,CAAC;AAAA;AAAA;AAAA,MACL;AAAA;AAAA,EACJ;AACJ;",
6
6
  "names": ["cn"]
7
7
  }
package/dist/styles.css CHANGED
@@ -1,14 +1,14 @@
1
1
  /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
2
  @layer theme, base, components, utilities;
3
3
  @layer utilities {
4
- .h-full {
4
+ .gridui-u-h-full {
5
5
  height: 100%;
6
6
  }
7
- .type-supporting {
7
+ .gridui-u-type-supporting {
8
8
  font: var(--gridui-type-supporting);
9
9
  letter-spacing: normal;
10
10
  }
11
- .text-muted {
11
+ .gridui-u-text-muted {
12
12
  color: var(--gridui-muted);
13
13
  }
14
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridui/metrics-section",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "GridUI React metrics section",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -26,12 +26,12 @@
26
26
  "react-dom": "^19.2.0"
27
27
  },
28
28
  "dependencies": {
29
- "@gridui/grid": "^2.2.1",
30
- "@gridui/loading-surface": "^1.0.1",
31
- "@gridui/metric": "^1.0.1",
32
- "@gridui/panel": "^1.0.1",
33
- "@gridui/style-utils": "^2.1.3",
34
- "@gridui/theme": "^2.2.1",
29
+ "@gridui/grid": "^2.3.1",
30
+ "@gridui/loading-surface": "^1.0.2",
31
+ "@gridui/metric": "^1.0.2",
32
+ "@gridui/panel": "^1.0.2",
33
+ "@gridui/style-utils": "^2.1.4",
34
+ "@gridui/theme": "^2.3.2",
35
35
  "class-variance-authority": "0.7.1"
36
36
  },
37
37
  "devDependencies": {