@prozorro/prozorro-ui 0.0.26-beta → 0.0.27-beta

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.
@@ -1 +1 @@
1
- {"generatedAt":1780395057002,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":false,"refCount":0,"knownPackages":{"stylingPackages":{"sass":"^1.92.1"}},"hasRouterPackage":false,"packageManager":{"type":"npm","agent":"npm","nodeLinker":"node_modules"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/vue3-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/vue3","portableStoriesFileCount":0,"applicationFileCount":0,"storybookVersion":"10.3.6","storybookVersionSpecifier":"^10.3.4","language":"typescript","storybookPackages":{"@storybook/vue3-vite":{"version":"10.3.6"},"storybook":{}},"addons":{"@storybook/addon-docs":{"version":"10.3.6"}},"packageJsonType":"module"}
1
+ {"generatedAt":1780396318754,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":false,"refCount":0,"knownPackages":{"stylingPackages":{"sass":"^1.92.1"}},"hasRouterPackage":false,"packageManager":{"type":"npm","agent":"npm","nodeLinker":"node_modules"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/vue3-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/vue3","portableStoriesFileCount":0,"applicationFileCount":0,"storybookVersion":"10.3.6","storybookVersionSpecifier":"^10.3.4","language":"typescript","storybookPackages":{"@storybook/vue3-vite":{"version":"10.3.6"},"storybook":{}},"addons":{"@storybook/addon-docs":{"version":"10.3.6"}},"packageJsonType":"module"}
@@ -3,7 +3,11 @@ declare const _default: <TData extends object = PzKeyValueData, TKey extends str
3
3
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & PzKeyValueProps<TData, TKey> & Partial<{}>> & import('vue').PublicProps;
4
4
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
5
5
  attrs: any;
6
- slots: Readonly<{ [K in TKey]?: ((props: import('./types').PzKeyValueValueSlotProps<TData, K>) => unknown) | undefined; } & { [K_1 in `${TKey}_label`]?: ((props: import('./types').PzKeyValueLabelSlotProps<TData, K_1 extends `${infer TItemKey}_label` ? TItemKey : never>) => unknown) | undefined; }> & { [K in TKey]?: ((props: import('./types').PzKeyValueValueSlotProps<TData, K>) => unknown) | undefined; } & { [K_1 in `${TKey}_label`]?: ((props: import('./types').PzKeyValueLabelSlotProps<TData, K_1 extends `${infer TItemKey}_label` ? TItemKey : never>) => unknown) | undefined; };
6
+ slots: Readonly<{ [K in import('./types').PzKeyValueSlotKey<TData, TKey>]?: ((props: import('./types').PzKeyValueValueSlotProps<TData, K>) => unknown) | undefined; } & { [K_1 in `${import('./types').PzKeyValuePath<TData>}_label` | `${string extends TKey ? never : TKey}_label`]?: ((props: import('./types').PzKeyValueLabelSlotProps<TData, K_1 extends `${infer TItemKey}_label` ? TItemKey : never>) => unknown) | undefined; } & {
7
+ [name: string]: ((props: import('./types').PzKeyValueValueSlotProps<TData, string>) => unknown) | undefined;
8
+ }> & { [K in import('./types').PzKeyValueSlotKey<TData, TKey>]?: ((props: import('./types').PzKeyValueValueSlotProps<TData, K>) => unknown) | undefined; } & { [K_1 in `${import('./types').PzKeyValuePath<TData>}_label` | `${string extends TKey ? never : TKey}_label`]?: ((props: import('./types').PzKeyValueLabelSlotProps<TData, K_1 extends `${infer TItemKey}_label` ? TItemKey : never>) => unknown) | undefined; } & {
9
+ [name: string]: ((props: import('./types').PzKeyValueValueSlotProps<TData, string>) => unknown) | undefined;
10
+ };
7
11
  emit: {};
8
12
  }>) => import('vue').VNode & {
9
13
  __ctx?: Awaited<typeof __VLS_setup>;
@@ -1,2 +1,2 @@
1
1
  export { default as PzKeyValue } from './PzKeyValue.vue';
2
- export type { PzKeyValueData, PzKeyValueFlexDirection, PzKeyValueLabelSlotProps, PzKeyValuePathValue, PzKeyValueProps, PzKeyValueSlotProps, PzKeyValueSlots, PzKeyValueValueSlotProps, PzKeyValueViewListItem, } from './types';
2
+ export type { PzKeyValueData, PzKeyValueFlexDirection, PzKeyValueLabelSlotProps, PzKeyValuePath, PzKeyValuePathValue, PzKeyValueProps, PzKeyValueSlotKey, PzKeyValueSlotProps, PzKeyValueSlots, PzKeyValueValueSlotProps, PzKeyValueViewListItem, } from './types';
@@ -4,6 +4,9 @@
4
4
  */
5
5
  export type PzKeyValueFlexDirection = "row" | "row-reverse" | "column" | "column-reverse";
6
6
  export type PzKeyValueData = Record<string, unknown>;
7
+ export type PzKeyValuePath<TSource> = TSource extends object ? {
8
+ [K in Extract<keyof NonNullable<TSource>, string>]: NonNullable<TSource>[K] extends Date | ((...args: never[]) => unknown) | readonly unknown[] ? K : NonNullable<TSource>[K] extends object ? K | `${K}-${PzKeyValuePath<NonNullable<TSource>[K]>}` : K;
9
+ }[Extract<keyof NonNullable<TSource>, string>] : never;
7
10
  export type PzKeyValuePathValue<TSource, TPath extends string> = string extends TPath ? unknown : TPath extends `${infer Head}-${infer Tail}` ? Head extends keyof NonNullable<TSource> ? PzKeyValuePathValue<NonNullable<TSource>[Head], Tail> : unknown : TPath extends keyof NonNullable<TSource> ? NonNullable<TSource>[TPath] : unknown;
8
11
  /**
9
12
  * Descriptor for a single row in the key-value list.
@@ -34,10 +37,13 @@ export interface PzKeyValueLabelSlotProps<TData extends object = PzKeyValueData,
34
37
  source: TData;
35
38
  item: PzKeyValueViewListItem<TKey>;
36
39
  }
40
+ export type PzKeyValueSlotKey<TData extends object = PzKeyValueData, TKey extends string = string> = PzKeyValuePath<TData> | (string extends TKey ? never : TKey);
37
41
  export type PzKeyValueSlots<TData extends object = PzKeyValueData, TKey extends string = string> = {
38
- [K in TKey]?: (props: PzKeyValueValueSlotProps<TData, K>) => unknown;
42
+ [K in PzKeyValueSlotKey<TData, TKey>]?: (props: PzKeyValueValueSlotProps<TData, K>) => unknown;
39
43
  } & {
40
- [K in `${TKey}_label`]?: (props: PzKeyValueLabelSlotProps<TData, K extends `${infer TItemKey}_label` ? TItemKey : never>) => unknown;
44
+ [K in `${PzKeyValueSlotKey<TData, TKey>}_label`]?: (props: PzKeyValueLabelSlotProps<TData, K extends `${infer TItemKey}_label` ? TItemKey : never>) => unknown;
45
+ } & {
46
+ [name: string]: ((props: PzKeyValueValueSlotProps<TData>) => unknown) | undefined;
41
47
  };
42
48
  /**
43
49
  * Props for the `PzKeyValue` component.
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ export { PzAccordionTable, type PzAccordionTableCellSlotProps, type PzAccordionT
6
6
  export { PzTable, type PzTableCellSlotProps, type PzTableColumn, type PzTablePathValue, type PzTableProps, type PzTableRow, type PzTableRowId, type PzTableSlots, } from './components/Data/PzTable';
7
7
  export { PzIcon, type PzIconName, type PzIconProps, type PzIconSize, type PzIconVariant, } from './components/Display/PzIcon';
8
8
  export { PzImage, type PzImageDecoding, type PzImageFit, type PzImageLoading, type PzImageProps, } from './components/Display/PzImage';
9
- export { PzKeyValue, type PzKeyValueData, type PzKeyValueFlexDirection, type PzKeyValueLabelSlotProps, type PzKeyValuePathValue, type PzKeyValueProps, type PzKeyValueSlotProps, type PzKeyValueSlots, type PzKeyValueValueSlotProps, type PzKeyValueViewListItem, } from './components/Display/PzKeyValue';
9
+ export { PzKeyValue, type PzKeyValueData, type PzKeyValueFlexDirection, type PzKeyValueLabelSlotProps, type PzKeyValuePath, type PzKeyValuePathValue, type PzKeyValueProps, type PzKeyValueSlotKey, type PzKeyValueSlotProps, type PzKeyValueSlots, type PzKeyValueValueSlotProps, type PzKeyValueViewListItem, } from './components/Display/PzKeyValue';
10
10
  export { PzLoader, type PzLoaderProps, type PzLoaderVariant } from './components/Display/PzLoader';
11
11
  export { PzSkeleton, type PzSkeletonProps } from './components/Display/PzSkeleton';
12
12
  export { PzStatus, type PzStatusProps, type PzStatusTag, type PzStatusVariant } from './components/Display/PzStatus';
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prozorro/prozorro-ui",
3
3
  "private": false,
4
- "version": "0.0.26-beta",
4
+ "version": "0.0.27-beta",
5
5
  "description": "Official Prozorro UI Library",
6
6
  "author": "Dmytro Rybachek",
7
7
  "license": "MIT",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prozorro/prozorro-ui",
3
3
  "private": false,
4
- "version": "0.0.26-beta",
4
+ "version": "0.0.27-beta",
5
5
  "description": "Official Prozorro UI Library",
6
6
  "author": "Dmytro Rybachek",
7
7
  "license": "MIT",