@speckle/ui-components 2.12.666
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/.eslintrc.cjs +118 -0
- package/README.md +60 -0
- package/dist/components/SourceAppBadge.vue.d.ts +14 -0
- package/dist/components/common/Badge.vue.d.ts +65 -0
- package/dist/components/common/loading/Bar.vue.d.ts +13 -0
- package/dist/components/common/steps/Bullet.vue.d.ts +65 -0
- package/dist/components/common/steps/Number.vue.d.ts +57 -0
- package/dist/components/common/text/Link.vue.d.ts +106 -0
- package/dist/components/form/Button.vue.d.ts +256 -0
- package/dist/components/form/CardButton.vue.d.ts +24 -0
- package/dist/components/form/Checkbox.vue.d.ts +194 -0
- package/dist/components/form/TextArea.vue.d.ts +152 -0
- package/dist/components/form/TextInput.vue.d.ts +301 -0
- package/dist/components/form/select/Base.vue.d.ts +283 -0
- package/dist/components/form/select/SourceApps.vue.d.ts +126 -0
- package/dist/components/global/ToastRenderer.vue.d.ts +17 -0
- package/dist/composables/common/steps.d.ts +24 -0
- package/dist/composables/form/input.d.ts +6 -0
- package/dist/composables/form/select.d.ts +29 -0
- package/dist/composables/form/textInput.d.ts +44 -0
- package/dist/composables/layout/resize.d.ts +36 -0
- package/dist/helpers/common/components.d.ts +11 -0
- package/dist/helpers/common/validation.d.ts +23 -0
- package/dist/helpers/form/input.d.ts +9 -0
- package/dist/helpers/global/toast.d.ts +22 -0
- package/dist/helpers/tailwind.d.ts +19 -0
- package/dist/lib.cjs +1 -0
- package/dist/lib.d.ts +24 -0
- package/dist/lib.js +2155 -0
- package/dist/style.css +1 -0
- package/index.html +12 -0
- package/package.json +99 -0
- package/postcss.config.js +7 -0
- package/tailwind.config.cjs +14 -0
- package/tsconfig.json +31 -0
- package/tsconfig.node.json +10 -0
- package/utils/tailwind-configure.cjs +15 -0
- package/utils/tailwind-configure.d.ts +1 -0
- package/utils/tailwind-configure.js +13 -0
- package/vite.config.ts +48 -0
package/dist/style.css
ADDED
|
@@ -0,0 +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}.icon-slot[data-v-c331f2ef]:empty{display:none}.basic[data-v-56fc6520]>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0 !important;margin-right:calc(1rem * var(--tw-space-x-reverse))!important;margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))!important}.swoosher[data-v-60cf597b]{width:100%;height:100%;animation:swoosh-60cf597b 1s infinite linear;transform-origin:0% 30%}@keyframes swoosh-60cf597b{0%{transform:translate(0) scaleX(0)}40%{transform:translate(0) scaleX(.4)}to{transform:translate(100%) scaleX(.5)}}
|
package/index.html
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Vite + Vue + TS</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="app"></div>
|
|
10
|
+
<script type="module" src="/src/main.ts"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@speckle/ui-components",
|
|
3
|
+
"description": "Speckle theme UI components built with Vue 3 & Tailwind",
|
|
4
|
+
"version": "2.12.666",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "vite",
|
|
7
|
+
"build": "vue-tsc && vite build",
|
|
8
|
+
"preview": "vite preview",
|
|
9
|
+
"storybook": "storybook dev -p 6006",
|
|
10
|
+
"build-storybook": "storybook build",
|
|
11
|
+
"storybook:test": "test-storybook",
|
|
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
|
+
"storybook:test:watch": "test-storybook --watch",
|
|
14
|
+
"chromatic": "chromatic --exit-zero-on-changes --exit-once-uploaded",
|
|
15
|
+
"lint:js": "eslint --ext \".js,.ts,.vue\" .",
|
|
16
|
+
"lint:tsc": "vue-tsc --noEmit",
|
|
17
|
+
"lint:prettier": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --check .",
|
|
18
|
+
"lint": "yarn lint:js && yarn lint:tsc && yarn lint:prettier"
|
|
19
|
+
},
|
|
20
|
+
"type": "module",
|
|
21
|
+
"main": "./dist/lib.cjs",
|
|
22
|
+
"module": "./dist/lib.js",
|
|
23
|
+
"types": "./dist/lib.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"import": "./dist/lib.js",
|
|
27
|
+
"types": "./dist/lib.d.ts",
|
|
28
|
+
"require": "./dist/lib.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./style.css": "./dist/style.css",
|
|
31
|
+
"./tailwind-configure": {
|
|
32
|
+
"import": "./utils/tailwind-configure.js",
|
|
33
|
+
"require": "./utils/tailwind-configure.cjs",
|
|
34
|
+
"types": "./utils/tailwind-configure.d.ts"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"vue": "^3.0.0"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@headlessui/vue": "^1.7.13",
|
|
42
|
+
"@heroicons/vue": "^2.0.12",
|
|
43
|
+
"@speckle/shared": "^2.12.666",
|
|
44
|
+
"@vueuse/core": "^9.13.0",
|
|
45
|
+
"lodash": "^4.0.0",
|
|
46
|
+
"lodash-es": "^4.0.0",
|
|
47
|
+
"nanoid": "^3.0.0",
|
|
48
|
+
"vee-validate": "^4.7.0",
|
|
49
|
+
"vue-tippy": "^6.0.0"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@babel/preset-env": "^7.21.5",
|
|
53
|
+
"@babel/preset-react": "^7.18.6",
|
|
54
|
+
"@rollup/plugin-typescript": "^11.1.0",
|
|
55
|
+
"@speckle/tailwind-theme": "^2.12.666",
|
|
56
|
+
"@storybook/addon-essentials": "^7.0.10",
|
|
57
|
+
"@storybook/addon-interactions": "^7.0.10",
|
|
58
|
+
"@storybook/addon-links": "^7.0.10",
|
|
59
|
+
"@storybook/blocks": "^7.0.10",
|
|
60
|
+
"@storybook/jest": "^0.0.11-next.0",
|
|
61
|
+
"@storybook/test-runner": "^0.10.0",
|
|
62
|
+
"@storybook/testing-library": "^0.0.14-next.2",
|
|
63
|
+
"@storybook/vue3": "^7.0.10",
|
|
64
|
+
"@storybook/vue3-vite": "^7.0.10",
|
|
65
|
+
"@types/eslint": "^8.4.5",
|
|
66
|
+
"@types/lodash": "^4.0.0",
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
|
68
|
+
"@typescript-eslint/parser": "^5.38.1",
|
|
69
|
+
"@vitejs/plugin-vue": "^4.1.0",
|
|
70
|
+
"autoprefixer": "^10.4.14",
|
|
71
|
+
"browserify-zlib": "^0.2.0",
|
|
72
|
+
"chromatic": "^6.17.4",
|
|
73
|
+
"concurrently": "^8.0.1",
|
|
74
|
+
"eslint": "^8.24.0",
|
|
75
|
+
"eslint-config-prettier": "^8.5.0",
|
|
76
|
+
"eslint-plugin-storybook": "^0.6.6",
|
|
77
|
+
"eslint-plugin-vue": "^9.5.1",
|
|
78
|
+
"eslint-plugin-vuejs-accessibility": "^1.2.0",
|
|
79
|
+
"postcss": "^8.4.23",
|
|
80
|
+
"postcss-nesting": "^10.2.0",
|
|
81
|
+
"prettier": "^2.7.1",
|
|
82
|
+
"react": "^18.2.0",
|
|
83
|
+
"react-dom": "^18.2.0",
|
|
84
|
+
"rollup-plugin-node-builtins": "^2.1.2",
|
|
85
|
+
"storybook": "^7.0.10",
|
|
86
|
+
"tailwindcss": "^3.3.2",
|
|
87
|
+
"type-fest": "^2.13.1",
|
|
88
|
+
"typescript": "^5.0.4",
|
|
89
|
+
"unplugin-vue-macros": "^2.1.4",
|
|
90
|
+
"vite": "^4.3.2",
|
|
91
|
+
"vite-plugin-dts": "^2.3.0",
|
|
92
|
+
"vue": "^3.0.0",
|
|
93
|
+
"vue-tsc": "^1.4.2",
|
|
94
|
+
"wait-on": "^6.0.1"
|
|
95
|
+
},
|
|
96
|
+
"installConfig": {
|
|
97
|
+
"hoistingLimits": "workspaces"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const speckleTheme = require('@speckle/tailwind-theme')
|
|
2
|
+
const { tailwindContentEntry } = require('@speckle/tailwind-theme/tailwind-configure')
|
|
3
|
+
const formsPlugin = require('@tailwindcss/forms')
|
|
4
|
+
|
|
5
|
+
/** @type {import('tailwindcss').Config} */
|
|
6
|
+
module.exports = {
|
|
7
|
+
darkMode: 'class',
|
|
8
|
+
content: [
|
|
9
|
+
'./index.html',
|
|
10
|
+
'./src/**/*.{js,ts,jsx,tsx,vue}',
|
|
11
|
+
tailwindContentEntry(require)
|
|
12
|
+
],
|
|
13
|
+
plugins: [speckleTheme.default, formsPlugin]
|
|
14
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
|
|
9
|
+
/* Bundler mode */
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"jsx": "preserve",
|
|
16
|
+
|
|
17
|
+
/* Linting */
|
|
18
|
+
"strict": true,
|
|
19
|
+
"noUnusedLocals": true,
|
|
20
|
+
"noUnusedParameters": true,
|
|
21
|
+
"noFallthroughCasesInSwitch": true,
|
|
22
|
+
|
|
23
|
+
/* Extra */
|
|
24
|
+
"paths": {
|
|
25
|
+
"~~/src/*": ["./src/*"],
|
|
26
|
+
"@speckle/shared": ["../shared/dist-esm/index"]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
|
30
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
31
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { resolve, dirname } = require('path')
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Use this to generate an entry for the Tailwind 'content' config key that will ensure
|
|
5
|
+
* this library is scanned to prevent unnecessary purging
|
|
6
|
+
* @param {NodeRequire} req Feed in the 'require' object. It needs to be fed in because it may be
|
|
7
|
+
* unavailable in certain environments and might need to be created manually with 'createRequire'
|
|
8
|
+
*/
|
|
9
|
+
function tailwindContentEntry(req) {
|
|
10
|
+
const packageLocaton = req.resolve('@speckle/ui-components')
|
|
11
|
+
const packageDir = dirname(packageLocaton)
|
|
12
|
+
return resolve(packageDir, '**/*.{js,cjs,mjs}')
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
module.exports = { tailwindContentEntry }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function tailwindContentEntry(req: NodeRequire): string
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { resolve, dirname } from 'path'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Use this to generate an entry for the Tailwind 'content' config key that will ensure
|
|
5
|
+
* this library is scanned to prevent unnecessary purging
|
|
6
|
+
* @param {NodeRequire} req Feed in the 'require' object. It needs to be fed in because it may be
|
|
7
|
+
* unavailable in certain environments and might need to be created manually with 'createRequire'
|
|
8
|
+
*/
|
|
9
|
+
export function tailwindContentEntry(req) {
|
|
10
|
+
const packageLocaton = req.resolve('@speckle/ui-components')
|
|
11
|
+
const packageDir = dirname(packageLocaton)
|
|
12
|
+
return resolve(packageDir, '**/*.{js,cjs,mjs}')
|
|
13
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import vue from '@vitejs/plugin-vue'
|
|
3
|
+
import vueMacros from 'unplugin-vue-macros/vite'
|
|
4
|
+
import dts from 'vite-plugin-dts'
|
|
5
|
+
import pkg from './package.json'
|
|
6
|
+
import { resolve } from 'path'
|
|
7
|
+
import { createRequire } from 'node:module'
|
|
8
|
+
|
|
9
|
+
const require = createRequire(import.meta.url)
|
|
10
|
+
|
|
11
|
+
// https://vitejs.dev/config/
|
|
12
|
+
export default defineConfig({
|
|
13
|
+
plugins: [
|
|
14
|
+
dts(),
|
|
15
|
+
vueMacros({
|
|
16
|
+
plugins: {
|
|
17
|
+
vue: vue()
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
],
|
|
21
|
+
build: {
|
|
22
|
+
lib: {
|
|
23
|
+
entry: resolve(__dirname, 'src/lib.ts'),
|
|
24
|
+
name: 'SpeckleUiComponents',
|
|
25
|
+
fileName: 'lib',
|
|
26
|
+
formats: ['es', 'cjs']
|
|
27
|
+
},
|
|
28
|
+
rollupOptions: {
|
|
29
|
+
external: [
|
|
30
|
+
...Object.keys(pkg.dependencies || {}).map((d) => new RegExp(`^${d}(\\/.*)?$`)),
|
|
31
|
+
...Object.keys(pkg.peerDependencies || {}).map(
|
|
32
|
+
(d) => new RegExp(`^${d}(\\/.*)?$`)
|
|
33
|
+
)
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
resolve: {
|
|
39
|
+
alias: {
|
|
40
|
+
// We need browser polyfills for crypto & zlib cause they seem to be bundled for the web
|
|
41
|
+
// for some reason when running storybook. Doesn't appear that these
|
|
42
|
+
// actually appear in any client-side bundles tho!
|
|
43
|
+
crypto: require.resolve('rollup-plugin-node-builtins'),
|
|
44
|
+
zlib: require.resolve('browserify-zlib'),
|
|
45
|
+
'~~/src': resolve(__dirname, './src')
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
})
|