@speckle/ui-components 2.18.16 → 2.19.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/dist/style.css CHANGED
@@ -1 +1 @@
1
- .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme=mention]{background:none;pointer-events:none}.tippy-box[data-theme=mention] .tippy-arrow{display:none}.tippy-box[data-theme=mention] .tippy-content>*{pointer-events:auto}.icon-slot[data-v-ee26d682]:empty{display:none}.swoosher[data-v-89e77cae]{width:100%;height:100%;animation:swoosh-89e77cae 1s infinite linear;transform-origin:0% 30%}@keyframes swoosh-89e77cae{0%{transform:translate(0) scaleX(0)}40%{transform:translate(0) scaleX(.4)}to{transform:translate(100%) scaleX(.5)}}
1
+ .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme=mention]{background:none;pointer-events:none}.tippy-box[data-theme=mention] .tippy-arrow{display:none}.tippy-box[data-theme=mention] .tippy-content>*{pointer-events:auto}.icon-slot[data-v-ad210086]:empty{display:none}.swoosher[data-v-985badae]{width:100%;height:100%;animation:swoosh-985badae 1s infinite linear;transform-origin:0% 30%}@keyframes swoosh-985badae{0%{transform:translate(0) scaleX(0)}40%{transform:translate(0) scaleX(.4)}to{transform:translate(100%) scaleX(.5)}}html.dialog-open{overflow:visible!important}html.dialog-open body{overflow:hidden!important}.hide-scrollbar::-webkit-scrollbar{display:none}.hide-scrollbar{-ms-overflow-style:none;scrollbar-width:none}
@@ -0,0 +1,153 @@
1
+ import {
2
+ baseConfigs,
3
+ globals,
4
+ getESMDirname,
5
+ prettierConfig
6
+ } from '../../eslint.config.mjs'
7
+ import tseslint from 'typescript-eslint'
8
+ import pluginVue from 'eslint-plugin-vue'
9
+ import pluginVueA11y from 'eslint-plugin-vuejs-accessibility'
10
+ import { omit } from 'lodash-es'
11
+
12
+ const tsParserOptions = {
13
+ tsconfigRootDir: getESMDirname(import.meta.url),
14
+ project: ['./tsconfig.json', './tsconfig.node.json'],
15
+ extraFileExtensions: ['.vue']
16
+ }
17
+
18
+ /**
19
+ * Base configs that should be inherited in all packages as well
20
+ * @type {Array<import('eslint').Linter.FlatConfig>}
21
+ */
22
+ const configs = [
23
+ ...baseConfigs,
24
+ {
25
+ ignores: ['storybook-static', 'utils/tailwind-configure.d.ts']
26
+ },
27
+ {
28
+ rules: {
29
+ 'no-alert': 'error',
30
+ eqeqeq: ['error', 'always', { null: 'always' }],
31
+ 'no-console': 'off',
32
+ 'no-var': 'error'
33
+ }
34
+ },
35
+ {
36
+ files: ['**/*.js'],
37
+ languageOptions: {
38
+ sourceType: 'module'
39
+ }
40
+ },
41
+ {
42
+ files: ['*.test.{ts,js}'],
43
+ languageOptions: {
44
+ globals: {
45
+ ...globals.jest
46
+ }
47
+ }
48
+ },
49
+ {
50
+ files: ['./src/*.{js,ts,vue}'],
51
+ languageOptions: {
52
+ globals: {
53
+ ...globals.browser
54
+ }
55
+ }
56
+ },
57
+ // TS
58
+ ...tseslint.configs.recommendedTypeChecked.map((c) => ({
59
+ ...c,
60
+ files: [...(c.files || []), '**/*.ts', '**/*.d.ts', '**/*.vue']
61
+ })),
62
+ {
63
+ files: ['**/*.ts', '**/*.d.ts'],
64
+ languageOptions: {
65
+ parserOptions: {
66
+ ...tsParserOptions
67
+ }
68
+ }
69
+ },
70
+
71
+ ...pluginVue.configs['flat/recommended'].map((config) => ({
72
+ ...config,
73
+ files: [...(config.files || []), '**/*.vue']
74
+ })),
75
+ ...pluginVueA11y.configs['flat/recommended'].map((c) => ({
76
+ ...c,
77
+ files: [...(c.files || []), '**/*.vue'],
78
+ languageOptions: c.languageOptions
79
+ ? omit(c.languageOptions, ['parserOptions', 'parser', 'globals']) // Prevent overriding parser & globals
80
+ : undefined
81
+ })),
82
+ {
83
+ files: ['**/*.vue'],
84
+ languageOptions: {
85
+ parserOptions: {
86
+ parser: tseslint.parser,
87
+ ...tsParserOptions
88
+ }
89
+ }
90
+ },
91
+ {
92
+ files: ['**/*.{ts,tsx,vue}'],
93
+ rules: {
94
+ '@typescript-eslint/no-explicit-any': ['error'],
95
+ '@typescript-eslint/no-unsafe-argument': ['error'],
96
+ '@typescript-eslint/no-unsafe-assignment': 'error',
97
+ '@typescript-eslint/no-unsafe-call': 'error',
98
+ '@typescript-eslint/no-unsafe-member-access': 'error',
99
+ '@typescript-eslint/no-unsafe-return': 'error',
100
+ '@typescript-eslint/no-for-in-array': ['error'],
101
+ '@typescript-eslint/restrict-template-expressions': ['error'],
102
+ '@typescript-eslint/restrict-plus-operands': ['error'],
103
+ '@typescript-eslint/await-thenable': ['warn'],
104
+ '@typescript-eslint/ban-types': ['warn'],
105
+ 'require-await': 'off',
106
+ '@typescript-eslint/require-await': 'error',
107
+ 'no-undef': 'off',
108
+ '@typescript-eslint/no-redundant-type-constituents': 'off' // too restrictive
109
+ }
110
+ },
111
+ {
112
+ files: ['**/*.vue'],
113
+ rules: {
114
+ 'vue/component-tags-order': [
115
+ 'error',
116
+ { order: ['docs', 'template', 'script', 'style'] }
117
+ ],
118
+ 'vue/require-default-prop': 'off',
119
+ 'vue/multi-word-component-names': 'off',
120
+ 'vue/component-name-in-template-casing': [
121
+ 'error',
122
+ 'PascalCase',
123
+ { registeredComponentsOnly: false }
124
+ ],
125
+ 'vuejs-accessibility/label-has-for': [
126
+ 'error',
127
+ {
128
+ required: {
129
+ some: ['nesting', 'id']
130
+ }
131
+ }
132
+ ]
133
+ }
134
+ },
135
+ {
136
+ files: ['**/*.stories.{js,ts}'],
137
+ rules: {
138
+ // storybook types suck and can't be augmented
139
+ '@typescript-eslint/no-unsafe-call': 'off'
140
+ }
141
+ },
142
+ {
143
+ files: ['**/*.d.ts'],
144
+ rules: {
145
+ 'no-var': 'off',
146
+ '@typescript-eslint/no-explicit-any': 'off',
147
+ '@typescript-eslint/ban-types': 'off'
148
+ }
149
+ },
150
+ prettierConfig
151
+ ]
152
+
153
+ export default configs
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@speckle/ui-components",
3
3
  "description": "Speckle theme UI components built with Vue 3 & Tailwind",
4
- "version": "2.18.16",
4
+ "version": "2.19.2",
5
5
  "scripts": {
6
6
  "dev": "vite",
7
7
  "build": "vue-tsc && vite build",
@@ -12,15 +12,22 @@
12
12
  "storybook:test:ci": "concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"yarn build-storybook --quiet && npx http-server storybook-static --port 6006 --silent\" \"wait-on tcp:6006 && yarn test-storybook --ci\"",
13
13
  "storybook:test:watch": "test-storybook --watch",
14
14
  "chromatic": "chromatic --exit-zero-on-changes --exit-once-uploaded",
15
- "lint:js": "eslint --ext \".js,.ts,.vue\" .",
15
+ "lint:js": "eslint .",
16
16
  "lint:tsc": "vue-tsc --noEmit",
17
17
  "lint:prettier": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --check .",
18
+ "lint:ci": "yarn lint:tsc",
18
19
  "lint": "yarn lint:js && yarn lint:tsc && yarn lint:prettier"
19
20
  },
20
21
  "type": "module",
21
22
  "main": "./dist/lib.cjs",
22
23
  "module": "./dist/lib.js",
23
24
  "types": "./dist/lib.d.ts",
25
+ "imports": {
26
+ "#lodash": {
27
+ "require": "lodash",
28
+ "import": "lodash-es"
29
+ }
30
+ },
24
31
  "exports": {
25
32
  ".": {
26
33
  "import": "./dist/lib.js",
@@ -40,7 +47,8 @@
40
47
  "dependencies": {
41
48
  "@headlessui/vue": "^1.7.18",
42
49
  "@heroicons/vue": "^2.0.12",
43
- "@speckle/shared": "^2.18.16",
50
+ "@speckle/shared": "^2.19.2",
51
+ "@storybook/test": "^8.1.10",
44
52
  "@vueuse/core": "^9.13.0",
45
53
  "lodash": "^4.0.0",
46
54
  "lodash-es": "^4.0.0",
@@ -54,37 +62,34 @@
54
62
  "@babel/preset-env": "^7.21.5",
55
63
  "@babel/preset-react": "^7.18.6",
56
64
  "@rollup/plugin-typescript": "^11.1.0",
57
- "@speckle/tailwind-theme": "^2.18.16",
58
- "@storybook/addon-essentials": "^7.3.2",
59
- "@storybook/addon-interactions": "^7.3.2",
60
- "@storybook/addon-links": "^7.3.2",
61
- "@storybook/blocks": "^7.3.2",
62
- "@storybook/jest": "^0.2.1",
63
- "@storybook/test-runner": "^0.13.0",
64
- "@storybook/testing-library": "^0.2.0",
65
- "@storybook/vue3": "^7.3.2",
66
- "@storybook/vue3-vite": "^7.3.2",
67
- "@types/eslint": "^8.4.5",
65
+ "@speckle/tailwind-theme": "^2.19.2",
66
+ "@storybook/addon-essentials": "^8.1.10",
67
+ "@storybook/addon-interactions": "^8.1.10",
68
+ "@storybook/addon-links": "^8.1.10",
69
+ "@storybook/blocks": "^8.1.10",
70
+ "@storybook/test-runner": "^0.18.2",
71
+ "@storybook/vue3": "^8.1.10",
72
+ "@storybook/vue3-vite": "^8.1.10",
73
+ "@types/eslint": "^8.56.10",
68
74
  "@types/lodash": "^4.0.0",
69
- "@typescript-eslint/eslint-plugin": "^5.38.1",
70
- "@typescript-eslint/parser": "^5.38.1",
75
+ "@types/lodash-es": "^4.17.12",
76
+ "@typescript-eslint/eslint-plugin": "^7.12.0",
77
+ "@typescript-eslint/parser": "^7.12.0",
71
78
  "@vitejs/plugin-vue": "^4.5.0",
72
79
  "autoprefixer": "^10.4.14",
73
80
  "browserify-zlib": "^0.2.0",
74
81
  "chromatic": "^6.17.4",
75
82
  "concurrently": "^8.0.1",
76
- "eslint": "^8.24.0",
77
- "eslint-config-prettier": "^8.5.0",
78
- "eslint-plugin-storybook": "^0.6.13",
79
- "eslint-plugin-vue": "^9.5.1",
80
- "eslint-plugin-vuejs-accessibility": "^1.2.0",
83
+ "eslint": "^9.4.0",
84
+ "eslint-config-prettier": "^9.1.0",
85
+ "eslint-plugin-storybook": "^0.8.0",
86
+ "eslint-plugin-vue": "^9.26.0",
87
+ "eslint-plugin-vuejs-accessibility": "^2.3.0",
81
88
  "postcss": "^8.4.31",
82
89
  "postcss-nesting": "^10.2.0",
83
90
  "prettier": "^2.7.1",
84
- "react": "^18.2.0",
85
- "react-dom": "^18.2.0",
86
91
  "rollup-plugin-node-builtins": "^2.1.2",
87
- "storybook": "^7.3.2",
92
+ "storybook": "^8.1.10",
88
93
  "tailwindcss": "^3.3.2",
89
94
  "type-fest": "^2.13.1",
90
95
  "typescript": "^5.0.4",
package/tsconfig.json CHANGED
@@ -24,7 +24,7 @@
24
24
  /* Extra */
25
25
  "paths": {
26
26
  "~~/src/*": ["./src/*"],
27
- "@speckle/shared": ["../shared/dist-esm/index"]
27
+ "@speckle/shared": ["../shared/dist/esm/index"]
28
28
  }
29
29
  },
30
30
  "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
package/.eslintrc.cjs DELETED
@@ -1,118 +0,0 @@
1
- const mainExtends = [
2
- 'plugin:vue/vue3-recommended',
3
- 'plugin:storybook/recommended',
4
- 'prettier'
5
- ]
6
-
7
- /** @type {import('eslint').Linter.Config} */
8
- const config = {
9
- env: {
10
- node: true
11
- },
12
-
13
- extends: [...mainExtends],
14
- ignorePatterns: ['storybook-static', '!.storybook', 'tailwind-configure.d.ts'],
15
- rules: {
16
- 'no-alert': 'error',
17
- eqeqeq: ['error', 'always', { null: 'always' }],
18
- 'no-console': 'off',
19
- 'no-var': 'error'
20
- },
21
- parserOptions: {
22
- ecmaVersion: 2022,
23
- sourceType: 'module'
24
- },
25
- overrides: [
26
- {
27
- files: '*.test.{ts,js}',
28
- env: {
29
- jest: true
30
- }
31
- },
32
- {
33
- files: './src/*.{js,ts,vue}',
34
- env: {
35
- node: false,
36
- browser: true
37
- }
38
- },
39
- {
40
- files: '*.{ts,tsx,vue}',
41
- extends: ['plugin:@typescript-eslint/recommended', ...mainExtends],
42
- rules: {
43
- '@typescript-eslint/no-explicit-any': ['error'],
44
- '@typescript-eslint/no-unsafe-argument': ['error'],
45
- '@typescript-eslint/no-unsafe-assignment': 'error',
46
- '@typescript-eslint/no-unsafe-call': 'error',
47
- '@typescript-eslint/no-unsafe-member-access': 'error',
48
- '@typescript-eslint/no-unsafe-return': 'error',
49
- '@typescript-eslint/no-for-in-array': ['error'],
50
- '@typescript-eslint/restrict-template-expressions': ['error'],
51
- '@typescript-eslint/restrict-plus-operands': ['error'],
52
- '@typescript-eslint/await-thenable': ['warn'],
53
- '@typescript-eslint/ban-types': ['warn'],
54
- 'require-await': 'off',
55
- '@typescript-eslint/require-await': 'error',
56
- 'no-undef': 'off'
57
- },
58
- parserOptions: {
59
- ecmaVersion: 2022,
60
- sourceType: 'module',
61
- parser: '@typescript-eslint/parser',
62
- tsconfigRootDir: __dirname,
63
- project: ['./tsconfig.json', './tsconfig.node.json'],
64
- extraFileExtensions: ['.vue']
65
- },
66
- plugins: ['@typescript-eslint']
67
- },
68
- {
69
- files: '*.vue',
70
- plugins: ['vuejs-accessibility'],
71
- extends: [
72
- 'plugin:@typescript-eslint/recommended',
73
- ...mainExtends,
74
- 'plugin:vuejs-accessibility/recommended'
75
- ],
76
- rules: {
77
- 'vue/component-tags-order': [
78
- 'error',
79
- { order: ['docs', 'template', 'script', 'style'] }
80
- ],
81
- 'vue/require-default-prop': 'off',
82
- 'vue/multi-word-component-names': 'off',
83
- 'vue/component-name-in-template-casing': [
84
- 'error',
85
- 'PascalCase',
86
- { registeredComponentsOnly: false }
87
- ],
88
- 'vuejs-accessibility/label-has-for': [
89
- 'error',
90
- {
91
- required: {
92
- some: ['nesting', 'id']
93
- }
94
- }
95
- ]
96
- }
97
- },
98
- {
99
- files: '*.d.ts',
100
- rules: {
101
- 'no-var': 'off',
102
- '@typescript-eslint/no-explicit-any': 'off',
103
- '@typescript-eslint/ban-types': 'off'
104
- }
105
- },
106
- {
107
- files: '*.stories.{js,ts}',
108
- rules: {
109
- // this one feels busted, tells me to await synchronous calls
110
- 'storybook/await-interactions': 'off',
111
- // storybook types suck and can't be augmented
112
- '@typescript-eslint/no-unsafe-call': 'off'
113
- }
114
- }
115
- ]
116
- }
117
-
118
- module.exports = config
@@ -1,25 +0,0 @@
1
- import type { LayoutTabItem } from '../../helpers/layout/components';
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
3
- items: LayoutTabItem<any>[];
4
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
5
- items: LayoutTabItem<any>[];
6
- }>>>, {}, {}>, {
7
- default?(_: {
8
- activeItem: LayoutTabItem<any>;
9
- }): any;
10
- }>;
11
- export default _default;
12
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
13
- type __VLS_TypePropsToRuntimeProps<T> = {
14
- [K in keyof T]-?: {} extends Pick<T, K> ? {
15
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
16
- } : {
17
- type: import('vue').PropType<T[K]>;
18
- required: true;
19
- };
20
- };
21
- type __VLS_WithTemplateSlots<T, S> = T & {
22
- new (): {
23
- $slots: S;
24
- };
25
- };