sit-onyx 1.3.0 → 1.4.0-dev-20251104083804

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.
@@ -0,0 +1,33 @@
1
+ import { OnyxCodeTabProps } from './types.js';
2
+ /**
3
+ * @experimental
4
+ * @deprecated This component is still under active development and its API might change in patch releases.
5
+ */
6
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<OnyxCodeTabProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<OnyxCodeTabProps> & Readonly<{}>, {
7
+ skeleton: import('../../composables/useSkeletonState.js', { with: { "resolution-mode": "import" } }).SkeletonInjected;
8
+ disabled: boolean;
9
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, Readonly<{
10
+ /**
11
+ * Tab panel / content. By default, the `code` property will be used (without syntax highlighting).
12
+ */
13
+ default?(): unknown;
14
+ /**
15
+ * Optional slot to override the tab content. By default, the `label` and `icon` property will be displayed.
16
+ */
17
+ tab?(): unknown;
18
+ }> & {
19
+ /**
20
+ * Tab panel / content. By default, the `code` property will be used (without syntax highlighting).
21
+ */
22
+ default?(): unknown;
23
+ /**
24
+ * Optional slot to override the tab content. By default, the `label` and `icon` property will be displayed.
25
+ */
26
+ tab?(): unknown;
27
+ }>;
28
+ export default _default;
29
+ type __VLS_WithTemplateSlots<T, S> = T & {
30
+ new (): {
31
+ $slots: S;
32
+ };
33
+ };
@@ -0,0 +1,18 @@
1
+ import { OnyxTabProps } from '../OnyxTab/types.js';
2
+ export type OnyxCodeTabProps = Omit<OnyxTabProps, "density"> & {
3
+ /**
4
+ * Raw source code snippet. Will be used for the copy functionality and as default slot content (without syntax highlighting).
5
+ * For custom highlighting or content, use the `default` slot.
6
+ */
7
+ code: string;
8
+ /**
9
+ * Icon to display next to the label.
10
+ */
11
+ icon?: string;
12
+ /**
13
+ * Language of the code snippet.
14
+ *
15
+ * @example "ts", "vue", "html", "css"
16
+ */
17
+ language?: string;
18
+ };
@@ -0,0 +1,31 @@
1
+ import { OnyxCodeTabsProps } from './types.js';
2
+ /**
3
+ * @experimental
4
+ * @deprecated This component is still under active development and its API might change in patch releases.
5
+ */
6
+ declare const _default: <TValue extends PropertyKey = PropertyKey>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
7
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
8
+ readonly "onUpdate:modelValue"?: ((value: TValue) => any) | undefined;
9
+ readonly onCopyCode?: ((selectedTab: TValue) => any) | undefined;
10
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onCopyCode"> & OnyxCodeTabsProps<TValue> & Partial<{}>> & import('vue').PublicProps;
11
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
12
+ attrs: any;
13
+ slots: Readonly<{
14
+ /**
15
+ * Slots for tab components. Only `OnyxCodeTab` should be used here.
16
+ */
17
+ default(): unknown;
18
+ }> & {
19
+ /**
20
+ * Slots for tab components. Only `OnyxCodeTab` should be used here.
21
+ */
22
+ default(): unknown;
23
+ };
24
+ emit: ((evt: "update:modelValue", value: TValue) => void) & ((evt: "copyCode", selectedTab: TValue) => void);
25
+ }>) => import('vue').VNode & {
26
+ __ctx?: Awaited<typeof __VLS_setup>;
27
+ };
28
+ export default _default;
29
+ type __VLS_PrettifyLocal<T> = {
30
+ [K in keyof T]: T[K];
31
+ } & {};
@@ -0,0 +1,10 @@
1
+ import { InjectionKey, Ref } from 'vue';
2
+ import { OnyxTabsProps } from '../OnyxTabs/types.js';
3
+ export type OnyxCodeTabsProps<TValue extends PropertyKey = PropertyKey> = Omit<OnyxTabsProps<TValue>, "size" | "density" | "stretched" | "label"> & Partial<Pick<OnyxTabsProps<TValue>, "label">>;
4
+ export declare const CODE_TABS_INJECTION_KEY: InjectionKey<{
5
+ /**
6
+ * A map of tab values to their corresponding code snippets.
7
+ * key = tab value, value = code snippet.
8
+ */
9
+ tabs: Ref<Map<PropertyKey, string>>;
10
+ }>;
@@ -10,11 +10,19 @@ declare const _default: <TValue extends PropertyKey = PropertyKey>(__VLS_props:
10
10
  * Slots for tab components. Only `OnyxTab` should be used here.
11
11
  */
12
12
  default(): unknown;
13
+ /**
14
+ * Optional actions to display in the top right.
15
+ */
16
+ actions?(): unknown;
13
17
  }> & {
14
18
  /**
15
19
  * Slots for tab components. Only `OnyxTab` should be used here.
16
20
  */
17
21
  default(): unknown;
22
+ /**
23
+ * Optional actions to display in the top right.
24
+ */
25
+ actions?(): unknown;
18
26
  };
19
27
  emit: (evt: "update:modelValue", value: TValue) => void;
20
28
  }>) => import('vue').VNode & {
@@ -241,5 +241,11 @@
241
241
  "slider": {
242
242
  "decreaseValue": "Wert um {n} verringern",
243
243
  "increaseValue": "Wert um {n} erhöhen"
244
+ },
245
+ "codeTabs": {
246
+ "label": "Codeausschnitte",
247
+ "copySnippet": "Code kopieren",
248
+ "copied": "Kopiert!",
249
+ "tabLabel": "Code"
244
250
  }
245
251
  }
@@ -244,5 +244,11 @@
244
244
  "slider": {
245
245
  "decreaseValue": "Decrease value by {n}",
246
246
  "increaseValue": "Increase value by {n}"
247
+ },
248
+ "codeTabs": {
249
+ "label": "Code snippets",
250
+ "copySnippet": "Copy code",
251
+ "copied": "Copied!",
252
+ "tabLabel": "Code"
247
253
  }
248
254
  }
@@ -244,6 +244,12 @@ declare const _default: {
244
244
  "slider": {
245
245
  "decreaseValue": "Decrease value by {n}",
246
246
  "increaseValue": "Increase value by {n}"
247
+ },
248
+ "codeTabs": {
249
+ "label": "Code snippets",
250
+ "copySnippet": "Copy code",
251
+ "copied": "Copied!",
252
+ "tabLabel": "Code"
247
253
  }
248
254
  }
249
255
  ;
package/dist/index.d.ts CHANGED
@@ -28,6 +28,10 @@ export { default as OnyxCheckbox } from './components/OnyxCheckbox/OnyxCheckbox.
28
28
  export * from './components/OnyxCheckbox/types.js';
29
29
  export { default as OnyxCheckboxGroup } from './components/OnyxCheckboxGroup/OnyxCheckboxGroup.vue';
30
30
  export * from './components/OnyxCheckboxGroup/types.js';
31
+ export { default as OnyxUnstableCodeTab } from './components/OnyxCodeTab/OnyxCodeTab.vue';
32
+ export * from './components/OnyxCodeTab/types.js';
33
+ export { default as OnyxUnstableCodeTabs } from './components/OnyxCodeTabs/OnyxCodeTabs.vue';
34
+ export * from './components/OnyxCodeTabs/types.js';
31
35
  export { default as OnyxDataGridRenderer } from './components/OnyxDataGrid/OnyxDataGridRenderer/OnyxDataGridRenderer.vue';
32
36
  export * from './components/OnyxDataGrid/OnyxDataGridRenderer/types.js';
33
37
  export { default as OnyxDataGrid } from './components/OnyxDataGrid/OnyxDataGrid.vue';