Skip to content

Commit e35270f

Browse files
authored
Merge pull request #11763 from owncloud/chore/design-system-publish
chore: prepare design-system for publish
2 parents fccee34 + 80b8ff8 commit e35270f

File tree

98 files changed

+378
-292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+378
-292
lines changed

.drone.star

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ POSTGRES_ALPINE = "postgres:alpine3.18"
2525
SONARSOURCE_SONAR_SCANNER_CLI = "sonarsource/sonar-scanner-cli:5.0"
2626
TOOLHIPPIE_CALENS = "toolhippie/calens:latest"
2727

28-
WEB_PUBLISH_NPM_PACKAGES = ["babel-preset", "eslint-config", "extension-sdk", "prettier-config", "tsconfig", "web-client", "web-pkg", "web-test-helpers"]
28+
WEB_PUBLISH_NPM_PACKAGES = ["babel-preset", "design-system", "eslint-config", "extension-sdk", "prettier-config", "tsconfig", "web-client", "web-pkg", "web-test-helpers"]
2929
WEB_PUBLISH_NPM_ORGANIZATION = "@ownclouders"
3030

3131
dir = {
@@ -827,6 +827,7 @@ def buildRelease(ctx):
827827
"git diff",
828828
"git status",
829829
"pnpm build:tokens",
830+
"bash -c '[ \"%s\" == \"design-system\" ] && pnpm --filter \"%s\" vite build || true'" % (package, full_package_name),
830831
"bash -c '[ \"%s\" == \"web-client\" ] && pnpm --filter \"%s\" vite build || true'" % (package, full_package_name),
831832
"bash -c '[ \"%s\" == \"web-pkg\" ] && pnpm --filter \"%s\" vite build || true'" % (package, full_package_name),
832833
"bash -c '[ \"%s\" == \"web-test-helpers\" ] && pnpm --filter \"%s\" vite build || true'" % (package, full_package_name),

packages/design-system/package.json

+79-27
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ownclouders/design-system",
3-
"version": "15.0.0-alpha.1",
3+
"version": "10.3.0",
44
"description": "ownCloud Design System is based on VueDesign Systems and is used to design ownCloud UI components",
55
"keywords": [
66
"vue design system",
@@ -13,12 +13,13 @@
1313
"homepage": "https://owncloud.design/",
1414
"repository": {
1515
"type": "git",
16-
"url": "git+https://github.com/owncloud/web.git"
16+
"url": "https://github.com/owncloud/web",
17+
"directory": "packages/design-system"
1718
},
1819
"license": "AGPL-3.0",
1920
"author": "ownClouders",
2021
"main": "src/index.ts",
21-
"types": "types.d.ts",
22+
"private": false,
2223
"scripts": {
2324
"start": "npm-run-all --parallel styleguide tokens:w",
2425
"build:docs": "npm-run-all tokens styleguide:build",
@@ -28,7 +29,10 @@
2829
"styleguide": "vue-styleguidist server --open --config ./config/docs.config.js",
2930
"styleguide:build": "vue-styleguidist build --config ./config/docs.config.js",
3031
"tokens": "node build/build-tokens.js",
31-
"tokens:w": "onchange -i \"./src/tokens/**/*.json\" -- npm run tokens"
32+
"tokens:w": "onchange -i \"./src/tokens/**/*.json\" -- npm run tokens",
33+
"vite": "vite",
34+
"prepublishOnly": "rm -rf ./package && clean-publish && find package && cat package/package.json",
35+
"postpublish": "rm -rf ./package"
3236
},
3337
"browserslist": [
3438
"> 1%",
@@ -39,13 +43,67 @@
3943
"not OperaMini all",
4044
"not OperaMobile > 0"
4145
],
46+
"files": [
47+
"dist/"
48+
],
49+
"publishConfig": {
50+
"directory": "package",
51+
"linkDirectory": false,
52+
"exports": {
53+
".": {
54+
"default": "./dist/design-system.js",
55+
"require": "./dist/design-system.cjs",
56+
"types": "./dist/src/index.d.ts"
57+
},
58+
"./components": {
59+
"default": "./dist/design-system/components.js",
60+
"require": "./dist/design-system/components.cjs",
61+
"types": "./dist/src/components/index.d.ts"
62+
},
63+
"./composables": {
64+
"default": "./dist/design-system/composables.js",
65+
"require": "./dist/design-system/composables.cjs",
66+
"types": "./dist/src/composables/index.d.ts"
67+
},
68+
"./helpers": {
69+
"default": "./dist/design-system/helpers.js",
70+
"require": "./dist/design-system/helpers.cjs",
71+
"types": "./dist/src/helpers/index.d.ts"
72+
}
73+
}
74+
},
75+
"exports": {
76+
".": {
77+
"default": "./src/index.ts"
78+
},
79+
"./components": {
80+
"default": "./src/components/index.ts"
81+
},
82+
"./composables": {
83+
"default": "./src/composables/index.ts"
84+
},
85+
"./helpers": {
86+
"default": "./src/helpers/index.ts"
87+
},
88+
"./l10n": {
89+
"default": "./l10n/translations.json"
90+
}
91+
},
4292
"dependencies": {
43-
"@emoji-mart/data": "1.2.1",
93+
"@emoji-mart/data": "^1.2.1",
4494
"@popperjs/core": "^2.11.5",
95+
"deepmerge": "^4.2.2",
4596
"emoji-mart": "5.6.0",
97+
"focus-trap-vue": "^4.0.1",
98+
"focus-trap": "^7.6.0",
99+
"fuse.js": "^7.0.0",
100+
"lodash-es": "^4.17.21",
101+
"luxon": "^3.5.0",
46102
"tippy.js": "^6.3.7",
47-
"vue-inline-svg": "3.1.4",
103+
"vue-inline-svg": "^3.1.4",
104+
"vue-router": "^4.2.5",
48105
"vue-select": "4.0.0-beta.6",
106+
"vue3-gettext": "^2.4.0",
49107
"webfontloader": "^1.6.28"
50108
},
51109
"devDependencies": {
@@ -58,67 +116,61 @@
58116
"@codemirror/state": "^6.4.0",
59117
"@codemirror/view": "^6.23.0",
60118
"@lezer/highlight": "^1.2.0",
119+
"@ownclouders/web-test-helpers": "workspace:*",
120+
"@vitejs/plugin-vue": "5.1.4",
61121
"autoprefixer": "10.4.20",
62122
"babel-core": "7.0.0-bridge.0",
63123
"babel-loader": "^9.0.0",
64124
"babel-plugin-require-context-hook": "^1.0.0",
65125
"chalk": "^4.1.2",
126+
"clean-publish": "^5.0.0",
66127
"compression-webpack-plugin": "^11.0.0",
67128
"copy-webpack-plugin": "^12.0.0",
68129
"css-loader": "7.1.2",
69130
"glob": "^11.0.0",
70131
"mini-css-extract-plugin": "^2.0.0",
71132
"node-notifier": "^10.0.0",
72-
"npm": "^10.0.0",
73133
"npm-run-all2": "^6.0.0",
134+
"npm": "^10.0.0",
135+
"onchange": "^7.1.0",
74136
"optimize-css-assets-webpack-plugin": "^6.0.1",
75137
"postcss-loader": "8.1.1",
76138
"postcss-nested": "^6.0.1",
77139
"postcss-safe-parser": "7.0.1",
78140
"postcss-simple-vars": "^7.0.1",
79141
"process": "^0.11.10",
80-
"react": "^18.2.0",
81142
"react-dom": "^18.2.0",
82-
"sass": "1.79.5",
143+
"react": "^18.2.0",
83144
"sass-loader": "10.5.2",
84145
"sass-resources-loader": "^2.2.5",
146+
"sass": "1.79.5",
85147
"semver": "7.6.3",
86148
"shelljs": "^0.8.3",
87149
"style-dictionary": "^3.9.1",
88150
"style-loader": "^4.0.0",
89151
"style-value-types": "^5.0.0",
90-
"stylelint": "16.10.0",
91152
"stylelint-config-sass-guidelines": "^12.0.0",
92153
"stylelint-config-standard": "^36.0.0",
154+
"stylelint": "16.10.0",
93155
"tinycolor2": "^1.6.0",
94156
"ts-loader": "^9.5.1",
95157
"typescript": "5.6.3",
96-
"url": "^0.11.3",
97158
"url-loader": "^4.1.1",
159+
"url": "^0.11.3",
160+
"vite-plugin-dts": "^4.2.3",
161+
"vite-plugin-node-polyfills": "^0.22.0",
162+
"vite": "^5.4.8",
98163
"vue-loader": "^17.4.2",
99164
"vue-style-loader": "^4.1.3",
100165
"vue-styleguidist": "^4.72.4",
101-
"@ownclouders/web-test-helpers": "workspace:*",
102-
"webpack": "^5.89.0",
103166
"webpack-bundle-analyzer": "^4.10.1",
104-
"webpack-merge": "^6.0.0",
105167
"webpack-merge-and-include-globally": "^2.3.4",
168+
"webpack-merge": "^6.0.0",
106169
"webpack-node-externals": "^3.0.0",
170+
"webpack": "^5.89.0",
107171
"yaml": "^2.3.4"
108172
},
109173
"peerDependencies": {
110-
"deepmerge": "^4.2.2",
111-
"focus-trap-vue": "^4.0.1",
112-
"focus-trap": "7.6.0",
113-
"fuse.js": "7.0.0",
114-
"lodash-es": "4.17.21",
115-
"luxon": "3.5.0",
116-
"vue-router": "4.2.5",
117-
"vue": "3.5.12",
118-
"vue3-gettext": "2.4.0"
119-
},
120-
"engines": {
121-
"node": ">= 14.0.0",
122-
"npm": ">= 3.0.0"
174+
"vue": "^3.5.11"
123175
}
124176
}

packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@
107107
<script lang="ts">
108108
import { computed, defineComponent, nextTick, PropType, ref, unref, watch } from 'vue'
109109
import { useGettext } from 'vue3-gettext'
110-
111-
import { AVAILABLE_SIZES, EVENT_ITEM_DROPPED_BREADCRUMB } from '../../helpers/constants'
112-
110+
import {
111+
AVAILABLE_SIZES,
112+
EVENT_ITEM_DROPPED_BREADCRUMB,
113+
uniqueId,
114+
BreadcrumbItem
115+
} from '../../helpers'
113116
import OcButton from '../OcButton/OcButton.vue'
114117
import OcDrop from '../OcDrop/OcDrop.vue'
115118
import OcIcon from '../OcIcon/OcIcon.vue'
116-
import uniqueId from '../../utils/uniqueId'
117-
118-
import { BreadcrumbItem } from './types'
119119
import { RouteLocationPathRaw } from 'vue-router'
120120
121121
/**

packages/design-system/src/components/OcBreadcrumb/types.ts

-11
This file was deleted.

packages/design-system/src/components/OcButton/OcButton.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<script lang="ts">
1616
import { defineComponent, PropType } from 'vue'
1717
import { RouteLocationRaw } from 'vue-router'
18-
import { getSizeClass } from '../../utils/sizeClasses'
18+
import { getSizeClass } from '../../helpers'
1919
2020
export default defineComponent({
2121
name: 'OcButton',

packages/design-system/src/components/OcCheckbox/OcCheckbox.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
<script lang="ts">
1919
import { defineComponent, PropType } from 'vue'
2020
import { isEqual } from 'lodash-es'
21-
import { getSizeClass } from '../../utils/sizeClasses'
22-
import uniqueId from '../../utils/uniqueId'
21+
import { getSizeClass, uniqueId } from '../../helpers'
2322
2423
/**
2524
* A checkbox input element. The checkbox is either checked or unchecked.

packages/design-system/src/components/OcContextualHelper/OcContextualHelper.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<script lang="ts">
1111
import { PropType, defineComponent } from 'vue'
12-
import uniqueId from '../../utils/uniqueId'
12+
import { uniqueId } from '../../helpers'
1313
import OcButton from '../OcButton/OcButton.vue'
1414
import OcIcon from '../OcIcon/OcIcon.vue'
1515
import OcInfoDrop from '../OcInfoDrop/OcInfoDrop.vue'

packages/design-system/src/components/OcDrop/OcDrop.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { shallowMount, mount } from '@ownclouders/web-test-helpers'
22
import Drop from './OcDrop.vue'
3-
import { getSizeClass } from '../../utils/sizeClasses'
3+
import { getSizeClass } from '../../helpers'
44

55
const dom = ({ position = 'auto', mode = 'click', paddingSize = 'medium' } = {}) => {
66
document.body.innerHTML = ''

packages/design-system/src/components/OcDrop/OcDrop.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ import { Modifier } from '@popperjs/core'
1616
import { detectOverflow } from '@popperjs/core'
1717
import { destroy, hideOnEsc } from '../../directives/OcTooltip'
1818
import { AVAILABLE_SIZES } from '../../helpers/constants'
19-
import uniqueId from '../../utils/uniqueId'
20-
import { getSizeClass } from '../../utils/sizeClasses'
19+
import { getSizeClass, uniqueId } from '../../helpers'
2120
import { defineComponent, onBeforeUnmount, onMounted, ref, unref, useTemplateRef } from 'vue'
2221
2322
/**

packages/design-system/src/components/OcFilterChip/OcFilterChip.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
<script lang="ts">
5353
import { computed, defineComponent, PropType, ref, unref } from 'vue'
54-
import uniqueId from '../../utils/uniqueId'
54+
import { uniqueId } from '../../helpers'
5555
import OcDrop from '../OcDrop/OcDrop.vue'
5656
5757
export default defineComponent({

packages/design-system/src/components/OcIcon/OcIcon.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
import { defineComponent } from 'vue'
2525
import InlineSvg from 'vue-inline-svg'
2626
import { AVAILABLE_SIZES } from '../../helpers/constants'
27-
import { getSizeClass } from '../../utils/sizeClasses'
28-
import uniqueId from '../../utils/uniqueId'
27+
import { getSizeClass, uniqueId } from '../../helpers'
2928
3029
/**
3130
* Icons are used to visually communicate core parts of the product and

packages/design-system/src/components/OcInfoDrop/OcInfoDrop.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import { defineComponent, PropType, ref } from 'vue'
4949
import OcButton from '../OcButton/OcButton.vue'
5050
import OcIcon from '../OcIcon/OcIcon.vue'
5151
import OcDrop from '../OcDrop/OcDrop.vue'
52-
import uniqueId from '../../utils/uniqueId'
52+
import { uniqueId } from '../../helpers'
5353
import { FocusTrap } from 'focus-trap-vue'
5454
import { ContextualHelperDataListItem } from '../../helpers'
5555

packages/design-system/src/components/OcPageSize/OcPageSize.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
<script lang="ts">
2626
import { defineComponent } from 'vue'
27-
import uniqueId from '../../utils/uniqueId'
27+
import { uniqueId } from '../../helpers'
2828
import OcSelect from '../OcSelect/OcSelect.vue'
2929
3030
/**

packages/design-system/src/components/OcRadio/OcRadio.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
<script lang="ts">
1818
import { defineComponent } from 'vue'
1919
20-
import { getSizeClass } from '../../utils/sizeClasses'
21-
import uniqueId from '../../utils/uniqueId'
20+
import { getSizeClass, uniqueId } from '../../helpers'
21+
2222
/**
2323
* The radio element. Can be grouped to give the user to choose between different options.
2424
*/

packages/design-system/src/components/OcRecipient/OcRecipient.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defaultPlugins, shallowMount } from '@ownclouders/web-test-helpers'
22
import Recipient from './OcRecipient.vue'
3-
import { Recipient as RecipientType } from './types'
3+
import { Recipient as RecipientType } from '../../helpers'
44

55
describe('OcRecipient', () => {
66
function getWrapper(props: Partial<RecipientType> = undefined, slot: string = undefined) {

packages/design-system/src/components/OcRecipient/OcRecipient.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import { defineComponent, PropType } from 'vue'
3838
import OcAvatar from '../OcAvatar/OcAvatar.vue'
3939
import OcIcon from '../OcIcon/OcIcon.vue'
4040
import OcSpinner from '../OcSpinner/OcSpinner.vue'
41-
import { Recipient } from './types'
41+
import { Recipient } from '../../helpers'
4242
4343
export default defineComponent({
4444
name: 'OcRecipient',

packages/design-system/src/components/OcRecipient/types.ts

-10
This file was deleted.

packages/design-system/src/components/OcSelect/OcSelect.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292

9393
<script lang="ts">
9494
import Fuse from 'fuse.js'
95-
import uniqueId from '../../utils/uniqueId'
95+
import { uniqueId } from '../../helpers'
9696
import {
9797
defineComponent,
9898
ComponentPublicInstance,

packages/design-system/src/components/OcSpinner/OcSpinner.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<script lang="ts">
66
import { defineComponent } from 'vue'
7-
import { getSizeClass } from '../../utils/sizeClasses'
7+
import { getSizeClass } from '../../helpers'
88
99
/**
1010
* Remote actions can take an undefined portion of time. The spinner gives feedback to the users about an actions being processed.

packages/design-system/src/components/OcStatusIndicators/OcStatusIndicators.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
import { defineComponent, PropType, ref, unref } from 'vue'
5252
import OcIcon from '../OcIcon/OcIcon.vue'
5353
import OcButton from '../OcButton/OcButton.vue'
54-
import uniqueId from '../../utils/uniqueId'
54+
import { uniqueId } from '../../helpers'
5555
5656
type Indicator = {
5757
id: string

packages/design-system/src/components/OcSwitch/OcSwitch.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<script lang="ts">
1616
import { defineComponent } from 'vue'
1717
18-
import uniqueId from '../../utils/uniqueId'
18+
import { uniqueId } from '../../helpers'
1919
2020
/**
2121
* The switch has two states between users can choose.

0 commit comments

Comments
 (0)