@nubisco/ui 1.53.0 → 1.53.1
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/dist/components/AiLabel.d.ts +19 -0
- package/dist/components/Badge.d.ts +23 -0
- package/dist/components/BlueprintControls.d.ts +21 -0
- package/dist/components/BlueprintMinimap.d.ts +17 -0
- package/dist/components/Board.d.ts +64 -0
- package/dist/components/BottomPanel.d.ts +13 -0
- package/dist/components/Button.d.ts +34 -0
- package/dist/components/Button.vue.d.ts +1 -1
- package/dist/components/Calendar.d.ts +32 -0
- package/dist/components/Charts/BarChart.d.ts +12 -0
- package/dist/components/Charts/GanttChart.d.ts +81 -0
- package/dist/components/Charts/InterpolationChart.d.ts +33 -0
- package/dist/components/Charts/LineChart.d.ts +15 -0
- package/dist/components/Charts/PieChart.d.ts +11 -0
- package/dist/components/Charts/Sparkline.d.ts +11 -0
- package/dist/components/Charts/shared/types.d.ts +53 -0
- package/dist/components/Checkbox.d.ts +9 -0
- package/dist/components/CheckboxGroup.d.ts +17 -0
- package/dist/components/ColorStrip.d.ts +22 -0
- package/dist/components/CommandPalette.d.ts +40 -0
- package/dist/components/DataTable.d.ts +131 -0
- package/dist/components/DatePicker.d.ts +52 -0
- package/dist/components/Field.d.ts +33 -0
- package/dist/components/FileUploader.d.ts +27 -0
- package/dist/components/FileUploader.vue.d.ts +1 -1
- package/dist/components/Flag.d.ts +9 -0
- package/dist/components/Form.d.ts +5 -0
- package/dist/components/Grid.d.ts +345 -0
- package/dist/components/Icon.d.ts +59 -0
- package/dist/components/Icon.vue.d.ts +1 -1
- package/dist/components/ImageCropper.d.ts +27 -0
- package/dist/components/JsonTree.d.ts +33 -0
- package/dist/components/Label.d.ts +14 -0
- package/dist/components/Menu.d.ts +53 -0
- package/dist/components/Message.d.ts +17 -0
- package/dist/components/Modal.d.ts +10 -0
- package/dist/components/Modal.vue.d.ts +1 -1
- package/dist/components/NumberInput.vue.d.ts +1 -1
- package/dist/components/Pagination.d.ts +38 -0
- package/dist/components/Pagination.vue.d.ts +1 -1
- package/dist/components/ProgressBar.d.ts +27 -0
- package/dist/components/Radio.d.ts +28 -0
- package/dist/components/Select.d.ts +23 -0
- package/dist/components/Shell.d.ts +60 -0
- package/dist/components/ShellPanel.d.ts +33 -0
- package/dist/components/SidebarBrand.d.ts +14 -0
- package/dist/components/SidebarLink.d.ts +24 -0
- package/dist/components/SidebarMenu.d.ts +10 -0
- package/dist/components/SidebarMenuGroup.d.ts +16 -0
- package/dist/components/SidebarMenuItem.d.ts +42 -0
- package/dist/components/Slider.d.ts +26 -0
- package/dist/components/Switch.d.ts +20 -0
- package/dist/components/TextInput.vue.d.ts +1 -1
- package/dist/components/Tree.d.ts +68 -0
- package/dist/components/UserMenu.d.ts +43 -0
- package/dist/components/labs/Spreadsheet.d.ts +104 -0
- package/dist/directives/ToolTip.directive.d.ts +1 -1
- package/dist/global.d.ts +135 -0
- package/dist/types/Decoration.d.ts +6 -0
- package/dist/types/Option.d.ts +29 -0
- package/dist/types/Props.d.ts +121 -0
- package/dist/types/Size.d.ts +33 -0
- package/dist/types/Variants.d.ts +12 -0
- package/dist/types/Vite.d.ts +3 -0
- package/package.json +6 -3
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NbSpreadsheet — labs-tier spreadsheet-style data grid.
|
|
3
|
+
*
|
|
4
|
+
* Status: experimental. API may change. Use via `app.use(NubiscoUILabs)`.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export type TSpreadsheetCellType = 'text' | 'number' | 'date'
|
|
8
|
+
export type TSpreadsheetAlign = 'left' | 'center' | 'right'
|
|
9
|
+
export type TSpreadsheetPinCol = 'left' | 'right'
|
|
10
|
+
export type TSpreadsheetPinRow = 'top' | 'bottom'
|
|
11
|
+
export type TSpreadsheetSortDir = 'asc' | 'desc'
|
|
12
|
+
|
|
13
|
+
export interface ISpreadsheetColumn {
|
|
14
|
+
/** Stable id used for selection, sort, and host commits. */
|
|
15
|
+
id: string
|
|
16
|
+
/** Header label. */
|
|
17
|
+
label: string
|
|
18
|
+
/** Initial pixel width. Default 120. */
|
|
19
|
+
width?: number
|
|
20
|
+
/** Minimum width when the user resizes. Default 60. */
|
|
21
|
+
minWidth?: number
|
|
22
|
+
/** Pin the column to the left or right edge of the viewport. */
|
|
23
|
+
pinned?: TSpreadsheetPinCol
|
|
24
|
+
/** Text alignment inside the cell. Defaults: number+date right, text left. */
|
|
25
|
+
align?: TSpreadsheetAlign
|
|
26
|
+
/** Cell value type — drives default formatter, parser, and input mode. */
|
|
27
|
+
type?: TSpreadsheetCellType
|
|
28
|
+
/** All cells in this column are read-only. */
|
|
29
|
+
readOnly?: boolean
|
|
30
|
+
/** Allow header-click sorting. */
|
|
31
|
+
sortable?: boolean
|
|
32
|
+
/** Host-supplied display formatter. Defaults pick a sensible string. */
|
|
33
|
+
format?: (raw: unknown, row: ISpreadsheetRow) => string
|
|
34
|
+
/** Host-supplied parser for committed edits. Defaults follow `type`. */
|
|
35
|
+
parse?: (input: string) => unknown
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface ISpreadsheetRow {
|
|
39
|
+
id: string
|
|
40
|
+
/** columnId -> raw value */
|
|
41
|
+
values: Record<string, unknown>
|
|
42
|
+
/** Pinned rows stick to the top or bottom of the viewport. */
|
|
43
|
+
pinned?: TSpreadsheetPinRow
|
|
44
|
+
/** Row-wide CSS class for theming (e.g. 'weekend'). */
|
|
45
|
+
className?: string
|
|
46
|
+
/** Marks the row as a totals/computed row — disables editing. */
|
|
47
|
+
computed?: boolean
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface ISpreadsheetCellAttrs {
|
|
51
|
+
readOnly?: boolean
|
|
52
|
+
className?: string
|
|
53
|
+
tooltip?: string
|
|
54
|
+
/** Override the formatted display string. */
|
|
55
|
+
display?: string
|
|
56
|
+
/** Mark a single cell as derived (read-only + style). */
|
|
57
|
+
computed?: boolean
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface ISpreadsheetChange {
|
|
61
|
+
rowId: string
|
|
62
|
+
columnId: string
|
|
63
|
+
before: unknown
|
|
64
|
+
after: unknown
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface ISpreadsheetSelection {
|
|
68
|
+
startRowId: string
|
|
69
|
+
startColumnId: string
|
|
70
|
+
endRowId: string
|
|
71
|
+
endColumnId: string
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface ISpreadsheetProps {
|
|
75
|
+
columns: ISpreadsheetColumn[]
|
|
76
|
+
rows: ISpreadsheetRow[]
|
|
77
|
+
/** Per-cell metadata. Called lazily for visible cells. */
|
|
78
|
+
cellAttrs?: (
|
|
79
|
+
rowId: string,
|
|
80
|
+
columnId: string,
|
|
81
|
+
row: ISpreadsheetRow,
|
|
82
|
+
column: ISpreadsheetColumn,
|
|
83
|
+
) => ISpreadsheetCellAttrs | void
|
|
84
|
+
/**
|
|
85
|
+
* Compute a derived value for a cell. Lets the host implement totals or
|
|
86
|
+
* formulas without putting raw values in `row.values`. `get` reads other
|
|
87
|
+
* cells' raw values.
|
|
88
|
+
*/
|
|
89
|
+
computed?: (
|
|
90
|
+
rowId: string,
|
|
91
|
+
columnId: string,
|
|
92
|
+
get: (rowId: string, columnId: string) => unknown,
|
|
93
|
+
) => unknown
|
|
94
|
+
/** Allow column resize. Default true. */
|
|
95
|
+
resizable?: boolean
|
|
96
|
+
/** Allow row reorder by dragging the row header. Default false. */
|
|
97
|
+
rowReorderable?: boolean
|
|
98
|
+
/** Show a row index gutter on the left. Default true. */
|
|
99
|
+
showGutter?: boolean
|
|
100
|
+
/** Approximate visible rows used for the simple virtualization. Default 80. */
|
|
101
|
+
windowRows?: number
|
|
102
|
+
/** Locale used for default Intl-based number/date formatting. */
|
|
103
|
+
locale?: string
|
|
104
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { App } from 'vue';
|
|
2
|
-
import type { IComponentContent } from '
|
|
2
|
+
import type { IComponentContent } from '../types/ContentRenderer';
|
|
3
3
|
export interface ITooltipOptions {
|
|
4
4
|
body?: string | Array<IComponentContent>;
|
|
5
5
|
header?: string | Array<IComponentContent>;
|
package/dist/global.d.ts
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// AUTO-GENERATED: do not edit by hand
|
|
2
|
+
// Re-run the build to update this file when components change
|
|
3
|
+
import AiLabel from './components/AiLabel.vue'
|
|
4
|
+
import Badge from './components/Badge.vue'
|
|
5
|
+
import BarChart from './components/Charts/BarChart.vue'
|
|
6
|
+
import Blueprint from './components/Blueprint.vue'
|
|
7
|
+
import BlueprintCard from './components/BlueprintCard.vue'
|
|
8
|
+
import BlueprintControls from './components/BlueprintControls.vue'
|
|
9
|
+
import BlueprintDomRenderer from './components/BlueprintDomRenderer.vue'
|
|
10
|
+
import BlueprintMinimap from './components/BlueprintMinimap.vue'
|
|
11
|
+
import BlueprintPixiRenderer from './components/BlueprintPixiRenderer.vue'
|
|
12
|
+
import Board from './components/Board.vue'
|
|
13
|
+
import BottomPanel from './components/BottomPanel.vue'
|
|
14
|
+
import Breadcrumbs from './components/Breadcrumbs.vue'
|
|
15
|
+
import Button from './components/Button.vue'
|
|
16
|
+
import Calendar from './components/Calendar.vue'
|
|
17
|
+
import Checkbox from './components/Checkbox.vue'
|
|
18
|
+
import CheckboxGroup from './components/CheckboxGroup.vue'
|
|
19
|
+
import ColorStrip from './components/ColorStrip.vue'
|
|
20
|
+
import CommandPalette from './components/CommandPalette.vue'
|
|
21
|
+
import DataTable from './components/DataTable.vue'
|
|
22
|
+
import DatePicker from './components/DatePicker.vue'
|
|
23
|
+
import Field from './components/Field.vue'
|
|
24
|
+
import FileUploader from './components/FileUploader.vue'
|
|
25
|
+
import Flag from './components/Flag.vue'
|
|
26
|
+
import Form from './components/Form.vue'
|
|
27
|
+
import GanttChart from './components/Charts/GanttChart.vue'
|
|
28
|
+
import Grid from './components/Grid.vue'
|
|
29
|
+
import Icon from './components/Icon.vue'
|
|
30
|
+
import ImageCropper from './components/ImageCropper.vue'
|
|
31
|
+
import InterpolationChart from './components/Charts/InterpolationChart.vue'
|
|
32
|
+
import JsonTree from './components/JsonTree.vue'
|
|
33
|
+
import Label from './components/Label.vue'
|
|
34
|
+
import LineChart from './components/Charts/LineChart.vue'
|
|
35
|
+
import Menu from './components/Menu.vue'
|
|
36
|
+
import MenuBar from './components/MenuBar.vue'
|
|
37
|
+
import MenuBarItem from './components/MenuBarItem.vue'
|
|
38
|
+
import MenuDivider from './components/MenuDivider.vue'
|
|
39
|
+
import MenuItem from './components/MenuItem.vue'
|
|
40
|
+
import Message from './components/Message.vue'
|
|
41
|
+
import Modal from './components/Modal.vue'
|
|
42
|
+
import NumberInput from './components/NumberInput.vue'
|
|
43
|
+
import Pagination from './components/Pagination.vue'
|
|
44
|
+
import Panel from './components/Panel.vue'
|
|
45
|
+
import PieChart from './components/Charts/PieChart.vue'
|
|
46
|
+
import ProgressBar from './components/ProgressBar.vue'
|
|
47
|
+
import Radio from './components/Radio.vue'
|
|
48
|
+
import Select from './components/Select.vue'
|
|
49
|
+
import Shell from './components/Shell.vue'
|
|
50
|
+
import ShellPanel from './components/ShellPanel.vue'
|
|
51
|
+
import SidebarBrand from './components/SidebarBrand.vue'
|
|
52
|
+
import SidebarLink from './components/SidebarLink.vue'
|
|
53
|
+
import SidebarMenu from './components/SidebarMenu.vue'
|
|
54
|
+
import SidebarMenuGroup from './components/SidebarMenuGroup.vue'
|
|
55
|
+
import SidebarMenuItem from './components/SidebarMenuItem.vue'
|
|
56
|
+
import SidebarVariantScope from './components/SidebarVariantScope.vue'
|
|
57
|
+
import Slider from './components/Slider.vue'
|
|
58
|
+
import Sparkline from './components/Charts/Sparkline.vue'
|
|
59
|
+
import Submenu from './components/Submenu.vue'
|
|
60
|
+
import Switch from './components/Switch.vue'
|
|
61
|
+
import TextInput from './components/TextInput.vue'
|
|
62
|
+
import Toast from './components/Toast.vue'
|
|
63
|
+
import Tree from './components/Tree.vue'
|
|
64
|
+
import TreeNode from './components/TreeNode.vue'
|
|
65
|
+
import UserMenu from './components/UserMenu.vue'
|
|
66
|
+
|
|
67
|
+
declare module 'vue' {
|
|
68
|
+
interface IGlobalComponents {
|
|
69
|
+
NbAiLabel: typeof AiLabel
|
|
70
|
+
NbBadge: typeof Badge
|
|
71
|
+
NbBarChart: typeof BarChart
|
|
72
|
+
NbBlueprint: typeof Blueprint
|
|
73
|
+
NbBlueprintCard: typeof BlueprintCard
|
|
74
|
+
NbBlueprintControls: typeof BlueprintControls
|
|
75
|
+
NbBlueprintDomRenderer: typeof BlueprintDomRenderer
|
|
76
|
+
NbBlueprintMinimap: typeof BlueprintMinimap
|
|
77
|
+
NbBlueprintPixiRenderer: typeof BlueprintPixiRenderer
|
|
78
|
+
NbBoard: typeof Board
|
|
79
|
+
NbBottomPanel: typeof BottomPanel
|
|
80
|
+
NbBreadcrumbs: typeof Breadcrumbs
|
|
81
|
+
NbButton: typeof Button
|
|
82
|
+
NbCalendar: typeof Calendar
|
|
83
|
+
NbCheckbox: typeof Checkbox
|
|
84
|
+
NbCheckboxGroup: typeof CheckboxGroup
|
|
85
|
+
NbColorStrip: typeof ColorStrip
|
|
86
|
+
NbCommandPalette: typeof CommandPalette
|
|
87
|
+
NbDataTable: typeof DataTable
|
|
88
|
+
NbDatePicker: typeof DatePicker
|
|
89
|
+
NbField: typeof Field
|
|
90
|
+
NbFileUploader: typeof FileUploader
|
|
91
|
+
NbFlag: typeof Flag
|
|
92
|
+
NbForm: typeof Form
|
|
93
|
+
NbGanttChart: typeof GanttChart
|
|
94
|
+
NbGrid: typeof Grid
|
|
95
|
+
NbIcon: typeof Icon
|
|
96
|
+
NbImageCropper: typeof ImageCropper
|
|
97
|
+
NbInterpolationChart: typeof InterpolationChart
|
|
98
|
+
NbJsonTree: typeof JsonTree
|
|
99
|
+
NbLabel: typeof Label
|
|
100
|
+
NbLineChart: typeof LineChart
|
|
101
|
+
NbMenu: typeof Menu
|
|
102
|
+
NbMenuBar: typeof MenuBar
|
|
103
|
+
NbMenuBarItem: typeof MenuBarItem
|
|
104
|
+
NbMenuDivider: typeof MenuDivider
|
|
105
|
+
NbMenuItem: typeof MenuItem
|
|
106
|
+
NbMessage: typeof Message
|
|
107
|
+
NbModal: typeof Modal
|
|
108
|
+
NbNumberInput: typeof NumberInput
|
|
109
|
+
NbPagination: typeof Pagination
|
|
110
|
+
NbPanel: typeof Panel
|
|
111
|
+
NbPieChart: typeof PieChart
|
|
112
|
+
NbProgressBar: typeof ProgressBar
|
|
113
|
+
NbRadio: typeof Radio
|
|
114
|
+
NbSelect: typeof Select
|
|
115
|
+
NbShell: typeof Shell
|
|
116
|
+
NbShellPanel: typeof ShellPanel
|
|
117
|
+
NbSidebarBrand: typeof SidebarBrand
|
|
118
|
+
NbSidebarLink: typeof SidebarLink
|
|
119
|
+
NbSidebarMenu: typeof SidebarMenu
|
|
120
|
+
NbSidebarMenuGroup: typeof SidebarMenuGroup
|
|
121
|
+
NbSidebarMenuItem: typeof SidebarMenuItem
|
|
122
|
+
NbSidebarVariantScope: typeof SidebarVariantScope
|
|
123
|
+
NbSlider: typeof Slider
|
|
124
|
+
NbSparkline: typeof Sparkline
|
|
125
|
+
NbSubmenu: typeof Submenu
|
|
126
|
+
NbSwitch: typeof Switch
|
|
127
|
+
NbTextInput: typeof TextInput
|
|
128
|
+
NbToast: typeof Toast
|
|
129
|
+
NbTree: typeof Tree
|
|
130
|
+
NbTreeNode: typeof TreeNode
|
|
131
|
+
NbUserMenu: typeof UserMenu
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export {}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IDecoration } from './Decoration'
|
|
2
|
+
|
|
3
|
+
// #region IOption
|
|
4
|
+
interface IOption extends IDecoration {
|
|
5
|
+
id?: number | string
|
|
6
|
+
label?: string
|
|
7
|
+
name?: string
|
|
8
|
+
value?: string | number
|
|
9
|
+
color?: string
|
|
10
|
+
context?: string
|
|
11
|
+
i18n_key?: string
|
|
12
|
+
createdBy?: number | string
|
|
13
|
+
createdAt?: string
|
|
14
|
+
disabled?: boolean
|
|
15
|
+
tooltip?: string
|
|
16
|
+
unformatted?: boolean
|
|
17
|
+
code?: string
|
|
18
|
+
hidden?: boolean
|
|
19
|
+
}
|
|
20
|
+
// #endregion IOption
|
|
21
|
+
|
|
22
|
+
// #region IOptionGroup
|
|
23
|
+
interface IOptionGroup {
|
|
24
|
+
groupName?: string // Optional: Name of the group
|
|
25
|
+
options: IOption[]
|
|
26
|
+
}
|
|
27
|
+
// #endregion IOptionGroup
|
|
28
|
+
|
|
29
|
+
export { IOption, IOptionGroup }
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared prop interfaces for Nubisco UI components.
|
|
3
|
+
*
|
|
4
|
+
* Hierarchy:
|
|
5
|
+
*
|
|
6
|
+
* IDefaultProps
|
|
7
|
+
* └── IHumanInputComponent
|
|
8
|
+
* └── IFieldComponent (+ IWithLabel + IWithMessages + IWithFieldAppearance)
|
|
9
|
+
* └── IReadableFieldComponent
|
|
10
|
+
*
|
|
11
|
+
* Compose these interfaces in component `.d.ts` files rather than redeclaring
|
|
12
|
+
* common props. This keeps definitions DRY and feeds intellisense with the
|
|
13
|
+
* JSDoc descriptions below.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// #region IDefaultProps
|
|
17
|
+
/** Any component that can be identified by an explicit DOM id. */
|
|
18
|
+
interface IDefaultProps {
|
|
19
|
+
/**
|
|
20
|
+
* Explicit element id.
|
|
21
|
+
* When omitted, a deterministic id is auto-generated by `useStableId()` from the
|
|
22
|
+
* component type and `name` prop — e.g. `nb-text-input-email`.
|
|
23
|
+
*/
|
|
24
|
+
id?: string
|
|
25
|
+
}
|
|
26
|
+
// #endregion IDefaultProps
|
|
27
|
+
|
|
28
|
+
// #region IWithMessages
|
|
29
|
+
/** Components that carry validation / feedback messages below the field. */
|
|
30
|
+
interface IWithMessages {
|
|
31
|
+
/** Validation error — takes precedence over `warning` and `helper` when set. */
|
|
32
|
+
error?: string
|
|
33
|
+
/** Non-blocking caution message — shown only when `error` is absent. */
|
|
34
|
+
warning?: string
|
|
35
|
+
/** Contextual hint displayed when neither `error` nor `warning` is set. */
|
|
36
|
+
helper?: string
|
|
37
|
+
}
|
|
38
|
+
// #endregion IWithMessages
|
|
39
|
+
|
|
40
|
+
// #region IWithLabel
|
|
41
|
+
/** Components that render a user-visible label. */
|
|
42
|
+
interface IWithLabel {
|
|
43
|
+
/** Label text rendered above (`default` variant) or inside (`fluid` variant) the field. */
|
|
44
|
+
label?: string
|
|
45
|
+
}
|
|
46
|
+
// #endregion IWithLabel
|
|
47
|
+
|
|
48
|
+
// #region IWithFieldAppearance
|
|
49
|
+
/** Components that support the standard field presentation variants and sizes. */
|
|
50
|
+
interface IWithFieldAppearance {
|
|
51
|
+
/**
|
|
52
|
+
* Presentation variant:
|
|
53
|
+
* - `default` — label above, message below (standard style).
|
|
54
|
+
* - `fluid` — label and status icon inside the field box.
|
|
55
|
+
*/
|
|
56
|
+
variant?: 'default' | 'fluid'
|
|
57
|
+
/**
|
|
58
|
+
* Control size. `xs` is the compact size for dense surfaces (inspectors,
|
|
59
|
+
* toolbars); `md` is the baseline for standalone forms. Every value here
|
|
60
|
+
* is backed by a real style rule — an unknown size no longer falls back
|
|
61
|
+
* silently.
|
|
62
|
+
*/
|
|
63
|
+
size?: 'xs' | 'sm' | 'md' | 'lg'
|
|
64
|
+
}
|
|
65
|
+
// #endregion IWithFieldAppearance
|
|
66
|
+
|
|
67
|
+
// #region IHumanInputComponent
|
|
68
|
+
/**
|
|
69
|
+
* Interactive form control that participates in form submission and can be
|
|
70
|
+
* disabled or marked as required.
|
|
71
|
+
*/
|
|
72
|
+
interface IHumanInputComponent extends IDefaultProps {
|
|
73
|
+
/**
|
|
74
|
+
* HTML `name` attribute forwarded to the native input.
|
|
75
|
+
* Also drives auto-generated IDs when `id` is omitted:
|
|
76
|
+
* `{component-type}-{name}` — e.g. `nb-select-country`.
|
|
77
|
+
*/
|
|
78
|
+
name?: string
|
|
79
|
+
/** Prevents interaction and visually dims the control. */
|
|
80
|
+
disabled?: boolean
|
|
81
|
+
/** Marks the field as mandatory — surfaced in the label and `aria-required`. */
|
|
82
|
+
required?: boolean
|
|
83
|
+
}
|
|
84
|
+
// #endregion IHumanInputComponent
|
|
85
|
+
|
|
86
|
+
// #region IFieldComponent
|
|
87
|
+
/**
|
|
88
|
+
* Full labeled field with placeholder text, validation messages, variant and
|
|
89
|
+
* size. The baseline for text-like, number, and select inputs.
|
|
90
|
+
*/
|
|
91
|
+
interface IFieldComponent
|
|
92
|
+
extends
|
|
93
|
+
IHumanInputComponent,
|
|
94
|
+
IWithLabel,
|
|
95
|
+
IWithMessages,
|
|
96
|
+
IWithFieldAppearance {
|
|
97
|
+
/** Placeholder text shown when the field has no value. */
|
|
98
|
+
placeholder?: string
|
|
99
|
+
}
|
|
100
|
+
// #endregion IFieldComponent
|
|
101
|
+
|
|
102
|
+
// #region IReadableFieldComponent
|
|
103
|
+
/**
|
|
104
|
+
* Extends `IFieldComponent` with a read-only mode: the value is visible and
|
|
105
|
+
* copyable but cannot be changed by the user.
|
|
106
|
+
*/
|
|
107
|
+
interface IReadableFieldComponent extends IFieldComponent {
|
|
108
|
+
/** Makes the field read-only — value is visible but not editable. */
|
|
109
|
+
readonly?: boolean
|
|
110
|
+
}
|
|
111
|
+
// #endregion IReadableFieldComponent
|
|
112
|
+
|
|
113
|
+
export {
|
|
114
|
+
IDefaultProps,
|
|
115
|
+
IWithMessages,
|
|
116
|
+
IWithLabel,
|
|
117
|
+
IWithFieldAppearance,
|
|
118
|
+
IHumanInputComponent,
|
|
119
|
+
IFieldComponent,
|
|
120
|
+
IReadableFieldComponent,
|
|
121
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// #region ESize
|
|
2
|
+
// String-based size tokens (for CSS classes, spacing scales, etc.)
|
|
3
|
+
export enum ESize {
|
|
4
|
+
ExtraExtraSmall = 'xxs',
|
|
5
|
+
ExtraSmall = 'xs',
|
|
6
|
+
Small = 'sm',
|
|
7
|
+
Medium = 'md',
|
|
8
|
+
Large = 'lg',
|
|
9
|
+
ExtraLarge = 'xl',
|
|
10
|
+
ExtraExtraLarge = 'xxl',
|
|
11
|
+
}
|
|
12
|
+
// #endregion ESize
|
|
13
|
+
|
|
14
|
+
// #region ESizeShort
|
|
15
|
+
export enum ESizeShort {
|
|
16
|
+
Small = 'sm',
|
|
17
|
+
Medium = 'md',
|
|
18
|
+
Large = 'lg',
|
|
19
|
+
}
|
|
20
|
+
// #endregion ESizeShort
|
|
21
|
+
|
|
22
|
+
// #region ESizePixel
|
|
23
|
+
// Numeric size values in pixels (for icons, images, components with fixed dimensions)
|
|
24
|
+
export enum ESizePixel {
|
|
25
|
+
ExtraExtraSmall = 8,
|
|
26
|
+
ExtraSmall = 12,
|
|
27
|
+
Small = 14,
|
|
28
|
+
Medium = 16,
|
|
29
|
+
Large = 20,
|
|
30
|
+
ExtraLarge = 60,
|
|
31
|
+
ExtraExtraLarge = 92,
|
|
32
|
+
}
|
|
33
|
+
// #endregion ESizePixel
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nubisco/ui",
|
|
3
|
-
"version": "1.53.
|
|
3
|
+
"version": "1.53.1",
|
|
4
4
|
"description": "Vue 3 UI component library",
|
|
5
5
|
"packageManager": "pnpm@11.0.8",
|
|
6
6
|
"repository": {
|
|
@@ -77,10 +77,13 @@
|
|
|
77
77
|
"scripts": {
|
|
78
78
|
"clean": "rm -rf dist",
|
|
79
79
|
"prebuild": "pnpm run clean",
|
|
80
|
-
"build": "pnpm run build:lib && pnpm run build:types && pnpm run build:plugins",
|
|
80
|
+
"build": "pnpm run build:lib && pnpm run build:types && pnpm run build:plugins && pnpm run verify:types",
|
|
81
81
|
"build:lib": "vite build",
|
|
82
|
-
"build:types": "vue-tsc --noEmit false --declaration --emitDeclarationOnly --outDir dist",
|
|
82
|
+
"build:types": "vue-tsc --noEmit false --declaration --emitDeclarationOnly --outDir dist && node scripts/copy-type-modules.mjs && node scripts/rewrite-dist-aliases.mjs dist",
|
|
83
83
|
"build:plugins": "tsc --project tsconfig.plugins.json",
|
|
84
|
+
"verify:types": "pnpm run verify:dist-types && pnpm run verify:consumer-types",
|
|
85
|
+
"verify:dist-types": "node scripts/verify-dist-types.mjs dist",
|
|
86
|
+
"verify:consumer-types": "node scripts/verify-consumer-types.mjs",
|
|
84
87
|
"dev": "vite build --watch",
|
|
85
88
|
"prepublishOnly": "pnpm run build",
|
|
86
89
|
"test": "vitest run",
|