@naptics/vue-collection 0.3.2 → 1.0.0-beta.2
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/{components → lib/components}/NAlert.js +3 -3
- package/{components → lib/components}/NBadge.js +1 -1
- package/{components → lib/components}/NButton.js +2 -4
- package/{components → lib/components}/NCheckbox.js +1 -1
- package/{components → lib/components}/NDialog.js +2 -2
- package/{components → lib/components}/NDropdown.js +8 -8
- package/{components → lib/components}/NDropzone.js +4 -4
- package/{components → lib/components}/NIconButton.js +1 -1
- package/{components → lib/components}/NInput.js +1 -1
- package/{components → lib/components}/NLink.js +1 -1
- package/{components → lib/components}/NModal.js +8 -5
- package/{components → lib/components}/NPagination.css +4 -2
- package/{components → lib/components}/NPagination.js +1 -1
- package/{components → lib/components}/NSearchbar.js +1 -1
- package/{components → lib/components}/NSelect.js +1 -1
- package/{components → lib/components}/NSuggestionList.js +1 -1
- package/{src/lib → lib}/components/NTable.css +2 -0
- package/{components → lib/components}/NTableAction.js +1 -1
- package/{components → lib/components}/NTextArea.js +1 -1
- package/{components → lib/components}/NTooltip.css +2 -0
- package/{components → lib/components}/NTooltip.js +1 -1
- package/{components → lib/components}/NValInput.d.ts +1 -4
- package/package.json +36 -31
- package/.github/workflows/build.yml +0 -26
- package/.github/workflows/deploy-demo.yml +0 -46
- package/.github/workflows/deploy-lib.yml +0 -59
- package/.gitlab-ci.yml +0 -57
- package/.nvmrc +0 -1
- package/.prettierrc +0 -8
- package/.vscode/extensions.json +0 -10
- package/.vscode/launch.json +0 -23
- package/.vscode/settings.json +0 -13
- package/babel.config.json +0 -3
- package/components/NTable.css +0 -3
- package/env.d.ts +0 -15
- package/eslint.config.cjs +0 -29
- package/index.html +0 -13
- package/postcss.config.js +0 -6
- package/public/favicon.ico +0 -0
- package/scripts/build-lib.sh +0 -52
- package/scripts/sync-node-types.js +0 -70
- package/src/demo/App.css +0 -9
- package/src/demo/App.tsx +0 -5
- package/src/demo/components/ColorGrid.tsx +0 -26
- package/src/demo/components/ComponentGrid.tsx +0 -26
- package/src/demo/components/ComponentSection.tsx +0 -30
- package/src/demo/components/VariantSection.tsx +0 -18
- package/src/demo/i18n/de.ts +0 -7
- package/src/demo/i18n/en.ts +0 -7
- package/src/demo/i18n/index.ts +0 -24
- package/src/demo/main.ts +0 -13
- package/src/demo/router/index.ts +0 -21
- package/src/demo/views/HomeView.tsx +0 -94
- package/src/demo/views/NavigationView.tsx +0 -43
- package/src/demo/views/presentation/AlertView.tsx +0 -40
- package/src/demo/views/presentation/BadgeView.tsx +0 -61
- package/src/demo/views/presentation/BreadcrumbView.tsx +0 -52
- package/src/demo/views/presentation/ButtonView.tsx +0 -49
- package/src/demo/views/presentation/CheckboxView.tsx +0 -59
- package/src/demo/views/presentation/DropdownView.tsx +0 -59
- package/src/demo/views/presentation/DropzoneView.tsx +0 -39
- package/src/demo/views/presentation/IconButtonView.tsx +0 -47
- package/src/demo/views/presentation/IconCircleView.tsx +0 -38
- package/src/demo/views/presentation/InputView.tsx +0 -179
- package/src/demo/views/presentation/LinkView.tsx +0 -60
- package/src/demo/views/presentation/ListView.tsx +0 -29
- package/src/demo/views/presentation/LoadingIndicatorView.tsx +0 -38
- package/src/demo/views/presentation/ModalView.tsx +0 -210
- package/src/demo/views/presentation/PaginationView.tsx +0 -25
- package/src/demo/views/presentation/SearchbarView.tsx +0 -80
- package/src/demo/views/presentation/TableView.tsx +0 -146
- package/src/demo/views/presentation/TooltipView.tsx +0 -92
- package/src/lib/components/NAlert.tsx +0 -85
- package/src/lib/components/NBadge.tsx +0 -75
- package/src/lib/components/NBreadcrub.tsx +0 -97
- package/src/lib/components/NButton.tsx +0 -80
- package/src/lib/components/NCheckbox.tsx +0 -55
- package/src/lib/components/NCheckboxLabel.tsx +0 -51
- package/src/lib/components/NCrudModal.tsx +0 -133
- package/src/lib/components/NDialog.tsx +0 -182
- package/src/lib/components/NDropdown.tsx +0 -167
- package/src/lib/components/NDropzone.tsx +0 -265
- package/src/lib/components/NForm.tsx +0 -32
- package/src/lib/components/NFormModal.tsx +0 -66
- package/src/lib/components/NIconButton.tsx +0 -92
- package/src/lib/components/NIconCircle.tsx +0 -78
- package/src/lib/components/NInput.css +0 -11
- package/src/lib/components/NInput.tsx +0 -139
- package/src/lib/components/NInputPhone.tsx +0 -53
- package/src/lib/components/NInputSelect.tsx +0 -126
- package/src/lib/components/NInputSuggestion.tsx +0 -80
- package/src/lib/components/NLink.tsx +0 -82
- package/src/lib/components/NList.tsx +0 -67
- package/src/lib/components/NLoadingIndicator.css +0 -46
- package/src/lib/components/NLoadingIndicator.tsx +0 -63
- package/src/lib/components/NModal.tsx +0 -243
- package/src/lib/components/NPagination.css +0 -15
- package/src/lib/components/NPagination.tsx +0 -131
- package/src/lib/components/NSearchbar.tsx +0 -78
- package/src/lib/components/NSearchbarList.tsx +0 -47
- package/src/lib/components/NSelect.tsx +0 -128
- package/src/lib/components/NSuggestionList.tsx +0 -216
- package/src/lib/components/NTable.tsx +0 -247
- package/src/lib/components/NTableAction.tsx +0 -49
- package/src/lib/components/NTextArea.tsx +0 -159
- package/src/lib/components/NTooltip.css +0 -37
- package/src/lib/components/NTooltip.tsx +0 -289
- package/src/lib/components/NValInput.tsx +0 -163
- package/src/lib/components/ValidatedForm.ts +0 -71
- package/src/lib/components/__tests__/NButton.spec.tsx +0 -26
- package/src/lib/components/__tests__/NCheckbox.spec.tsx +0 -39
- package/src/lib/i18n/de/vue-collection.json +0 -58
- package/src/lib/i18n/en/vue-collection.json +0 -58
- package/src/lib/i18n/index.ts +0 -54
- package/src/lib/index.ts +0 -2
- package/src/lib/jsx.d.ts +0 -13
- package/src/lib/utils/__tests__/identifiable.spec.ts +0 -72
- package/src/lib/utils/__tests__/validation.spec.ts +0 -92
- package/src/lib/utils/breakpoints.ts +0 -47
- package/src/lib/utils/component.tsx +0 -131
- package/src/lib/utils/deferred.ts +0 -28
- package/src/lib/utils/identifiable.ts +0 -87
- package/src/lib/utils/stringMaxLength.ts +0 -25
- package/src/lib/utils/tailwind.ts +0 -41
- package/src/lib/utils/utils.ts +0 -90
- package/src/lib/utils/vModel.ts +0 -260
- package/src/lib/utils/validation.ts +0 -189
- package/src/lib/utils/vue.ts +0 -25
- package/tailwind.config.js +0 -38
- package/tsconfig.config.json +0 -9
- package/tsconfig.demo.json +0 -19
- package/tsconfig.json +0 -16
- package/tsconfig.lib.json +0 -18
- package/tsconfig.vitest.json +0 -8
- package/vite.config.ts +0 -28
- /package/{components → lib/components}/NAlert.d.ts +0 -0
- /package/{components → lib/components}/NBadge.d.ts +0 -0
- /package/{components → lib/components}/NBreadcrub.d.ts +0 -0
- /package/{components → lib/components}/NBreadcrub.js +0 -0
- /package/{components → lib/components}/NButton.d.ts +0 -0
- /package/{components → lib/components}/NCheckbox.d.ts +0 -0
- /package/{components → lib/components}/NCheckboxLabel.d.ts +0 -0
- /package/{components → lib/components}/NCheckboxLabel.js +0 -0
- /package/{components → lib/components}/NCrudModal.d.ts +0 -0
- /package/{components → lib/components}/NCrudModal.js +0 -0
- /package/{components → lib/components}/NDialog.d.ts +0 -0
- /package/{components → lib/components}/NDropdown.d.ts +0 -0
- /package/{components → lib/components}/NDropzone.d.ts +0 -0
- /package/{components → lib/components}/NForm.d.ts +0 -0
- /package/{components → lib/components}/NForm.js +0 -0
- /package/{components → lib/components}/NFormModal.d.ts +0 -0
- /package/{components → lib/components}/NFormModal.js +0 -0
- /package/{components → lib/components}/NIconButton.d.ts +0 -0
- /package/{components → lib/components}/NIconCircle.d.ts +0 -0
- /package/{components → lib/components}/NIconCircle.js +0 -0
- /package/{components → lib/components}/NInput.css +0 -0
- /package/{components → lib/components}/NInput.d.ts +0 -0
- /package/{components → lib/components}/NInputPhone.d.ts +0 -0
- /package/{components → lib/components}/NInputPhone.js +0 -0
- /package/{components → lib/components}/NInputSelect.d.ts +0 -0
- /package/{components → lib/components}/NInputSelect.js +0 -0
- /package/{components → lib/components}/NInputSuggestion.d.ts +0 -0
- /package/{components → lib/components}/NInputSuggestion.js +0 -0
- /package/{components → lib/components}/NLink.d.ts +0 -0
- /package/{components → lib/components}/NList.d.ts +0 -0
- /package/{components → lib/components}/NList.js +0 -0
- /package/{components → lib/components}/NLoadingIndicator.css +0 -0
- /package/{components → lib/components}/NLoadingIndicator.d.ts +0 -0
- /package/{components → lib/components}/NLoadingIndicator.js +0 -0
- /package/{components → lib/components}/NModal.d.ts +0 -0
- /package/{components → lib/components}/NPagination.d.ts +0 -0
- /package/{components → lib/components}/NSearchbar.d.ts +0 -0
- /package/{components → lib/components}/NSearchbarList.d.ts +0 -0
- /package/{components → lib/components}/NSearchbarList.js +0 -0
- /package/{components → lib/components}/NSelect.d.ts +0 -0
- /package/{components → lib/components}/NSuggestionList.d.ts +0 -0
- /package/{components → lib/components}/NTable.d.ts +0 -0
- /package/{components → lib/components}/NTable.js +0 -0
- /package/{components → lib/components}/NTableAction.d.ts +0 -0
- /package/{components → lib/components}/NTextArea.d.ts +0 -0
- /package/{components → lib/components}/NTooltip.d.ts +0 -0
- /package/{components → lib/components}/NValInput.js +0 -0
- /package/{components → lib/components}/ValidatedForm.d.ts +0 -0
- /package/{components → lib/components}/ValidatedForm.js +0 -0
- /package/{i18n → lib/i18n}/de/vue-collection.json +0 -0
- /package/{i18n → lib/i18n}/en/vue-collection.json +0 -0
- /package/{i18n → lib/i18n}/index.d.ts +0 -0
- /package/{i18n → lib/i18n}/index.js +0 -0
- /package/{index.d.ts → lib/index.d.ts} +0 -0
- /package/{index.js → lib/index.js} +0 -0
- /package/{utils → lib/utils}/breakpoints.d.ts +0 -0
- /package/{utils → lib/utils}/breakpoints.js +0 -0
- /package/{utils → lib/utils}/component.d.ts +0 -0
- /package/{utils → lib/utils}/component.js +0 -0
- /package/{utils → lib/utils}/deferred.d.ts +0 -0
- /package/{utils → lib/utils}/deferred.js +0 -0
- /package/{utils → lib/utils}/identifiable.d.ts +0 -0
- /package/{utils → lib/utils}/identifiable.js +0 -0
- /package/{utils → lib/utils}/stringMaxLength.d.ts +0 -0
- /package/{utils → lib/utils}/stringMaxLength.js +0 -0
- /package/{utils → lib/utils}/tailwind.d.ts +0 -0
- /package/{utils → lib/utils}/tailwind.js +0 -0
- /package/{utils → lib/utils}/utils.d.ts +0 -0
- /package/{utils → lib/utils}/utils.js +0 -0
- /package/{utils → lib/utils}/vModel.d.ts +0 -0
- /package/{utils → lib/utils}/vModel.js +0 -0
- /package/{utils → lib/utils}/validation.d.ts +0 -0
- /package/{utils → lib/utils}/validation.js +0 -0
- /package/{utils → lib/utils}/vue.d.ts +0 -0
- /package/{utils → lib/utils}/vue.js +0 -0
|
@@ -38,13 +38,13 @@ const Component = createComponent('NAlert', nAlertProps, (props, {
|
|
|
38
38
|
}, [_createVNode("div", {
|
|
39
39
|
"class": "flex items-center"
|
|
40
40
|
}, [_createVNode("div", {
|
|
41
|
-
"class": "flex
|
|
41
|
+
"class": "flex shrink-0 items-center"
|
|
42
42
|
}, [variant.value.icon()]), _createVNode("div", {
|
|
43
|
-
"class": "ml-3
|
|
43
|
+
"class": "ml-3 grow"
|
|
44
44
|
}, [_createVNode("p", {
|
|
45
45
|
"class": `text-sm font-medium text-${variant.value.color}-900`
|
|
46
46
|
}, [slots.default?.() ?? props.text])]), !props.hideX && _createVNode("div", {
|
|
47
|
-
"class": "flex items-center
|
|
47
|
+
"class": "flex items-center shrink-0 ml-3"
|
|
48
48
|
}, [_createVNode(NIconButton, {
|
|
49
49
|
"color": variant.value.color,
|
|
50
50
|
"size": 5,
|
|
@@ -57,7 +57,7 @@ const Component = createComponent('NBadge', nBadgeProps, (props, {
|
|
|
57
57
|
}) => {
|
|
58
58
|
return () => _createVNode(NTooltip, mapTooltipProps(props), {
|
|
59
59
|
default: () => [_createVNode("div", {
|
|
60
|
-
"class": ['px-2 py-1 rounded-md font-semibold shadow', `${props.textSize} bg-${props.color}-${props.shade} text-${props.color}-${props.textShade}`, props.allCaps ? 'uppercase' : '', props.badgeClass]
|
|
60
|
+
"class": ['px-2 py-1 rounded-md font-semibold shadow-sm', `${props.textSize} bg-${props.color}-${props.shade} text-${props.color}-${props.textShade}`, props.allCaps ? 'uppercase' : '', props.badgeClass]
|
|
61
61
|
}, [slots.default?.() || props.text])]
|
|
62
62
|
});
|
|
63
63
|
});
|
|
@@ -54,12 +54,10 @@ const Component = createComponent('NButton', nButtonProps, (props, {
|
|
|
54
54
|
default: () => [_createVNode("button", {
|
|
55
55
|
"disabled": isDisabled.value,
|
|
56
56
|
"type": props.type,
|
|
57
|
-
"class": [`block w-full font-medium rounded-md focus:outline-
|
|
57
|
+
"class": [`block w-full font-medium rounded-md focus:outline-hidden focus-visible:ring-2 shadow-sm text-${props.color}-900 relative`, isDisabled.value ? `bg-${props.color}-100 cursor-default` : `bg-${props.color}-200 hover:bg-${props.color}-300 focus-visible:ring-${props.color}-500 cursor-pointer`, props.small ? 'py-1 px-2 text-xs' : 'py-2 px-4 text-sm', props.buttonClass],
|
|
58
58
|
"onClick": props.onClick
|
|
59
59
|
}, [_createVNode("span", {
|
|
60
|
-
"class":
|
|
61
|
-
'opacity-10': props.loading
|
|
62
|
-
}
|
|
60
|
+
"class": props.loading ? 'opacity-0' : isDisabled.value ? 'opacity-20' : undefined
|
|
63
61
|
}, [slots.default?.()]), props.loading && _createVNode("div", {
|
|
64
62
|
"class": "absolute inset-0 flex items-center justify-center opacity-50"
|
|
65
63
|
}, [_createVNode(NLoadingIndicator, {
|
|
@@ -37,7 +37,7 @@ const Component = createComponent('NCheckbox', nCheckboxProps, props => {
|
|
|
37
37
|
"disabled": props.disabled,
|
|
38
38
|
"onClick": toggle,
|
|
39
39
|
"key": updateKey.value,
|
|
40
|
-
"class": [`h-5 w-5 border-default-300 rounded focus:outline-
|
|
40
|
+
"class": [`h-5 w-5 border-default-300 rounded-sm focus:outline-hidden focus:ring-0 focus-visible:ring-2 focus-visible:ring-${props.color}-500`, props.disabled ? `cursor-default opacity-50 bg-default-100 checked:bg-current text-${props.color}-400` : `cursor-pointer text-${props.color}-400`]
|
|
41
41
|
}, null);
|
|
42
42
|
});
|
|
43
43
|
export { Component as NCheckbox, Component as default };
|
|
@@ -109,13 +109,13 @@ const Component = createComponent('NDialog', nDialogProps, (props, context) => {
|
|
|
109
109
|
default: () => [_createVNode("div", {
|
|
110
110
|
"class": "flex space-x-4 py-2"
|
|
111
111
|
}, [_createVNode("div", {
|
|
112
|
-
"class": "
|
|
112
|
+
"class": "grow-0"
|
|
113
113
|
}, [_createVNode(NIconCircle, {
|
|
114
114
|
"icon": props.icon || defaults.value.icon,
|
|
115
115
|
"iconSize": 6,
|
|
116
116
|
"color": props.iconColor || defaults.value.iconColor
|
|
117
117
|
}, null)]), _createVNode("div", {
|
|
118
|
-
"class": "
|
|
118
|
+
"class": "grow"
|
|
119
119
|
}, [_createVNode(DialogTitle, {
|
|
120
120
|
"as": "h4",
|
|
121
121
|
"class": "font-medium text-lg text-default-700 mb-1"
|
|
@@ -64,22 +64,22 @@ const Component = createComponentWithSlots('NDropdown', nDropdownProps, ['button
|
|
|
64
64
|
"class": "flex"
|
|
65
65
|
}, [props.button?.(MenuButton) || _createVNode(MenuButton, {
|
|
66
66
|
"disabled": props.disabled,
|
|
67
|
-
"class": ['shadow w-full flex justify-between items-center
|
|
67
|
+
"class": ['shadow-sm w-full flex justify-between items-center rounded-md border bg-white border-default-300 px-4 py-2 text-sm font-medium focus:outline-hidden focus:ring-offset-2 focus-visible:ring-2 focus-visible:ring-primary-500', props.disabled ? 'text-default-700/20 cursor-default' : 'hover:bg-default-100 text-default-700 cursor-pointer', props.buttonClass]
|
|
68
68
|
}, {
|
|
69
69
|
default: () => [_createVNode("span", null, [props.title]), _createVNode(ChevronDownIcon, {
|
|
70
|
-
"class": "-mr-1 ml-2 h-5 w-5
|
|
70
|
+
"class": "-mr-1 ml-2 h-5 w-5 shrink-0",
|
|
71
71
|
"aria-hidden": "true"
|
|
72
72
|
}, null)]
|
|
73
73
|
})]), _createVNode(Transition, {
|
|
74
74
|
"enterActiveClass": "transition ease-out duration-100",
|
|
75
|
-
"enterFromClass": "
|
|
76
|
-
"enterToClass": "
|
|
75
|
+
"enterFromClass": "opacity-0 scale-95",
|
|
76
|
+
"enterToClass": "opacity-100 scale-100",
|
|
77
77
|
"leaveActiveClass": "transition ease-in duration-75",
|
|
78
|
-
"leaveFromClass": "
|
|
79
|
-
"leaveToClass": "
|
|
78
|
+
"leaveFromClass": "opacity-100 scale-100",
|
|
79
|
+
"leaveToClass": "opacity-0 scale-95"
|
|
80
80
|
}, {
|
|
81
81
|
default: () => [_createVNode(MenuItems, {
|
|
82
|
-
"class": ['z-10 absolute w-56 mt-2 rounded-md shadow-lg bg-white ring-1 ring-black
|
|
82
|
+
"class": ['z-10 absolute w-56 mt-2 rounded-md shadow-lg bg-white ring-1 ring-black/5 focus:outline-hidden', props.right ? 'origin-top-right right-0' : 'origin-top-left left-0']
|
|
83
83
|
}, {
|
|
84
84
|
default: () => [slots.default?.() || _createVNode("div", {
|
|
85
85
|
"class": "divide-y divide-default-200"
|
|
@@ -104,7 +104,7 @@ const Component = createComponentWithSlots('NDropdown', nDropdownProps, ['button
|
|
|
104
104
|
}) : _createVNode("button", {
|
|
105
105
|
"type": "button",
|
|
106
106
|
"onClick": item.onClick,
|
|
107
|
-
"class": ['w-full text-left px-4 py-2 text-sm', active ? 'bg-default-100 text-default-900' : 'text-default-700']
|
|
107
|
+
"class": ['w-full text-left px-4 py-2 text-sm cursor-pointer', active ? 'bg-default-100 text-default-900' : 'text-default-700']
|
|
108
108
|
}, [itemWithIcon(item)]);
|
|
109
109
|
}
|
|
110
110
|
}))]))])]
|
|
@@ -148,7 +148,7 @@ const Component = createComponent('NDropzone', nDropzoneProps, props => {
|
|
|
148
148
|
return () => {
|
|
149
149
|
let _slot;
|
|
150
150
|
return _createVNode("div", null, [_createVNode("button", {
|
|
151
|
-
"class": ['block w-full rounded-md border-dashed border-2 focus-visible:border-primary-500 focus:outline-
|
|
151
|
+
"class": ['block w-full rounded-md border-dashed border-2 focus-visible:border-primary-500 focus:outline-hidden ', 'flex flex-col items-center justify-center text-center text-sm select-none p-4', !props.disabled ? 'hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700' : '', props.disabled ? 'border-default-300 bg-default-50/50 text-default-500/30' : isDragOver.value ? 'border-primary-300 bg-primary-50 text-primary-700' : 'border-default-300 bg-default-50 text-default-500', props.height],
|
|
152
152
|
"onDrop": onDrop,
|
|
153
153
|
"onDragover": onDragOver,
|
|
154
154
|
"onDragleave": onDragLeave,
|
|
@@ -164,13 +164,13 @@ const Component = createComponent('NDropzone', nDropzoneProps, props => {
|
|
|
164
164
|
"onChange": onInputFilesChanged,
|
|
165
165
|
"onClick": event => event.stopPropagation()
|
|
166
166
|
}, null), _createVNode("div", {
|
|
167
|
-
"class": "
|
|
167
|
+
"class": "grow mb-2"
|
|
168
168
|
}, null), _createVNode("span", {
|
|
169
169
|
"class": "font-medium"
|
|
170
170
|
}, [trslc('vue-collection.text.drag-n-drop-files', props.maxFiles, {
|
|
171
171
|
n: props.maxFiles
|
|
172
172
|
})]), _createVNode("span", null, [props.description]), _createVNode("div", {
|
|
173
|
-
"class": "
|
|
173
|
+
"class": "grow mt-2 flex items-end justify-center text-red-500 font-medium"
|
|
174
174
|
}, [_createVNode("span", null, [fileError.value])])]), _createVNode("div", {
|
|
175
175
|
"class": "mt-2 space-y-1"
|
|
176
176
|
}, [_createVNode("div", {
|
|
@@ -190,7 +190,7 @@ const Component = createComponent('NDropzone', nDropzoneProps, props => {
|
|
|
190
190
|
"onClick": () => removeFile(file.index)
|
|
191
191
|
}, null)])]
|
|
192
192
|
})), _createVNode("div", {
|
|
193
|
-
"class": "
|
|
193
|
+
"class": "grow text-sm text-default-500 flex items-end justify-end text-right"
|
|
194
194
|
}, [_createVNode("span", null, [_createVNode("span", null, [trslc('vue-collection.text.files-selected', files.value.length, {
|
|
195
195
|
n: files.value.length
|
|
196
196
|
})]), files.value.length > 0 && _createVNode(_Fragment, null, [_createVNode("span", null, [_createTextVNode(" ")]), _createVNode(NLink, {
|
|
@@ -64,7 +64,7 @@ export const nIconButtonProps = {
|
|
|
64
64
|
* The `NIconButton` is a regular button which does not have any text but an icon instead.
|
|
65
65
|
*/
|
|
66
66
|
const Component = createComponent('NIconButton', nIconButtonProps, props => {
|
|
67
|
-
const classes = () => ['block p-0.5 rounded-md focus:outline-
|
|
67
|
+
const classes = () => ['block p-0.5 rounded-md focus:outline-hidden focus-visible:ring-2 -m-1', props.disabled ? `text-${props.color}-200 cursor-default` : `hover:bg-current/10 text-${props.color}-${props.shade} focus-visible:ring-${props.color}-${props.shade} cursor-pointer`, props.buttonClass];
|
|
68
68
|
const content = () => _createVNode(props.icon, {
|
|
69
69
|
"class": `w-${props.size} h-${props.size}`
|
|
70
70
|
}, null);
|
|
@@ -98,7 +98,7 @@ const Component = createComponent('NInput', nInputProps, (props, context) => {
|
|
|
98
98
|
"onFocus": () => props.onFocus?.(),
|
|
99
99
|
"onBlur": () => props.onBlur?.(),
|
|
100
100
|
"onInvalid": event => event.preventDefault(),
|
|
101
|
-
"class": ['block w-full rounded-md border focus:outline-
|
|
101
|
+
"class": ['block w-full rounded-md border focus:outline-hidden focus:ring-1 ', props.small ? 'text-xs py-0.5 px-2' : 'py-2 px-4', props.disabled ? 'text-default-500 placeholder-default-300 bg-default-50' : 'text-default-900 placeholder-default-400 ', props.error ? 'border-red-500 focus:border-red-500 focus:ring-red-500 pr-10' : 'border-default-300 focus:border-primary-500 focus:ring-primary-500', props.inputClass]
|
|
102
102
|
}, null), _withDirectives(_createVNode("div", {
|
|
103
103
|
"class": "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"
|
|
104
104
|
}, [_createVNode(ExclamationCircleIcon, {
|
|
@@ -51,7 +51,7 @@ const Component = createComponent('NLink', nLinkProps, (props, {
|
|
|
51
51
|
const shade = props.shade;
|
|
52
52
|
if (shade <= 500) return shade + 100;else return shade - 200;
|
|
53
53
|
});
|
|
54
|
-
const classes = computed(() => ['font-medium focus:outline-
|
|
54
|
+
const classes = computed(() => ['font-medium focus:outline-hidden focus-visible:ring-2 rounded-xs ring-offset-2 hover:underline text-left cursor-pointer', `${props.textSize} text-${props.color}-${props.shade} hover:text-${props.color}-${hoverShade.value} focus-visible:ring-${props.color}-${props.shade}`]);
|
|
55
55
|
const disabledClasses = computed(() => ['font-medium text-left cursor-not-allowed', `${props.textSize} text-${props.color}-200`]);
|
|
56
56
|
return () => props.route ? _createVNode(RouterLink, {
|
|
57
57
|
"to": props.route,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createVNode as _createVNode, createTextVNode as _createTextVNode } from "vue";
|
|
2
2
|
import { createComponentWithSlots } from '../utils/component';
|
|
3
|
-
import { Dialog,
|
|
3
|
+
import { Dialog, DialogTitle, TransitionRoot, TransitionChild } from '@headlessui/vue';
|
|
4
4
|
import NButton from './NButton';
|
|
5
5
|
import NIconButton from './NIconButton';
|
|
6
6
|
import { XMarkIcon } from '@heroicons/vue/24/solid';
|
|
@@ -163,10 +163,13 @@ const Component = createComponentWithSlots('NModal', nModalProps, ['modal', 'hea
|
|
|
163
163
|
"leave-from": "opacity-100",
|
|
164
164
|
"leave-to": "opacity-0"
|
|
165
165
|
}, {
|
|
166
|
-
default: () => [props.closeOnBackground ? _createVNode(
|
|
167
|
-
"class": "fixed inset-0 bg-default-700
|
|
166
|
+
default: () => [props.closeOnBackground ? _createVNode("div", {
|
|
167
|
+
"class": "fixed inset-0 bg-default-700/75",
|
|
168
|
+
"aria-hidden": "true",
|
|
169
|
+
"onClick": cancel
|
|
168
170
|
}, null) : _createVNode("div", {
|
|
169
|
-
"class": "fixed inset-0 bg-default-700
|
|
171
|
+
"class": "fixed inset-0 bg-default-700/75",
|
|
172
|
+
"aria-hidden": "true"
|
|
170
173
|
}, null)]
|
|
171
174
|
}), _createVNode("span", {
|
|
172
175
|
"class": "hidden align-middle h-screen",
|
|
@@ -181,7 +184,7 @@ const Component = createComponentWithSlots('NModal', nModalProps, ['modal', 'hea
|
|
|
181
184
|
"leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
182
185
|
}, {
|
|
183
186
|
default: () => [_createVNode("div", {
|
|
184
|
-
"class": ['
|
|
187
|
+
"class": ['relative m-4 w-full align-middle', props.maxWidth]
|
|
185
188
|
}, [props.modal?.({
|
|
186
189
|
ok,
|
|
187
190
|
cancel
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@reference "tailwindcss";
|
|
2
|
+
|
|
1
3
|
.pagination-item {
|
|
2
4
|
@apply h-9 w-9 text-sm inline-flex items-center justify-center border font-medium border-default-300 text-default-500;
|
|
3
5
|
}
|
|
@@ -7,9 +9,9 @@
|
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
.pagination-item.selectable {
|
|
10
|
-
@apply hover:bg-default-50 focus:outline-
|
|
12
|
+
@apply cursor-pointer hover:bg-default-50 focus:outline-hidden focus-visible:border-primary-500 focus-visible:ring-primary-500 focus-visible:ring-1 focus-visible:z-2;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
.pagination-item.selectable.selected {
|
|
14
|
-
@apply border-primary-500 bg-primary-100 hover:bg-primary-100 text-primary-600 z-
|
|
16
|
+
@apply border-primary-500 bg-primary-100 hover:bg-primary-100 text-primary-600 z-1;
|
|
15
17
|
}
|
|
@@ -73,7 +73,7 @@ const Component = createComponent('NPagination', nPaginationProps, props => {
|
|
|
73
73
|
}));
|
|
74
74
|
const classesForItem = item => ['pagination-item', item.selectable ? 'selectable ' : '', item.selected ? 'selected' : '', props.small ? '' : 'not-small'];
|
|
75
75
|
return () => _createVNode("nav", {
|
|
76
|
-
"class": "inline-flex rounded-md shadow -space-x-px"
|
|
76
|
+
"class": "inline-flex rounded-md shadow-sm -space-x-px"
|
|
77
77
|
}, [_createVNode("button", {
|
|
78
78
|
"class": ['pagination-item selectable rounded-l-md', props.small ? '' : 'not-small'],
|
|
79
79
|
"onClick": previous
|
|
@@ -56,7 +56,7 @@ const Component = createComponent('NSearchbar', nSearchbarProps, (props, context
|
|
|
56
56
|
"name": "search",
|
|
57
57
|
"placeholder": props.placeholder,
|
|
58
58
|
"autocomplete": "off",
|
|
59
|
-
"class": ['block w-full pl-10 pr-4 rounded-md border focus:outline-
|
|
59
|
+
"class": ['block w-full pl-10 pr-4 rounded-md border focus:outline-hidden focus:ring-1 transition placeholder-default-400 border-default-300 focus:border-primary-500 focus:ring-primary-500', props.small ? 'py-1' : 'py-2', props.inputClass],
|
|
60
60
|
"onFocus": props.onFocus,
|
|
61
61
|
"onBlur": props.onBlur
|
|
62
62
|
}, null)]);
|
|
@@ -85,7 +85,7 @@ const Component = createComponent('NSelect', nSelectProps, (props, context) => {
|
|
|
85
85
|
"value": props.value,
|
|
86
86
|
"onChange": event => slotProps.onUpdateValue(event.target.value),
|
|
87
87
|
"onBlur": slotProps.onBlur,
|
|
88
|
-
"class": ['block w-full py-2 pl-4 pr-10 rounded-md border focus:outline-
|
|
88
|
+
"class": ['block w-full py-2 pl-4 pr-10 rounded-md border focus:outline-hidden focus:ring-1', props.disabled ? 'text-default-300 ' : 'text-default-900 ', slotProps.error ? 'border-red-500 focus:border-red-500 focus:ring-red-500' : 'border-default-300 focus:border-primary-500 focus:ring-primary-500', props.inputClass]
|
|
89
89
|
}, [_createVNode("option", {
|
|
90
90
|
"disabled": !props.optional,
|
|
91
91
|
"selected": !props.value,
|
|
@@ -140,7 +140,7 @@ const Component = createComponentWithSlots('NSuggestionList', nSuggestionListPro
|
|
|
140
140
|
"class": "bg-white rounded-md shadow-lg p-2 absolute top-2 left-0 min-w-full z-10"
|
|
141
141
|
}, [_createVNode("ul", null, [displayItems.value.map((item, index) => _createVNode("li", {
|
|
142
142
|
"key": item.id,
|
|
143
|
-
"class": ['focus:outline-
|
|
143
|
+
"class": ['focus:outline-hidden hover:bg-default-50 rounded-md select-none p-2 cursor-pointer', selectedIndex.value === index ? 'bg-default-50' : ''],
|
|
144
144
|
"onMousedown": onListMouseDown,
|
|
145
145
|
"onMouseleave": onListMouseLeave,
|
|
146
146
|
"onClick": () => onSelect(item.id)
|
|
@@ -32,7 +32,7 @@ const Component = createComponent('NTableAction', nTableActionProps, (props, {
|
|
|
32
32
|
slots
|
|
33
33
|
}) => {
|
|
34
34
|
const content = () => slots.default?.() || _createVNode(_Fragment, null, [props.text]);
|
|
35
|
-
const classes = ['text-left font-medium focus:outline-
|
|
35
|
+
const classes = ['text-left font-medium focus:outline-hidden focus-visible:ring-2 focus-visible:ring-default-900 rounded-xs ring-offset-2 text-default-900 hover:underline hover:text-default-700 cursor-pointer'];
|
|
36
36
|
return () => {
|
|
37
37
|
let _slot;
|
|
38
38
|
return props.route ? _createVNode(RouterLink, {
|
|
@@ -122,7 +122,7 @@ const NTextAreaBase = createComponent('NTextAreaBase', nTextAreaBaseProps, (prop
|
|
|
122
122
|
"onFocus": () => props.onFocus?.(),
|
|
123
123
|
"onBlur": () => props.onBlur?.(),
|
|
124
124
|
"onInvalid": event => event.preventDefault(),
|
|
125
|
-
"class": ['block w-full rounded-md border focus:outline-
|
|
125
|
+
"class": ['block w-full rounded-md border focus:outline-hidden focus:ring-1 ', props.disabled ? 'text-default-500 placeholder-default-300 bg-default-50' : 'text-default-900 placeholder-default-400 ', props.error ? 'border-red-500 focus:border-red-500 focus:ring-red-500 pr-10' : 'border-default-300 focus:border-primary-500 focus:ring-primary-500', props.resizable ? 'resize-y' : 'resize-none', props.inputClass]
|
|
126
126
|
}, null), _withDirectives(_createVNode("div", {
|
|
127
127
|
"class": "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"
|
|
128
128
|
}, [_createVNode(ExclamationCircleIcon, {
|
|
@@ -212,7 +212,7 @@ const NTooltipBase = createComponent('NTooltipBase', nTooltipProps, (props, {
|
|
|
212
212
|
});
|
|
213
213
|
watchRef(showTooltip, () => popperInstance?.update());
|
|
214
214
|
return () => _createVNode(_Fragment, null, [_createVNode("div", {
|
|
215
|
-
"class": "p-[10px]
|
|
215
|
+
"class": "p-[10px] m-[-10px]",
|
|
216
216
|
"onMouseleave": () => setTimeout(() => isHoveringContent.value = false, 10)
|
|
217
217
|
}, [_createVNode("div", {
|
|
218
218
|
"id": contentId,
|
|
@@ -92,10 +92,7 @@ export declare const nValInputProps: {
|
|
|
92
92
|
*/
|
|
93
93
|
readonly disableBlurValidation: BooleanConstructor;
|
|
94
94
|
readonly tooltipText: StringConstructor;
|
|
95
|
-
readonly tooltipContent: PropType<() => JSX.Element
|
|
96
|
-
* If set to `true` this input is always valid when its value is empty.
|
|
97
|
-
* If set to `false` the input receives the {@link required} rule. Default is `false`.
|
|
98
|
-
*/>;
|
|
95
|
+
readonly tooltipContent: PropType<() => JSX.Element>;
|
|
99
96
|
readonly tooltipHide: BooleanConstructor;
|
|
100
97
|
readonly tooltipShow: BooleanConstructor;
|
|
101
98
|
readonly tooltipPlacement: {
|
package/package.json
CHANGED
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
"name": "@naptics/vue-collection",
|
|
3
3
|
"author": "Timo Siegenthaler and Jonas Schoch",
|
|
4
4
|
"description": "Vue Collection is a collection of styled and fully functional Vue components which can easily be integrated into our projects.",
|
|
5
|
-
"version": "0.
|
|
6
|
-
"main": "./index.js",
|
|
5
|
+
"version": "1.0.0-beta.2",
|
|
6
|
+
"main": "./lib/index.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib/"
|
|
9
|
+
],
|
|
7
10
|
"repository": {
|
|
8
11
|
"type": "git",
|
|
9
12
|
"url": "https://github.com/naptics/vue-collection"
|
|
10
13
|
},
|
|
11
14
|
"scripts": {
|
|
15
|
+
"prepack": "npm run build-lib",
|
|
12
16
|
"dev": "vite",
|
|
13
17
|
"lint": "eslint . --fix --ignore-pattern=.gitignore",
|
|
14
18
|
"type-check": "run-p type-check-lib type-check-demo",
|
|
@@ -22,43 +26,44 @@
|
|
|
22
26
|
"preinstall": "node ./scripts/sync-node-types.js"
|
|
23
27
|
},
|
|
24
28
|
"dependencies": {
|
|
25
|
-
"@headlessui/vue": "^1.7.
|
|
26
|
-
"@popperjs/core": "^2.11.
|
|
27
|
-
"awesome-phonenumber": "^
|
|
29
|
+
"@headlessui/vue": "^1.7.23",
|
|
30
|
+
"@popperjs/core": "^2.11.8",
|
|
31
|
+
"awesome-phonenumber": "^7.8.0"
|
|
28
32
|
},
|
|
29
33
|
"peerDependencies": {
|
|
30
34
|
"@heroicons/vue": "^2.0.16",
|
|
31
35
|
"vue": "^3.5.0"
|
|
32
36
|
},
|
|
33
37
|
"devDependencies": {
|
|
34
|
-
"@babel/cli": "^7.
|
|
35
|
-
"@babel/core": "^7.
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
38
|
+
"@babel/cli": "^7.28.6",
|
|
39
|
+
"@babel/core": "^7.29.0",
|
|
40
|
+
"@eslint/js": "^10.0.1",
|
|
41
|
+
"@intlify/unplugin-vue-i18n": "^11.2.3",
|
|
42
|
+
"@rushstack/eslint-patch": "^1.16.1",
|
|
43
|
+
"@tailwindcss/forms": "^0.5.11",
|
|
44
|
+
"@tailwindcss/vite": "^4.3.0",
|
|
45
|
+
"@types/jsdom": "^28.0.3",
|
|
40
46
|
"@types/node": "^24",
|
|
41
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
42
|
-
"@vitejs/plugin-vue-jsx": "^5.1.
|
|
43
|
-
"@vue/babel-plugin-jsx": "^
|
|
47
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
48
|
+
"@vitejs/plugin-vue-jsx": "^5.1.5",
|
|
49
|
+
"@vue/babel-plugin-jsx": "^2.0.1",
|
|
44
50
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
45
|
-
"@vue/eslint-config-typescript": "^14.
|
|
46
|
-
"@vue/test-utils": "^2.
|
|
47
|
-
"@vue/tsconfig": "^0.
|
|
48
|
-
"
|
|
49
|
-
"eslint": "^9.
|
|
50
|
-
"
|
|
51
|
-
"jsdom": "^29.0.2",
|
|
51
|
+
"@vue/eslint-config-typescript": "^14.7.0",
|
|
52
|
+
"@vue/test-utils": "^2.4.10",
|
|
53
|
+
"@vue/tsconfig": "^0.8.1",
|
|
54
|
+
"eslint": "^10.4.0",
|
|
55
|
+
"eslint-plugin-vue": "^10.9.1",
|
|
56
|
+
"jsdom": "^29.1.1",
|
|
52
57
|
"npm-run-all": "^4.1.5",
|
|
53
|
-
"postcss": "^8.
|
|
54
|
-
"prettier": "^3.
|
|
55
|
-
"tailwindcss": "^3.
|
|
56
|
-
"typescript": "~5.
|
|
57
|
-
"vite": "^
|
|
58
|
-
"vitest": "^4.
|
|
59
|
-
"vue": "^3.5.
|
|
60
|
-
"vue-i18n": "^
|
|
61
|
-
"vue-router": "^
|
|
62
|
-
"vue-tsc": "^3.1
|
|
58
|
+
"postcss": "^8.5.15",
|
|
59
|
+
"prettier": "^3.8.3",
|
|
60
|
+
"tailwindcss": "^4.3.0",
|
|
61
|
+
"typescript": "~5.8.3",
|
|
62
|
+
"vite": "^8.0.14",
|
|
63
|
+
"vitest": "^4.1.7",
|
|
64
|
+
"vue": "^3.5.34",
|
|
65
|
+
"vue-i18n": "^11.4.4",
|
|
66
|
+
"vue-router": "^5.0.7",
|
|
67
|
+
"vue-tsc": "^3.3.1"
|
|
63
68
|
}
|
|
64
69
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
name: Lint, Type-Check, Build & Test
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- '**'
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
build:
|
|
10
|
-
name: Lint, Type-Check, Build & Test
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout repository
|
|
14
|
-
uses: actions/checkout@v4
|
|
15
|
-
- name: Read .nvmrc
|
|
16
|
-
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT
|
|
17
|
-
id: nvm
|
|
18
|
-
- name: Setup node environment
|
|
19
|
-
uses: actions/setup-node@v4
|
|
20
|
-
with:
|
|
21
|
-
node-version: ${{ steps.nvm.outputs.NVMRC }}
|
|
22
|
-
- run: npm ci
|
|
23
|
-
- run: npm run lint
|
|
24
|
-
- run: npm run build-lib
|
|
25
|
-
- run: npm run build-demo
|
|
26
|
-
- run: npm run test
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
name: Deploy Demo App to Github Pages
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
|
|
8
|
-
permissions:
|
|
9
|
-
contents: read
|
|
10
|
-
pages: write
|
|
11
|
-
id-token: write
|
|
12
|
-
|
|
13
|
-
env:
|
|
14
|
-
VITE_BASE_PATH: vue-collection/
|
|
15
|
-
|
|
16
|
-
jobs:
|
|
17
|
-
build:
|
|
18
|
-
name: Lint, Type-Check, Build & Test
|
|
19
|
-
runs-on: ubuntu-latest
|
|
20
|
-
steps:
|
|
21
|
-
- name: Checkout repository
|
|
22
|
-
uses: actions/checkout@v4
|
|
23
|
-
- name: Setup Pages
|
|
24
|
-
uses: actions/configure-pages@v5
|
|
25
|
-
- name: Read .nvmrc
|
|
26
|
-
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT
|
|
27
|
-
id: nvm
|
|
28
|
-
- name: Setup node environment
|
|
29
|
-
uses: actions/setup-node@v4
|
|
30
|
-
with:
|
|
31
|
-
node-version: ${{ steps.nvm.outputs.NVMRC }}
|
|
32
|
-
- run: npm ci
|
|
33
|
-
- run: npm run lint
|
|
34
|
-
- run: npm run build-demo
|
|
35
|
-
- run: npm run test
|
|
36
|
-
- name: Upload demo as artifact
|
|
37
|
-
uses: actions/upload-pages-artifact@v3
|
|
38
|
-
with:
|
|
39
|
-
path: 'dist'
|
|
40
|
-
deploy:
|
|
41
|
-
name: Deploy Demo App To Github Pages
|
|
42
|
-
needs: build
|
|
43
|
-
runs-on: ubuntu-latest
|
|
44
|
-
steps:
|
|
45
|
-
- name: Deploy to GitHub Pages
|
|
46
|
-
uses: actions/deploy-pages@v4
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
name: Deploy Library to npm
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- v*
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
build:
|
|
10
|
-
name: Lint, Type-Check, Build & Test
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout repository
|
|
14
|
-
uses: actions/checkout@v4
|
|
15
|
-
- name: Read .nvmrc
|
|
16
|
-
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT
|
|
17
|
-
id: nvm
|
|
18
|
-
- name: Setup node environment
|
|
19
|
-
uses: actions/setup-node@v4
|
|
20
|
-
with:
|
|
21
|
-
node-version: ${{ steps.nvm.outputs.NVMRC }}
|
|
22
|
-
- run: npm ci
|
|
23
|
-
- run: npm run lint
|
|
24
|
-
- run: npm run build-lib
|
|
25
|
-
- run: npm run test
|
|
26
|
-
- name: Upload library as artifact
|
|
27
|
-
uses: actions/upload-artifact@v4
|
|
28
|
-
with:
|
|
29
|
-
name: vue-collection-lib
|
|
30
|
-
path: |
|
|
31
|
-
lib
|
|
32
|
-
.npmrc
|
|
33
|
-
package.json
|
|
34
|
-
README.md
|
|
35
|
-
deploy:
|
|
36
|
-
name: Deploy Library to npm
|
|
37
|
-
needs: build
|
|
38
|
-
runs-on: ubuntu-latest
|
|
39
|
-
permissions:
|
|
40
|
-
id-token: write # Required for OIDC
|
|
41
|
-
contents: read
|
|
42
|
-
steps:
|
|
43
|
-
- name: Checkout repository
|
|
44
|
-
uses: actions/checkout@v4
|
|
45
|
-
- name: Read .nvmrc
|
|
46
|
-
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT
|
|
47
|
-
id: nvm
|
|
48
|
-
- name: Setup node environment
|
|
49
|
-
uses: actions/setup-node@v4
|
|
50
|
-
with:
|
|
51
|
-
node-version: ${{ steps.nvm.outputs.NVMRC }}
|
|
52
|
-
registry-url: https://registry.npmjs.org/
|
|
53
|
-
- name: Download library artifact
|
|
54
|
-
uses: actions/download-artifact@v4
|
|
55
|
-
with:
|
|
56
|
-
name: vue-collection-lib
|
|
57
|
-
- name: Prepare folder structure
|
|
58
|
-
run: mv ./lib/* .
|
|
59
|
-
- run: npm publish --access=public
|
package/.gitlab-ci.yml
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
cache:
|
|
2
|
-
paths:
|
|
3
|
-
- node_modules/
|
|
4
|
-
|
|
5
|
-
default:
|
|
6
|
-
image: node:18-alpine3.15
|
|
7
|
-
|
|
8
|
-
stages:
|
|
9
|
-
- prebuild
|
|
10
|
-
- build
|
|
11
|
-
- deploy
|
|
12
|
-
|
|
13
|
-
workflow:
|
|
14
|
-
rules:
|
|
15
|
-
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
16
|
-
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
17
|
-
|
|
18
|
-
prebuild:
|
|
19
|
-
stage: prebuild
|
|
20
|
-
before_script:
|
|
21
|
-
- npm ci
|
|
22
|
-
script:
|
|
23
|
-
- npm run type-check
|
|
24
|
-
- npm run lint
|
|
25
|
-
- npm run test
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
build-pages:
|
|
29
|
-
stage: build
|
|
30
|
-
before_script:
|
|
31
|
-
- npm ci
|
|
32
|
-
script:
|
|
33
|
-
- export VITE_BASE_PATH="${CI_PROJECT_PATH#$CI_PROJECT_ROOT_NAMESPACE}/"
|
|
34
|
-
- npm run build
|
|
35
|
-
artifacts:
|
|
36
|
-
paths:
|
|
37
|
-
- dist/
|
|
38
|
-
expire_in: 1 day
|
|
39
|
-
|
|
40
|
-
pages:
|
|
41
|
-
stage: deploy
|
|
42
|
-
image: busybox:latest
|
|
43
|
-
environment:
|
|
44
|
-
name: Showroom
|
|
45
|
-
url: $CI_PAGES_URL
|
|
46
|
-
script:
|
|
47
|
-
- rm -rf public
|
|
48
|
-
- mkdir public
|
|
49
|
-
- mv dist/* public
|
|
50
|
-
artifacts:
|
|
51
|
-
paths:
|
|
52
|
-
- public
|
|
53
|
-
rules:
|
|
54
|
-
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
24
|