@nubisco/ui 3.0.2 → 3.1.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.
Files changed (65) hide show
  1. package/dist/components/Accordion.context.d.ts +28 -0
  2. package/dist/components/Accordion.context.d.ts.map +1 -0
  3. package/dist/components/Accordion.d.ts +74 -0
  4. package/dist/components/Accordion.vue.d.ts +28 -0
  5. package/dist/components/Accordion.vue.d.ts.map +1 -0
  6. package/dist/components/AccordionItem.vue.d.ts +25 -0
  7. package/dist/components/AccordionItem.vue.d.ts.map +1 -0
  8. package/dist/components/AiLabel.vue.d.ts +1 -1
  9. package/dist/components/Badge.vue.d.ts +1 -1
  10. package/dist/components/Banner.vue.d.ts +1 -1
  11. package/dist/components/BlueprintBackground.vue.d.ts +1 -1
  12. package/dist/components/BlueprintCard.vue.d.ts +2 -2
  13. package/dist/components/Breadcrumbs.vue.d.ts.map +1 -1
  14. package/dist/components/Button.vue.d.ts +2 -2
  15. package/dist/components/Card.vue.d.ts +36 -0
  16. package/dist/components/Card.vue.d.ts.map +1 -0
  17. package/dist/components/CardGrid.d.ts +55 -0
  18. package/dist/components/CardGrid.vue.d.ts +19 -0
  19. package/dist/components/CardGrid.vue.d.ts.map +1 -0
  20. package/dist/components/Charts/InterpolationChart.vue.d.ts +1 -1
  21. package/dist/components/Checkbox.vue.d.ts +2 -2
  22. package/dist/components/CheckboxGroup.vue.d.ts +1 -1
  23. package/dist/components/ColorStrip.vue.d.ts +2 -2
  24. package/dist/components/DatePicker.vue.d.ts +7 -7
  25. package/dist/components/DefinitionList.d.ts +52 -0
  26. package/dist/components/DefinitionList.vue.d.ts +21 -0
  27. package/dist/components/DefinitionList.vue.d.ts.map +1 -0
  28. package/dist/components/DefinitionListItem.vue.d.ts +19 -0
  29. package/dist/components/DefinitionListItem.vue.d.ts.map +1 -0
  30. package/dist/components/EmptyState.d.ts +44 -0
  31. package/dist/components/EmptyState.vue.d.ts +28 -0
  32. package/dist/components/EmptyState.vue.d.ts.map +1 -0
  33. package/dist/components/FileUploader.vue.d.ts +1 -1
  34. package/dist/components/Grid.vue.d.ts +5 -5
  35. package/dist/components/InfoHint.vue.d.ts +1 -1
  36. package/dist/components/JsonTree.vue.d.ts +1 -1
  37. package/dist/components/Label.vue.d.ts +1 -1
  38. package/dist/components/MenuItem.vue.d.ts +1 -1
  39. package/dist/components/NumberInput.vue.d.ts +6 -6
  40. package/dist/components/NumberInput.vue.d.ts.map +1 -1
  41. package/dist/components/Radio.vue.d.ts +1 -1
  42. package/dist/components/ReorderList.d.ts +41 -0
  43. package/dist/components/ReorderList.vue.d.ts +41 -0
  44. package/dist/components/ReorderList.vue.d.ts.map +1 -0
  45. package/dist/components/Select.vue.d.ts +7 -7
  46. package/dist/components/SidebarLink.vue.d.ts +1 -1
  47. package/dist/components/SidebarMenuItem.vue.d.ts +1 -1
  48. package/dist/components/Slider.vue.d.ts +4 -4
  49. package/dist/components/Submenu.vue.d.ts +1 -1
  50. package/dist/components/Switch.vue.d.ts +3 -3
  51. package/dist/components/Tabs.vue.d.ts +5 -5
  52. package/dist/components/TextInput.vue.d.ts +4 -4
  53. package/dist/components/TextInput.vue.d.ts.map +1 -1
  54. package/dist/components/Toast.vue.d.ts +1 -1
  55. package/dist/components/Toast.vue.d.ts.map +1 -1
  56. package/dist/components/Tree.vue.d.ts +5 -5
  57. package/dist/components/TreeNode.vue.d.ts +3 -3
  58. package/dist/components/index.d.ts.map +1 -1
  59. package/dist/global.d.ts +16 -0
  60. package/dist/index.cjs +8 -8
  61. package/dist/index.mjs +3719 -3239
  62. package/dist/main.d.ts +13 -0
  63. package/dist/main.d.ts.map +1 -1
  64. package/dist/ui.css +1 -1
  65. package/package.json +1 -1
@@ -0,0 +1,28 @@
1
+ import type { InjectionKey, Ref } from 'vue';
2
+ import type { TAccordionAlign, TAccordionSize } from './Accordion.d';
3
+ /**
4
+ * What an `NbAccordionItem` needs from the `NbAccordion` around it.
5
+ *
6
+ * Lives in a `.ts` rather than the `.d.ts` beside it because `Symbol()` is a
7
+ * runtime value, matching how the blueprint does it.
8
+ */
9
+ export interface IAccordionContext {
10
+ /** Ids currently open. */
11
+ open: Ref<string[]>;
12
+ /** Whether more than one item may be open. */
13
+ multiple: Ref<boolean>;
14
+ align: Ref<TAccordionAlign>;
15
+ size: Ref<TAccordionSize>;
16
+ flush: Ref<boolean>;
17
+ headingLevel: Ref<number>;
18
+ /** Toggle one item, honouring `multiple`. */
19
+ toggle: (id: string) => void;
20
+ /** Register an item so the group can drive roving keyboard focus over the
21
+ * headers in DOM order. Returns an unregister function. */
22
+ register: (id: string, el: () => HTMLElement | null) => () => void;
23
+ /** Move focus to the header before or after `id`, wrapping. `to` may also be
24
+ * an end of the list. */
25
+ focusSibling: (id: string, to: 'prev' | 'next' | 'first' | 'last') => void;
26
+ }
27
+ export declare const NB_ACCORDION_CONTEXT: InjectionKey<IAccordionContext>;
28
+ //# sourceMappingURL=Accordion.context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Accordion.context.d.ts","sourceRoot":"","sources":["../../src/components/Accordion.context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC5C,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAEpE;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,0BAA0B;IAC1B,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAA;IACnB,8CAA8C;IAC9C,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACtB,KAAK,EAAE,GAAG,CAAC,eAAe,CAAC,CAAA;IAC3B,IAAI,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;IACzB,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACnB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACzB,6CAA6C;IAC7C,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5B;gEAC4D;IAC5D,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,WAAW,GAAG,IAAI,KAAK,MAAM,IAAI,CAAA;IAClE;8BAC0B;IAC1B,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,KAAK,IAAI,CAAA;CAC3E;AAED,eAAO,MAAM,oBAAoB,EAAE,YAAY,CAAC,iBAAiB,CAEhE,CAAA"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * How the accordion's chevron is placed relative to its title.
3
+ *
4
+ * - `'end'` (default): chevron on the trailing edge, so every title starts
5
+ * on the same line as the type around it. This is what a reader scans.
6
+ * - `'start'`: chevron ahead of the title, which makes the accordion read as
7
+ * a tree rather than as a list of sections. Reach for it only when the
8
+ * content really is hierarchical; for prose and documentation it makes the
9
+ * titles ragged against everything else on the page.
10
+ */
11
+ export type TAccordionAlign = 'start' | 'end'
12
+
13
+ /** Row height. `md` is the default; `sm` is for dense panels, `lg` for pages
14
+ * whose content is mostly the accordion. */
15
+ export type TAccordionSize = 'sm' | 'md' | 'lg'
16
+
17
+ export interface IAccordionProps {
18
+ /**
19
+ * Ids of the open items. Use `v-model` for two-way binding.
20
+ *
21
+ * Always an array, including when `multiple` is false, so a consumer's
22
+ * binding does not change shape when they change their mind about how many
23
+ * sections may be open. With `multiple` false the array holds zero or one id.
24
+ */
25
+ modelValue?: string[]
26
+ /**
27
+ * Allow more than one item open at a time. Default false, which is the safer
28
+ * starting point: it keeps the page short, which is the reason to reach for
29
+ * an accordion in the first place.
30
+ */
31
+ multiple?: boolean
32
+ /**
33
+ * Drop the outer border and the side padding, so titles and chevrons sit
34
+ * flush with the rules that divide them. For accordions inside a panel or a
35
+ * sidebar, where the extra inset would misalign them against the content
36
+ * above and put two rule lines close together.
37
+ */
38
+ flush?: boolean
39
+ /** Chevron placement. See `TAccordionAlign`. */
40
+ align?: TAccordionAlign
41
+ /** Row height. */
42
+ size?: TAccordionSize
43
+ /**
44
+ * Outline level the headers announce, 2 to 6. Default 3.
45
+ *
46
+ * The headers are `role="heading"` with `aria-level` rather than `<h3>`
47
+ * elements. Two reasons, and the second is why it is not simply an `<h3>`:
48
+ *
49
+ * - The right level depends on where the accordion sits in the page, and
50
+ * only the page knows that.
51
+ * - A bare `<h3>` inherits any `some-container h3 { margin }` rule the host
52
+ * has, and an element selector inside a class beats a component's own
53
+ * scoped class rule. That is not a fight a component can win, so it does
54
+ * not enter it.
55
+ */
56
+ headingLevel?: 2 | 3 | 4 | 5 | 6
57
+ }
58
+
59
+ export interface IAccordionItemProps {
60
+ /**
61
+ * Stable identifier, used in `modelValue`. Generated when omitted, but an
62
+ * accordion whose open state is persisted or driven from outside needs ids
63
+ * that survive a re-render, so pass one.
64
+ */
65
+ id?: string
66
+ /** The header text. A plain string; use the `title` slot for anything else. */
67
+ title?: string
68
+ /** Optional icon name, rendered before the title. */
69
+ icon?: string
70
+ /** Short text after the title, for a count or a status. */
71
+ meta?: string
72
+ /** Non-interactive: the header renders muted and cannot be toggled. */
73
+ disabled?: boolean
74
+ }
@@ -0,0 +1,28 @@
1
+ import type { IAccordionProps } from './Accordion.d';
2
+ declare var __VLS_1: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_1) => any;
5
+ };
6
+ declare const __VLS_base: import("vue").DefineComponent<IAccordionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ "update:modelValue": (ids: string[]) => any;
8
+ toggle: (id: string, open: boolean) => any;
9
+ }, string, import("vue").PublicProps, Readonly<IAccordionProps> & Readonly<{
10
+ "onUpdate:modelValue"?: ((ids: string[]) => any) | undefined;
11
+ onToggle?: ((id: string, open: boolean) => any) | undefined;
12
+ }>, {
13
+ modelValue: string[];
14
+ multiple: boolean;
15
+ flush: boolean;
16
+ align: import("./Accordion.d").TAccordionAlign;
17
+ size: import("./Accordion.d").TAccordionSize;
18
+ headingLevel: 2 | 3 | 4 | 5 | 6;
19
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
23
+ type __VLS_WithSlots<T, S> = T & {
24
+ new (): {
25
+ $slots: S;
26
+ };
27
+ };
28
+ //# sourceMappingURL=Accordion.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Accordion.vue.d.ts","sourceRoot":"","sources":["../../src/components/Accordion.vue"],"names":[],"mappings":"AAoJA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAmIpD,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU;;;;;;;;;;;;;6EAId,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { IAccordionItemProps } from './Accordion.d';
2
+ declare var __VLS_11: {}, __VLS_13: {}, __VLS_15: {};
3
+ type __VLS_Slots = {} & {
4
+ title?: (props: typeof __VLS_11) => any;
5
+ } & {
6
+ meta?: (props: typeof __VLS_13) => any;
7
+ } & {
8
+ default?: (props: typeof __VLS_15) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<IAccordionItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IAccordionItemProps> & Readonly<{}>, {
11
+ disabled: boolean;
12
+ meta: string;
13
+ title: string;
14
+ icon: string;
15
+ id: string;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
25
+ //# sourceMappingURL=AccordionItem.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccordionItem.vue.d.ts","sourceRoot":"","sources":["../../src/components/AccordionItem.vue"],"names":[],"mappings":"AAmPA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AA2LxD,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AACpE,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC1C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAOhD,QAAA,MAAM,UAAU;;;;;;6EAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { EAiLabelVariant, EAiLabelSize, IAiLabelProps } from './AiLabel.d';
2
2
  declare const __VLS_export: import("vue").DefineComponent<IAiLabelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IAiLabelProps> & Readonly<{}>, {
3
- variant: `${EAiLabelVariant}`;
4
3
  size: `${EAiLabelSize}`;
4
+ variant: `${EAiLabelVariant}`;
5
5
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
6
  declare const _default: typeof __VLS_export;
7
7
  export default _default;
@@ -4,8 +4,8 @@ type __VLS_Slots = {} & {
4
4
  default?: (props: typeof __VLS_1) => any;
5
5
  };
6
6
  declare const __VLS_base: import("vue").DefineComponent<IBadgeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IBadgeProps> & Readonly<{}>, {
7
- variant: `${EBadgeVariant}`;
8
7
  size: `${EBadgeSize}`;
8
+ variant: `${EBadgeVariant}`;
9
9
  dot: boolean;
10
10
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
11
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -13,11 +13,11 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
13
13
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
14
  onDismiss?: (() => any) | undefined;
15
15
  }>, {
16
+ flush: boolean;
16
17
  variant: `${EBannerVariant}`;
17
18
  status: `${EBannerStatus}`;
18
19
  dismissible: boolean;
19
20
  hideIcon: boolean;
20
- flush: boolean;
21
21
  closeLabel: string;
22
22
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
23
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,8 +1,8 @@
1
1
  import type { IBlueprintBackgroundProps } from './BlueprintBackground.d';
2
2
  declare const __VLS_export: import("vue").DefineComponent<IBlueprintBackgroundProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IBlueprintBackgroundProps> & Readonly<{}>, {
3
+ color: string;
3
4
  variant: import("./BlueprintBackground.d").TBlueprintBackgroundVariant;
4
5
  gap: number;
5
- color: string;
6
6
  thickness: number;
7
7
  secondaryColor: string;
8
8
  secondaryGap: number;
@@ -5,15 +5,15 @@ type __VLS_Slots = {} & {
5
5
  default?: (props: typeof __VLS_1) => any;
6
6
  };
7
7
  declare const __VLS_base: import("vue").DefineComponent<IBlueprintCardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
- select: (id: string) => any;
9
8
  toggle: (id: string, enabled: boolean) => any;
9
+ select: (id: string) => any;
10
10
  remove: (id: string) => any;
11
11
  "toggle-collapse": (id: string) => any;
12
12
  "port-mousedown": (data: IBlueprintCardPortEvent) => any;
13
13
  "port-mouseup": (data: IBlueprintCardPortEvent) => any;
14
14
  }, string, import("vue").PublicProps, Readonly<IBlueprintCardProps> & Readonly<{
15
- onSelect?: ((id: string) => any) | undefined;
16
15
  onToggle?: ((id: string, enabled: boolean) => any) | undefined;
16
+ onSelect?: ((id: string) => any) | undefined;
17
17
  onRemove?: ((id: string) => any) | undefined;
18
18
  "onToggle-collapse"?: ((id: string) => any) | undefined;
19
19
  "onPort-mousedown"?: ((data: IBlueprintCardPortEvent) => any) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.vue.d.ts","sourceRoot":"","sources":["../../src/components/Breadcrumbs.vue"],"names":[],"mappings":"AAkFA,KAAK,WAAW,GAAG;IACjB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;AAmFF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Breadcrumbs.vue.d.ts","sourceRoot":"","sources":["../../src/components/Breadcrumbs.vue"],"names":[],"mappings":"AAsGA,KAAK,WAAW,GAAG;IACjB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAC;AAuGF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU,kSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -8,12 +8,12 @@ declare const __VLS_base: import("vue").DefineComponent<IButtonProps, {}, {}, {}
8
8
  }, string, import("vue").PublicProps, Readonly<IButtonProps> & Readonly<{
9
9
  onClick?: ((event: MouseEvent) => any) | undefined;
10
10
  }>, {
11
- variant: string;
12
11
  size: import("./Button.d").TButtonSize;
12
+ disabled: boolean;
13
13
  type: `${EButtonType}`;
14
14
  icon: string;
15
+ variant: string;
15
16
  to: string | Record<string, unknown>;
16
- disabled: boolean;
17
17
  outlined: boolean;
18
18
  loading: boolean;
19
19
  href: string;
@@ -0,0 +1,36 @@
1
+ import type { ICardProps } from './CardGrid.d';
2
+ declare var __VLS_11: {}, __VLS_18: {}, __VLS_20: {}, __VLS_22: {}, __VLS_24: {};
3
+ type __VLS_Slots = {} & {
4
+ icon?: (props: typeof __VLS_11) => any;
5
+ } & {
6
+ title?: (props: typeof __VLS_18) => any;
7
+ } & {
8
+ subtitle?: (props: typeof __VLS_20) => any;
9
+ } & {
10
+ default?: (props: typeof __VLS_22) => any;
11
+ } & {
12
+ footer?: (props: typeof __VLS_24) => any;
13
+ };
14
+ declare const __VLS_base: import("vue").DefineComponent<ICardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
+ select: () => any;
16
+ }, string, import("vue").PublicProps, Readonly<ICardProps> & Readonly<{
17
+ onSelect?: (() => any) | undefined;
18
+ }>, {
19
+ disabled: boolean;
20
+ title: string;
21
+ icon: string;
22
+ clickable: boolean;
23
+ subtitle: string;
24
+ selected: boolean;
25
+ href: string;
26
+ target: string;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
36
+ //# sourceMappingURL=Card.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.vue.d.ts","sourceRoot":"","sources":["../../src/components/Card.vue"],"names":[],"mappings":"AAqMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAyM9C,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC9G,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC1C;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC9C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU;;;;;;;;;;;;;6EAId,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,55 @@
1
+ import type { TGapSize } from './Grid.d'
2
+
3
+ export interface ICardGridProps {
4
+ /**
5
+ * Narrowest a column may get before the grid drops one, as a CSS length.
6
+ *
7
+ * This is the prop `NbGrid` cannot express. `NbGrid`'s `grid` is a span on
8
+ * the element within a 16-column page grid: it answers "how much of the page
9
+ * does this take". A card grid asks the opposite question, "how many of these
10
+ * fit", and the answer has to come from the card's own comfortable width, not
11
+ * from the page. That is why this is a separate component rather than another
12
+ * prop on `NbGrid`.
13
+ */
14
+ min?: string
15
+ /** Space between cards. Same scale as `NbGrid`'s `gap`. */
16
+ gap?: TGapSize
17
+ /**
18
+ * `'auto-fill'` (default) keeps empty columns, so a grid of two cards in a
19
+ * wide container leaves them card-width and the rest of the row empty.
20
+ * `'auto-fit'` collapses the empty columns, so those two cards stretch to
21
+ * fill the row.
22
+ *
23
+ * Prefer the default. A catalogue of things reads as a catalogue when the
24
+ * card size is constant and the row is allowed to be short; stretching two
25
+ * cards across a desktop makes them look like panels instead.
26
+ */
27
+ fill?: 'auto-fill' | 'auto-fit'
28
+ }
29
+
30
+ export interface ICardProps {
31
+ /** Card title. Use the `title` slot for anything richer than a string. */
32
+ title?: string
33
+ /** One line under the title: a type, an owner, a version. */
34
+ subtitle?: string
35
+ /** Icon name, rendered in the card's header. */
36
+ icon?: string
37
+ /**
38
+ * Renders the whole card as a link. The card becomes an `<a>`, so it gets a
39
+ * browser's link affordances for free: middle click, open in new tab, and a
40
+ * URL in the status bar.
41
+ */
42
+ href?: string
43
+ /** Link target, only meaningful alongside `href`. */
44
+ target?: string
45
+ /**
46
+ * Makes the card activate on click and emit `select`, for a card that opens
47
+ * something in place rather than navigating. Ignored when `href` is set,
48
+ * because a link already does this and does it better.
49
+ */
50
+ clickable?: boolean
51
+ /** Draws the card as chosen, for a card that is part of a selection. */
52
+ selected?: boolean
53
+ /** Non-interactive and muted. */
54
+ disabled?: boolean
55
+ }
@@ -0,0 +1,19 @@
1
+ import type { ICardGridProps } from './CardGrid.d';
2
+ declare var __VLS_1: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_1) => any;
5
+ };
6
+ declare const __VLS_base: import("vue").DefineComponent<ICardGridProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ICardGridProps> & Readonly<{}>, {
7
+ fill: "auto-fill" | "auto-fit";
8
+ gap: import("./Grid").TGapSize;
9
+ min: string;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
19
+ //# sourceMappingURL=CardGrid.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardGrid.vue.d.ts","sourceRoot":"","sources":["../../src/components/CardGrid.vue"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAqDlD,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU;;;;6EAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -4,6 +4,7 @@ declare const __VLS_export: import("vue").DefineComponent<IInterpolationChartPro
4
4
  }, string, import("vue").PublicProps, Readonly<IInterpolationChartProps> & Readonly<{
5
5
  "onUpdate:modelValue"?: ((value: IInterpolationPoint[]) => any) | undefined;
6
6
  }>, {
7
+ modelValue: IInterpolationPoint[];
7
8
  title: string;
8
9
  height: number | string;
9
10
  subtitle: string;
@@ -12,7 +13,6 @@ declare const __VLS_export: import("vue").DefineComponent<IInterpolationChartPro
12
13
  showGrid: boolean;
13
14
  colors: string[];
14
15
  editable: boolean;
15
- modelValue: IInterpolationPoint[];
16
16
  inputLabel: string;
17
17
  outputLabel: string;
18
18
  inputMin: number;
@@ -8,9 +8,9 @@ declare const __VLS_base: import("vue").DefineComponent<ICheckboxProps, {}, {},
8
8
  }, string, import("vue").PublicProps, Readonly<ICheckboxProps> & Readonly<{
9
9
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
10
10
  }>, {
11
- id: string;
12
- disabled: boolean;
13
11
  modelValue: boolean;
12
+ disabled: boolean;
13
+ id: string;
14
14
  indeterminate: boolean;
15
15
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
16
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -4,11 +4,11 @@ type __VLS_Slots = {} & {
4
4
  default?: (props: typeof __VLS_7) => any;
5
5
  };
6
6
  declare const __VLS_base: import("vue").DefineComponent<ICheckboxGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ICheckboxGroupProps> & Readonly<{}>, {
7
+ disabled: boolean;
7
8
  id: string;
8
9
  warning: string;
9
10
  error: string;
10
11
  direction: `${ECheckboxGroupDirection}`;
11
- disabled: boolean;
12
12
  helper: string;
13
13
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
14
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -15,10 +15,10 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
15
15
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
16
16
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
17
17
  }>, {
18
+ label: string;
19
+ id: string;
18
20
  variant: "default" | "fluid";
19
21
  wrap: boolean;
20
- id: string;
21
- label: string;
22
22
  options: string[] | IOption[];
23
23
  onlyView: boolean;
24
24
  allowMultiple: boolean;
@@ -12,29 +12,29 @@ declare const __VLS_base: import("vue").DefineComponent<IDatePickerProps, {
12
12
  close: typeof closeCalendar;
13
13
  focus: () => void | undefined;
14
14
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
- change: (value: string | null) => any;
16
15
  "update:modelValue": (value: string | null) => any;
16
+ change: (value: string | null) => any;
17
17
  "update:endValue": (value: string | null) => any;
18
18
  }, string, import("vue").PublicProps, Readonly<IDatePickerProps> & Readonly<{
19
- onChange?: ((value: string | null) => any) | undefined;
20
19
  "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
20
+ onChange?: ((value: string | null) => any) | undefined;
21
21
  "onUpdate:endValue"?: ((value: string | null) => any) | undefined;
22
22
  }>, {
23
- variant: "default" | "fluid";
23
+ modelValue: string | null;
24
24
  size: "xs" | "sm" | "md" | "lg";
25
- id: string;
26
- type: "simple" | "single" | "range";
25
+ disabled: boolean;
27
26
  label: string;
27
+ type: "simple" | "single" | "range";
28
28
  name: string;
29
+ id: string;
29
30
  required: boolean;
31
+ variant: "default" | "fluid";
30
32
  warning: string;
31
33
  error: string;
32
34
  min: string;
33
35
  max: string;
34
- disabled: boolean;
35
36
  weekStart: 0 | 1;
36
37
  locale: string;
37
- modelValue: string | null;
38
38
  helper: string;
39
39
  placeholder: string;
40
40
  endValue: string | null;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * How a term and its value are arranged.
3
+ *
4
+ * - `'columns'` (default): label on the left, value on the right, on one
5
+ * line. Reads as a facts table, which is what an inspector wants.
6
+ * - `'stacked'`: label above value. For long values, or a container too
7
+ * narrow to give the label a column without squeezing the value.
8
+ * - `'auto'`: columns above `--nb-definition-list-breakpoint` (360px of
9
+ * container width), stacked below. Uses a container query, so it responds
10
+ * to the panel it is in rather than the size of the window, which is the
11
+ * distinction that matters for an inspector.
12
+ */
13
+ export type TDefinitionListLayout = 'columns' | 'stacked' | 'auto'
14
+
15
+ /** A single fact, when the list is driven by the `items` prop. */
16
+ export interface IDefinitionListItem {
17
+ /** The label. */
18
+ term: string
19
+ /** The value. Rendered as text; use the slot form for anything richer. */
20
+ value?: string | number | null
21
+ /**
22
+ * Shown in place of an empty value. Defaults to an em-space-width dash, so a
23
+ * fact that has no value still occupies its row and the list does not appear
24
+ * to have fewer facts than it has.
25
+ */
26
+ empty?: string
27
+ }
28
+
29
+ export interface IDefinitionListProps {
30
+ /**
31
+ * The facts. Omit and use the default slot with `NbDefinitionListItem` when
32
+ * values need markup, a link, or a badge.
33
+ */
34
+ items?: IDefinitionListItem[]
35
+ /** See `TDefinitionListLayout`. */
36
+ layout?: TDefinitionListLayout
37
+ /**
38
+ * Width of the label column in the `columns` layout, as a CSS length. The
39
+ * default is a fraction so long labels wrap rather than starving the value.
40
+ */
41
+ termWidth?: string
42
+ /** Draw a hairline between rows. Off by default: spacing separates them
43
+ * well enough, and in an inspector the rules add up quickly. */
44
+ dividers?: boolean
45
+ /** Tighter rows, for a dense inspector. */
46
+ compact?: boolean
47
+ }
48
+
49
+ export interface IDefinitionListItemProps {
50
+ /** The label. Use the `term` slot for anything richer than a string. */
51
+ term?: string
52
+ }
@@ -0,0 +1,21 @@
1
+ import type { IDefinitionListProps } from './DefinitionList.d';
2
+ declare var __VLS_1: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_1) => any;
5
+ };
6
+ declare const __VLS_base: import("vue").DefineComponent<IDefinitionListProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IDefinitionListProps> & Readonly<{}>, {
7
+ items: import("./DefinitionList.d").IDefinitionListItem[];
8
+ compact: boolean;
9
+ layout: import("./DefinitionList.d").TDefinitionListLayout;
10
+ termWidth: string;
11
+ dividers: boolean;
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
21
+ //# sourceMappingURL=DefinitionList.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefinitionList.vue.d.ts","sourceRoot":"","sources":["../../src/components/DefinitionList.vue"],"names":[],"mappings":"AA0IA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AA+G9D,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU;;;;;;6EAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { IDefinitionListItemProps } from './DefinitionList.d';
2
+ declare var __VLS_1: {}, __VLS_3: {};
3
+ type __VLS_Slots = {} & {
4
+ term?: (props: typeof __VLS_1) => any;
5
+ } & {
6
+ default?: (props: typeof __VLS_3) => any;
7
+ };
8
+ declare const __VLS_base: import("vue").DefineComponent<IDefinitionListItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IDefinitionListItemProps> & Readonly<{}>, {
9
+ term: string;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
19
+ //# sourceMappingURL=DefinitionListItem.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefinitionListItem.vue.d.ts","sourceRoot":"","sources":["../../src/components/DefinitionListItem.vue"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAqClE,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC3C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GACzC;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU;;6EAGd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Why the space is empty. This is not decoration: the four cases want
3
+ * different copy and different actions, and naming the case is what stops a
4
+ * product writing "No results" over a failed request.
5
+ *
6
+ * - `'empty'` (default): there is nothing here yet, and the user can create
7
+ * the first one. The action is to create.
8
+ * - `'no-results'`: there IS data, but this filter or search matched none of
9
+ * it. The action is to widen the search, never to create.
10
+ * - `'error'`: the request failed. The action is to retry. Do not offer to
11
+ * create something in a view that could not load.
12
+ * - `'forbidden'`: the data exists and this user may not see it. There is
13
+ * usually no action, and inventing one is worse than admitting it.
14
+ */
15
+ export type TEmptyStateKind = 'empty' | 'no-results' | 'error' | 'forbidden'
16
+
17
+ /** How much room the empty state takes. */
18
+ export type TEmptyStateSize = 'sm' | 'md'
19
+
20
+ export interface IEmptyStateProps {
21
+ /**
22
+ * Short, and a positive statement where the situation allows one. Carbon's
23
+ * example is the rule of thumb: "Start by adding data assets" reads better
24
+ * than "You don't have any data assets".
25
+ */
26
+ title?: string
27
+ /**
28
+ * What to do next, and if it helps, why the space is empty. One or two
29
+ * sentences. Longer than that and it stops being read.
30
+ */
31
+ description?: string
32
+ /** Icon name. Defaults to one that suits `kind`; pass `null` for none. */
33
+ icon?: string | null
34
+ /** See `TEmptyStateKind`. */
35
+ kind?: `${TEmptyStateKind}`
36
+ /** `'md'` (default) for a whole view, `'sm'` inside a panel or a card. */
37
+ size?: `${TEmptyStateSize}`
38
+ /**
39
+ * Draw a dashed outline around the space. For an empty region that would
40
+ * otherwise have no edges, like a drop zone or an empty column, where the
41
+ * text alone leaves the reader unsure how big the empty thing is.
42
+ */
43
+ bordered?: boolean
44
+ }