@aleph-alpha/ui-library 1.19.0 → 1.21.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.
@@ -4353,6 +4353,70 @@ export declare interface UiChipProps {
4353
4353
 
4354
4354
  export declare type UiChipVariant = 'static' | 'selectable' | 'removable';
4355
4355
 
4356
+ export declare const UiCodeBlock: DefineComponent<UiCodeBlockProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<UiCodeBlockProps> & Readonly<{}>, {
4357
+ language: string;
4358
+ filename: string;
4359
+ showLineNumbers: boolean;
4360
+ showCopyButton: boolean;
4361
+ maxHeight: string;
4362
+ copyLabel: string;
4363
+ copiedLabel: string;
4364
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
4365
+
4366
+ /**
4367
+ * A code block component for displaying source code with syntax highlighting,
4368
+ * line numbers, and copy-to-clipboard functionality. Powered by Shiki.
4369
+ * @category Content
4370
+ * @useCases code display, code snippet, syntax highlighting, API response, terminal output
4371
+ * @keywords code, codeblock, syntax, highlight, copy, pre, snippet
4372
+ * @related UiKbd
4373
+ */
4374
+ export declare interface UiCodeBlockProps {
4375
+ /**
4376
+ * The source code to display.
4377
+ */
4378
+ code: string;
4379
+ /**
4380
+ * The programming language for syntax highlighting.
4381
+ * Supports all languages available in Shiki (e.g., 'typescript', 'python', 'json', 'bash').
4382
+ * Use 'text' for plain text without highlighting.
4383
+ * @default 'text'
4384
+ */
4385
+ language?: string;
4386
+ /**
4387
+ * Optional filename to display in the header.
4388
+ * When provided, takes precedence over the language label.
4389
+ * @example 'app.config.ts'
4390
+ */
4391
+ filename?: string;
4392
+ /**
4393
+ * Whether to show line numbers alongside the code.
4394
+ * @default false
4395
+ */
4396
+ showLineNumbers?: boolean;
4397
+ /**
4398
+ * Whether to show the copy-to-clipboard button in the header.
4399
+ * @default true
4400
+ */
4401
+ showCopyButton?: boolean;
4402
+ /**
4403
+ * Maximum height of the code area before scrolling.
4404
+ * Accepts any valid CSS height value.
4405
+ * @example '300px'
4406
+ */
4407
+ maxHeight?: string;
4408
+ /**
4409
+ * Aria label for the copy button in its default state.
4410
+ * @default 'Copy code'
4411
+ */
4412
+ copyLabel?: string;
4413
+ /**
4414
+ * Aria label for the copy button after copying.
4415
+ * @default 'Copied'
4416
+ */
4417
+ copiedLabel?: string;
4418
+ }
4419
+
4356
4420
  export declare const UiDataTable: <TData, TValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal_2<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4357
4421
  props: __VLS_PrettifyLocal_2<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & UiDataTableProps<TData, TValue> & Partial<{}>> & PublicProps;
4358
4422
  expose(exposed: ShallowUnwrapRef< {
@@ -4463,6 +4527,11 @@ export declare type UiDataTableProps<TData, TValue> = {
4463
4527
  * @example "400px"
4464
4528
  */
4465
4529
  tableMinHeight?: string;
4530
+ /**
4531
+ * Callback when a data row is clicked. Receives the row's original data item.
4532
+ * @example (item) => router.push(`/details/${item.id}`)
4533
+ */
4534
+ onRowClick?: (item: TData) => void;
4466
4535
  };
4467
4536
 
4468
4537
  export declare const UiDataTableToolbar: <TData>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal_5<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{