@nubisco/ui 1.59.0 → 1.60.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.
- package/README.md +7 -0
- package/dist/components/Shell.vue.d.ts.map +1 -1
- package/dist/components/SidebarMenuItem.vue.d.ts.map +1 -1
- package/dist/components/Tabs.d.ts +58 -0
- package/dist/components/Tabs.vue.d.ts +31 -0
- package/dist/components/Tabs.vue.d.ts.map +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/global.d.ts +2 -0
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +10310 -10163
- package/dist/index.mjs.map +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/ui.css +1 -1
- package/dist/utils/slotContent.helper.d.ts +17 -0
- package/dist/utils/slotContent.helper.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/utils/slotContent.helper.ts +36 -0
package/README.md
CHANGED
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
- [Layout](#layout)
|
|
43
43
|
- [Form Controls](#form-controls)
|
|
44
44
|
- [Data Display](#data-display)
|
|
45
|
+
- [Navigation](#navigation)
|
|
45
46
|
- [Grid System](#grid-system)
|
|
46
47
|
- [TypeScript Support](#typescript-support)
|
|
47
48
|
- [Documentation](#documentation)
|
|
@@ -203,6 +204,12 @@ Most component libraries impose styling opinions that are hard to override. Nubi
|
|
|
203
204
|
| `NbIcon` | SVG icon component with virtual module loader |
|
|
204
205
|
| `NbJsonTree` | Collapsible JSON tree viewer |
|
|
205
206
|
|
|
207
|
+
### Navigation
|
|
208
|
+
|
|
209
|
+
| Component | Description |
|
|
210
|
+
| :-------- | :-------------------------------------------------------- |
|
|
211
|
+
| `NbTabs` | Tab bar with optional panels, line and contained variants |
|
|
212
|
+
|
|
206
213
|
---
|
|
207
214
|
|
|
208
215
|
## Grid System
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Shell.vue.d.ts","sourceRoot":"","sources":["../../src/components/Shell.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Shell.vue.d.ts","sourceRoot":"","sources":["../../src/components/Shell.vue"],"names":[],"mappings":"AAijBA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAiUvC,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC5Q,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GACjD;IAAE,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GACnD;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAClD;IAAE,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GACrD;IAAE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GACjD;IAAE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAClD;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACnD;IAAE,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GACpD;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,GAC5C;IAAE,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAOlD,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarMenuItem.vue.d.ts","sourceRoot":"","sources":["../../src/components/SidebarMenuItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SidebarMenuItem.vue.d.ts","sourceRoot":"","sources":["../../src/components/SidebarMenuItem.vue"],"names":[],"mappings":"AA2bA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAuX3D,QAAA,IAAuB,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAClE,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAOhD,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,58 @@
|
|
|
1
|
+
import { IDefaultProps } from '../types/Props.d'
|
|
2
|
+
|
|
3
|
+
// #region ETabsVariant
|
|
4
|
+
enum ETabsVariant {
|
|
5
|
+
/** Underlined text tabs sitting on a rule. The default for page sections. */
|
|
6
|
+
Line = 'line',
|
|
7
|
+
/** Boxed segmented control with a filled active block. For mode switches. */
|
|
8
|
+
Contained = 'contained',
|
|
9
|
+
}
|
|
10
|
+
// #endregion ETabsVariant
|
|
11
|
+
|
|
12
|
+
// #region ETabsSize
|
|
13
|
+
enum ETabsSize {
|
|
14
|
+
Small = 'sm',
|
|
15
|
+
Medium = 'md',
|
|
16
|
+
Large = 'lg',
|
|
17
|
+
}
|
|
18
|
+
// #endregion ETabsSize
|
|
19
|
+
|
|
20
|
+
// #region ITabItem
|
|
21
|
+
/** A single tab in the bar. */
|
|
22
|
+
interface ITabItem {
|
|
23
|
+
/** Stable identifier, used as the `v-model` value and as the slot name. */
|
|
24
|
+
id: string
|
|
25
|
+
/** Visible tab text. */
|
|
26
|
+
label: string
|
|
27
|
+
/** Optional icon name rendered before the label. */
|
|
28
|
+
icon?: string
|
|
29
|
+
/** Optional count or short status rendered after the label. */
|
|
30
|
+
badge?: string | number
|
|
31
|
+
/** Prevents selection and dims the tab. */
|
|
32
|
+
disabled?: boolean
|
|
33
|
+
}
|
|
34
|
+
// #endregion ITabItem
|
|
35
|
+
|
|
36
|
+
// #region ITabsProps
|
|
37
|
+
interface ITabsProps extends IDefaultProps {
|
|
38
|
+
/** Tabs to render, in display order. */
|
|
39
|
+
items: ITabItem[]
|
|
40
|
+
/**
|
|
41
|
+
* Accessible name for the tab bar, exposed as `aria-label` on the tablist.
|
|
42
|
+
* Nothing is rendered: name the section the tabs belong to, e.g. `Project`.
|
|
43
|
+
*/
|
|
44
|
+
ariaLabel?: string
|
|
45
|
+
/** Id of the selected tab. Falls back to the first enabled tab. */
|
|
46
|
+
modelValue?: string
|
|
47
|
+
/** Visual treatment: `line` for page sections, `contained` for mode switches. */
|
|
48
|
+
variant?: `${ETabsVariant}`
|
|
49
|
+
/** Control size. */
|
|
50
|
+
size?: `${ETabsSize}`
|
|
51
|
+
/** Disables every tab in the bar. */
|
|
52
|
+
disabled?: boolean
|
|
53
|
+
/** Stretches tabs to fill the available width, sharing it equally. */
|
|
54
|
+
fullWidth?: boolean
|
|
55
|
+
}
|
|
56
|
+
// #endregion ITabsProps
|
|
57
|
+
|
|
58
|
+
export { ETabsVariant, ETabsSize, ITabItem, ITabsProps }
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ETabsSize, ETabsVariant, ITabItem, ITabsProps } from './Tabs.d';
|
|
2
|
+
declare var __VLS_13: string, __VLS_14: {
|
|
3
|
+
item: ITabItem;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
[K in NonNullable<typeof __VLS_13>]?: (props: typeof __VLS_14) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<ITabsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
change: (id: string, item: ITabItem) => any;
|
|
10
|
+
"update:modelValue": (id: string) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<ITabsProps> & Readonly<{
|
|
12
|
+
onChange?: ((id: string, item: ITabItem) => any) | undefined;
|
|
13
|
+
"onUpdate:modelValue"?: ((id: string) => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
variant: `${ETabsVariant}`;
|
|
16
|
+
size: `${ETabsSize}`;
|
|
17
|
+
id: string;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
modelValue: string;
|
|
20
|
+
ariaLabel: string;
|
|
21
|
+
fullWidth: boolean;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=Tabs.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.vue.d.ts","sourceRoot":"","sources":["../../src/components/Tabs.vue"],"names":[],"mappings":"AAoUA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAyQxE,QAAA,IAAI,QAAQ,QAAW,EAAE,QAAQ;;CAAY,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;KAAG,CAAC,IAAI,WAAW,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG;CAAE,CAAC;AAO5E,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;;iBAkIf,GAAG;;AADlB,wBAMC"}
|
package/dist/global.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ import Slider from './components/Slider.vue'
|
|
|
59
59
|
import Sparkline from './components/Charts/Sparkline.vue'
|
|
60
60
|
import Submenu from './components/Submenu.vue'
|
|
61
61
|
import Switch from './components/Switch.vue'
|
|
62
|
+
import Tabs from './components/Tabs.vue'
|
|
62
63
|
import TextInput from './components/TextInput.vue'
|
|
63
64
|
import Toast from './components/Toast.vue'
|
|
64
65
|
import Tree from './components/Tree.vue'
|
|
@@ -126,6 +127,7 @@ declare module 'vue' {
|
|
|
126
127
|
NbSparkline: typeof Sparkline
|
|
127
128
|
NbSubmenu: typeof Submenu
|
|
128
129
|
NbSwitch: typeof Switch
|
|
130
|
+
NbTabs: typeof Tabs
|
|
129
131
|
NbTextInput: typeof TextInput
|
|
130
132
|
NbToast: typeof Toast
|
|
131
133
|
NbTree: typeof Tree
|