@tsed/tailwind-formio 3.0.0-alpha.9 → 3.0.0-rc.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/index.d.ts +4 -1
- package/dist/index.js.map +1 -1
- package/dist/tailwind/colors.js.map +1 -1
- package/dist/tailwind/preset.js.map +1 -1
- package/dist/templates/index.d.ts +4 -1
- package/dist/templates/index.js.map +1 -1
- package/dist/templates/tailwind/address/index.js.map +1 -1
- package/dist/templates/tailwind/alert/index.js.map +1 -1
- package/dist/templates/tailwind/builder/index.js.map +1 -1
- package/dist/templates/tailwind/builderComponent/index.js.map +1 -1
- package/dist/templates/tailwind/builderComponents/index.js.map +1 -1
- package/dist/templates/tailwind/builderEditForm/index.js.map +1 -1
- package/dist/templates/tailwind/builderPlaceholder/index.js.map +1 -1
- package/dist/templates/tailwind/builderSidebar/index.js.map +1 -1
- package/dist/templates/tailwind/builderSidebarGroup/index.js.map +1 -1
- package/dist/templates/tailwind/builderWizard/index.js.map +1 -1
- package/dist/templates/tailwind/button/index.js.map +1 -1
- package/dist/templates/tailwind/bxIconsMapping.d.ts +1 -0
- package/dist/templates/tailwind/bxIconsMapping.js +74 -0
- package/dist/templates/tailwind/bxIconsMapping.js.map +1 -0
- package/dist/templates/tailwind/checkbox/index.js.map +1 -1
- package/dist/templates/tailwind/columns/index.js.map +1 -1
- package/dist/templates/tailwind/component/index.js.map +1 -1
- package/dist/templates/tailwind/componentModal/index.js.map +1 -1
- package/dist/templates/tailwind/components/index.js.map +1 -1
- package/dist/templates/tailwind/container/index.js.map +1 -1
- package/dist/templates/tailwind/cssClasses.js.map +1 -1
- package/dist/templates/tailwind/datagrid/index.js.map +1 -1
- package/dist/templates/tailwind/day/index.js.map +1 -1
- package/dist/templates/tailwind/dialog/index.js.map +1 -1
- package/dist/templates/tailwind/editgrid/index.js.map +1 -1
- package/dist/templates/tailwind/editgridTable/index.js.map +1 -1
- package/dist/templates/tailwind/errorsList/index.js.map +1 -1
- package/dist/templates/tailwind/field/index.js.map +1 -1
- package/dist/templates/tailwind/fieldset/index.js.map +1 -1
- package/dist/templates/tailwind/file/index.js.map +1 -1
- package/dist/templates/tailwind/html/index.js.map +1 -1
- package/dist/templates/tailwind/icon/index.js.map +1 -1
- package/dist/templates/tailwind/iconClass.d.ts +0 -1
- package/dist/templates/tailwind/iconClass.js +4 -54
- package/dist/templates/tailwind/iconClass.js.map +1 -1
- package/dist/templates/tailwind/index.d.ts +4 -1
- package/dist/templates/tailwind/index.js +109 -104
- package/dist/templates/tailwind/index.js.map +1 -1
- package/dist/templates/tailwind/input/index.js.map +1 -1
- package/dist/templates/tailwind/label/index.js.map +1 -1
- package/dist/templates/tailwind/loader/index.js.map +1 -1
- package/dist/templates/tailwind/loading/index.js.map +1 -1
- package/dist/templates/tailwind/lucideIconsMapping.d.ts +1 -0
- package/dist/templates/tailwind/lucideIconsMapping.js +76 -0
- package/dist/templates/tailwind/lucideIconsMapping.js.map +1 -0
- package/dist/templates/tailwind/map/index.js.map +1 -1
- package/dist/templates/tailwind/message/index.js.map +1 -1
- package/dist/templates/tailwind/modalPreview/index.js.map +1 -1
- package/dist/templates/tailwind/modaldialog/index.js.map +1 -1
- package/dist/templates/tailwind/modaledit/index.js.map +1 -1
- package/dist/templates/tailwind/multiValueRow/index.js.map +1 -1
- package/dist/templates/tailwind/multiValueTable/index.js.map +1 -1
- package/dist/templates/tailwind/multipleMasksInput/index.js.map +1 -1
- package/dist/templates/tailwind/panel/index.js.map +1 -1
- package/dist/templates/tailwind/pdf/index.js.map +1 -1
- package/dist/templates/tailwind/pdfBuilder/index.js.map +1 -1
- package/dist/templates/tailwind/pdfBuilderUpload/index.js.map +1 -1
- package/dist/templates/tailwind/radio/index.js.map +1 -1
- package/dist/templates/tailwind/resourceAdd/index.js.map +1 -1
- package/dist/templates/tailwind/select/index.js.map +1 -1
- package/dist/templates/tailwind/selectOption/index.js.map +1 -1
- package/dist/templates/tailwind/signature/index.js.map +1 -1
- package/dist/templates/tailwind/survey/index.js.map +1 -1
- package/dist/templates/tailwind/tab/index.js.map +1 -1
- package/dist/templates/tailwind/table/index.js.map +1 -1
- package/dist/templates/tailwind/tableComponents/index.js.map +1 -1
- package/dist/templates/tailwind/tree/index.js.map +1 -1
- package/dist/templates/tailwind/tree/partials/index.js.map +1 -1
- package/dist/templates/tailwind/webform/index.js.map +1 -1
- package/dist/templates/tailwind/well/index.js.map +1 -1
- package/dist/templates/tailwind/wizard/index.js.map +1 -1
- package/dist/templates/tailwind/wizardHeader/index.js.map +1 -1
- package/dist/templates/tailwind/wizardHeaderClassic/index.js.map +1 -1
- package/dist/templates/tailwind/wizardHeaderVertical/index.js.map +1 -1
- package/dist/templates/tailwind/wizardNav/index.js.map +1 -1
- package/package.json +12 -4
- package/readme.md +20 -42
- package/src/templates/tailwind/button/button.stories.jsx +19 -19
- package/src/templates/tailwind/bxIconsMapping.ts +70 -0
- package/src/templates/tailwind/iconClass.ts +11 -62
- package/src/templates/tailwind/index.ts +8 -3
- package/src/templates/tailwind/lucideIconsMapping.ts +72 -0
- package/styles/animations.css +341 -0
- package/styles/badge.css +4 -4
- package/styles/choices.css +1 -1
- package/styles/icon.css +33 -0
- package/styles/index.css +1 -0
- package/styles/react-select.css +16 -2
- package/styles/tables.css +24 -57
- package/styles/tabs.css +67 -49
- package/vite.config.mts +1 -1
- package/tsconfig.app.json +0 -11
- package/tsconfig.json +0 -16
- package/tsconfig.node.json +0 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/tailwind-formio",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-rc.1",
|
|
4
4
|
"description": "Tailwind templates for form.io forms.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,12 +32,21 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"cross-env": "7.0.3",
|
|
35
|
+
"lucide-static": "^0.544.0",
|
|
35
36
|
"rimraf": "3.0.2",
|
|
36
37
|
"tailwind-config-viewer": "2.0.4",
|
|
37
38
|
"tailwindcss": "3.4.17",
|
|
38
|
-
"vite": "
|
|
39
|
+
"vite": "7.1.5",
|
|
39
40
|
"vite-plugin-ejs": "1.7.0"
|
|
40
41
|
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"lucide-static": ">=0.544.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependenciesMeta": {
|
|
46
|
+
"lucide-static": {
|
|
47
|
+
"optional": true
|
|
48
|
+
}
|
|
49
|
+
},
|
|
41
50
|
"browserslist": {
|
|
42
51
|
"production": [
|
|
43
52
|
">0.2%",
|
|
@@ -51,7 +60,6 @@
|
|
|
51
60
|
]
|
|
52
61
|
},
|
|
53
62
|
"dependencies": {},
|
|
54
|
-
"peerDependencies": {},
|
|
55
63
|
"repository": "https://github.com/tsedio/tsed-formio",
|
|
56
64
|
"bugs": {
|
|
57
65
|
"url": "https://github.com/tsedio/tsed-formio/issues"
|
|
@@ -59,6 +67,6 @@
|
|
|
59
67
|
"homepage": "https://github.com/tsedio/tsed-formio/tree/master/packages/tailwind-formio",
|
|
60
68
|
"author": "Romain Lenzotti",
|
|
61
69
|
"publishConfig": {
|
|
62
|
-
"tag": "
|
|
70
|
+
"tag": "rc"
|
|
63
71
|
}
|
|
64
72
|
}
|
package/readme.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p style="text-align: center" align="center">
|
|
2
|
-
<a href="https://tsed.
|
|
2
|
+
<a href="https://tsed.dev" target="_blank"><img src="https://tsed.dev/tsed-og.png" width="200" alt="Ts.ED logo"/></a>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<div align="center">
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
16
|
<div align="center">
|
|
17
|
-
<a href="https://tsed.
|
|
17
|
+
<a href="https://tsed.dev/">Website</a>
|
|
18
18
|
<span> • </span>
|
|
19
|
-
<a href="https://tsed.
|
|
19
|
+
<a href="https://tsed.dev/tutorials/prisma.html">Tutorial</a>
|
|
20
20
|
<span> • </span>
|
|
21
|
-
<a href="https://
|
|
21
|
+
<a href="https://slack.tsed.dev">Slack</a>
|
|
22
22
|
<span> • </span>
|
|
23
23
|
<a href="https://twitter.com/TsED_io">Twitter</a>
|
|
24
24
|
</div>
|
|
@@ -31,52 +31,29 @@ This repository will change the rendering of forms in formio.js so that it uses
|
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
33
|
npm install @tsed/tailwind-formio --save
|
|
34
|
-
npm install --save-dev
|
|
34
|
+
npm install tailwindcss postcss autoprefixer postcss-normalize --save-dev
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
If you use `create-react-app`, you'll need to follow the official tailwind guide installation here: https://tailwindcss.com/docs/guides/create-react-app
|
|
37
|
+
## Tailwind configuration
|
|
40
38
|
|
|
41
39
|
### Configure postcss
|
|
42
40
|
|
|
43
|
-
Edit
|
|
44
|
-
|
|
45
|
-
```diff
|
|
46
|
-
module.exports = {
|
|
47
|
-
style: {
|
|
48
|
-
postcss: {
|
|
49
|
-
plugins: [
|
|
50
|
-
require('tailwindcss'),
|
|
51
|
-
+ require('postcss-nested')
|
|
52
|
-
require('autoprefixer')
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Or:
|
|
41
|
+
Edit `postcss.config.js` and add the postcss plugins list:
|
|
60
42
|
|
|
61
43
|
```diff
|
|
62
44
|
export default {
|
|
63
45
|
plugins: {
|
|
64
|
-
|
|
46
|
+
"postcss-normalize": {},
|
|
47
|
+
"tailwindcss/nesting": {},
|
|
65
48
|
tailwindcss: {},
|
|
66
|
-
autoprefixer: {}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
49
|
+
autoprefixer: {}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
69
52
|
```
|
|
70
53
|
|
|
71
54
|
### Configure tailwind
|
|
72
55
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
npx tailwindcss-cli@latest init
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Edit the `tailwind.config.js` and copy the following content:
|
|
56
|
+
Edit your `tailwind.config.js` and copy the following content:
|
|
80
57
|
|
|
81
58
|
```js
|
|
82
59
|
import { tailwindPreset } from "@tsed/tailwind-formio/tailwind.preset";
|
|
@@ -89,7 +66,7 @@ module.exports = {
|
|
|
89
66
|
"./node_modules/**/*.{js,jsx,ts,tsx,ejs}"
|
|
90
67
|
// add your paths
|
|
91
68
|
],
|
|
92
|
-
presets: [],
|
|
69
|
+
presets: [tailwindPreset],
|
|
93
70
|
darkMode: "class",
|
|
94
71
|
theme: {
|
|
95
72
|
extend: {
|
|
@@ -138,20 +115,21 @@ Then create a `tailwind.css` in `styles` directory and add the following lines:
|
|
|
138
115
|
Import the `tailwind.css` in the `index.css` created by create-react-app:
|
|
139
116
|
|
|
140
117
|
```css
|
|
141
|
-
@import "
|
|
118
|
+
@import "@formio/js/dist/formio.full.css";
|
|
142
119
|
@import "./tailwind.css";
|
|
143
|
-
@import "
|
|
120
|
+
@import "@tsed/tailwind-formio/styles/index.css";
|
|
144
121
|
```
|
|
145
122
|
|
|
146
123
|
Optionally, you can import fonts and icons:
|
|
147
124
|
|
|
148
125
|
```diff
|
|
149
|
-
@import "
|
|
126
|
+
@import "@formio/js/dist/formio.full.css";
|
|
150
127
|
@import "./tailwind.css";
|
|
151
128
|
+@import "./fonts/source-sans-pro/index.css";
|
|
152
129
|
+@import "./fonts/inconsolata/index.css";
|
|
153
|
-
+@import "
|
|
154
|
-
|
|
130
|
+
+@import "lucide-static/font/lucide.css"; // if you want to use lucide icons (you have to install it)
|
|
131
|
+
+@import "./fonts/bxicons/index.css"; // if you want to use bxicons (you have to install it)
|
|
132
|
+
@import "@tsed/tailwind-formio/styles/index.css";
|
|
155
133
|
```
|
|
156
134
|
|
|
157
135
|
Now, we can configure formio to use the tailwind template in our React application.
|
|
@@ -14,57 +14,57 @@ export default {
|
|
|
14
14
|
|
|
15
15
|
export const Sandbox = () => {
|
|
16
16
|
return (
|
|
17
|
-
<div>
|
|
18
|
-
<div className=
|
|
19
|
-
<button type='button' className='
|
|
17
|
+
<div className='flex flex-col gap-5'>
|
|
18
|
+
<div className='flex flex-wrap gap-2'>
|
|
19
|
+
<button type='button' className='btn btn-primary'>
|
|
20
20
|
Primary
|
|
21
21
|
</button>
|
|
22
|
-
<button type='button' className='
|
|
22
|
+
<button type='button' className='btn btn-secondary'>
|
|
23
23
|
Secondary
|
|
24
24
|
</button>
|
|
25
|
-
<button type='button' className='
|
|
25
|
+
<button type='button' className='btn btn-success'>
|
|
26
26
|
Success
|
|
27
27
|
</button>
|
|
28
|
-
<button type='button' className='
|
|
28
|
+
<button type='button' className='btn btn-danger'>
|
|
29
29
|
Danger
|
|
30
30
|
</button>
|
|
31
|
-
<button type='button' className='
|
|
31
|
+
<button type='button' className='btn btn-warning'>
|
|
32
32
|
Warning
|
|
33
33
|
</button>
|
|
34
|
-
<button type='button' className='
|
|
34
|
+
<button type='button' className='btn btn-info'>
|
|
35
35
|
Info
|
|
36
36
|
</button>
|
|
37
|
-
<button type='button' className='
|
|
37
|
+
<button type='button' className='btn btn-light'>
|
|
38
38
|
Light
|
|
39
39
|
</button>
|
|
40
|
-
<button type='button' className='
|
|
40
|
+
<button type='button' className='btn btn-dark'>
|
|
41
41
|
Dark
|
|
42
42
|
</button>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
|
-
<div>
|
|
46
|
-
<button type='button' className='
|
|
45
|
+
<div className='flex flex-wrap gap-2'>
|
|
46
|
+
<button type='button' className='btn btn-outline-primary'>
|
|
47
47
|
Primary
|
|
48
48
|
</button>
|
|
49
|
-
<button type='button' className='
|
|
49
|
+
<button type='button' className='btn btn-outline-secondary'>
|
|
50
50
|
Secondary
|
|
51
51
|
</button>
|
|
52
|
-
<button type='button' className='
|
|
52
|
+
<button type='button' className='btn btn-outline-success'>
|
|
53
53
|
Success
|
|
54
54
|
</button>
|
|
55
|
-
<button type='button' className='
|
|
55
|
+
<button type='button' className='btn btn-outline-danger'>
|
|
56
56
|
Danger
|
|
57
57
|
</button>
|
|
58
|
-
<button type='button' className='
|
|
58
|
+
<button type='button' className='btn btn-outline-warning'>
|
|
59
59
|
Warning
|
|
60
60
|
</button>
|
|
61
|
-
<button type='button' className='
|
|
61
|
+
<button type='button' className='btn btn-outline-info'>
|
|
62
62
|
Info
|
|
63
63
|
</button>
|
|
64
|
-
<button type='button' className='
|
|
64
|
+
<button type='button' className='btn btn-outline-light'>
|
|
65
65
|
Light
|
|
66
66
|
</button>
|
|
67
|
-
<button type='button' className='
|
|
67
|
+
<button type='button' className='btn btn-outline-dark'>
|
|
68
68
|
Dark
|
|
69
69
|
</button>
|
|
70
70
|
</div>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export const BxIconsMapping: Record<string, any> = {
|
|
2
|
+
remove: "bxs-trash",
|
|
3
|
+
"question-sign": "bx-question-mark",
|
|
4
|
+
"new-window": "bx-windows",
|
|
5
|
+
"minus-square-o": "bxs-minus-square",
|
|
6
|
+
cog: "bx-cog",
|
|
7
|
+
move: "bx-move",
|
|
8
|
+
wrench: "bx-wrench",
|
|
9
|
+
save: "bx-save",
|
|
10
|
+
copy: "bx-copy",
|
|
11
|
+
calendar: "bx-calendar",
|
|
12
|
+
file: "bx-file",
|
|
13
|
+
wpforms: "bxs-spreadsheet",
|
|
14
|
+
"files-o": "bx-copy-alt",
|
|
15
|
+
refresh: "bx-refresh",
|
|
16
|
+
indent: "bx-right-indent",
|
|
17
|
+
tasks: "bx-list-ul",
|
|
18
|
+
th: "bx-table",
|
|
19
|
+
"th-list": "bxs-spreadsheet",
|
|
20
|
+
"folder-open": "bx-folder-open",
|
|
21
|
+
"folder-o": "bx-folder-open",
|
|
22
|
+
"user-secret": "bxs-user-badge",
|
|
23
|
+
table: "bx-table",
|
|
24
|
+
pencil: "bx-pencil",
|
|
25
|
+
code: "bx-code",
|
|
26
|
+
terminal: "bx-terminal",
|
|
27
|
+
home: "bx-home",
|
|
28
|
+
html5: "bxl-html5",
|
|
29
|
+
list: "bx-list-ul",
|
|
30
|
+
usd: "bx-dollar",
|
|
31
|
+
hashtag: "bx-hash",
|
|
32
|
+
tags: "bx-purchase-tag",
|
|
33
|
+
at: "bx-at",
|
|
34
|
+
font: "bx-font",
|
|
35
|
+
asterisk: "bx-show",
|
|
36
|
+
plus: "bx-plus",
|
|
37
|
+
"plus-square": "bx-plus-circle",
|
|
38
|
+
"plus-square-o": "bxs-plus-square",
|
|
39
|
+
"dot-circle-o": "bx-radio-circle-marked",
|
|
40
|
+
"phone-square": "bx-phone",
|
|
41
|
+
"clock-o": "bx-time-five",
|
|
42
|
+
link: "bx-link",
|
|
43
|
+
columns: "bx-columns",
|
|
44
|
+
"th-large": "bx-category",
|
|
45
|
+
"list-alt": "bx-credit-card-front",
|
|
46
|
+
"square-o": "bx-caret-down-square",
|
|
47
|
+
cubes: "bxs-cube",
|
|
48
|
+
stop: "bx-stop",
|
|
49
|
+
"check-square": "bx-checkbox-checked",
|
|
50
|
+
"remove-circle": "bx-x",
|
|
51
|
+
"circle-xmark": "bx-x",
|
|
52
|
+
bars: "bx-menu",
|
|
53
|
+
edit: "bx-edit",
|
|
54
|
+
time: "bx-time",
|
|
55
|
+
microphone: "bx-microphone",
|
|
56
|
+
video: "bx-video",
|
|
57
|
+
"times-circle": "bx-x",
|
|
58
|
+
minus: "bx-minus",
|
|
59
|
+
circle: "bx-circle",
|
|
60
|
+
"search-plus": "bx-zoom-in",
|
|
61
|
+
"search-minus": "bx-zoom-out",
|
|
62
|
+
"hand-paper-o": "bx-hand-up",
|
|
63
|
+
undo: "bx-undo",
|
|
64
|
+
redo: "bx-redo",
|
|
65
|
+
repeat: "bx-repeat",
|
|
66
|
+
data: "bx-data",
|
|
67
|
+
"paper-plane": "bx-paper-plane",
|
|
68
|
+
reset: "bx-reset",
|
|
69
|
+
loader: "bx-loader-alt"
|
|
70
|
+
};
|
|
@@ -1,72 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"question-sign":
|
|
4
|
-
"bx-question-mark inline-block border-1 bg-gray-400 border-solid border-gray-400 text-white text-xxs rounded-full mx-2 mt-px",
|
|
5
|
-
"new-window": "bx-windows",
|
|
6
|
-
"minus-square-o": "bxs-minus-square",
|
|
7
|
-
cog: "bx-cog",
|
|
8
|
-
move: "bx-move",
|
|
9
|
-
wrench: "bx-wrench",
|
|
10
|
-
save: "bx-save",
|
|
11
|
-
copy: "bx-copy",
|
|
12
|
-
calendar: "bx-calendar",
|
|
13
|
-
file: "bx-file",
|
|
14
|
-
wpforms: "bxs-spreadsheet",
|
|
15
|
-
"files-o": "bx-copy-alt",
|
|
16
|
-
refresh: "bx-refresh",
|
|
17
|
-
indent: "bx-right-indent",
|
|
18
|
-
tasks: "bx-list-ul",
|
|
19
|
-
th: "bx-table",
|
|
20
|
-
"th-list": "bxs-spreadsheet",
|
|
21
|
-
"folder-open": "bx-folder-open",
|
|
22
|
-
"folder-o": "bx-folder-open",
|
|
23
|
-
"user-secret": "bxs-user-badge",
|
|
24
|
-
table: "bx-table",
|
|
25
|
-
pencil: "bx-pencil",
|
|
26
|
-
code: "bx-code",
|
|
27
|
-
terminal: "bx-terminal",
|
|
28
|
-
home: "bx-home",
|
|
29
|
-
html5: "bxl-html5",
|
|
30
|
-
list: "bx-list-ul",
|
|
31
|
-
usd: "bx-dollar",
|
|
32
|
-
hashtag: "bx-hash",
|
|
33
|
-
tags: "bx-purchase-tag",
|
|
34
|
-
at: "bx-at",
|
|
35
|
-
font: "bx-font",
|
|
36
|
-
asterisk: "bx-show",
|
|
37
|
-
plus: "bx-plus",
|
|
38
|
-
"plus-square": "bx-plus-circle",
|
|
39
|
-
"plus-square-o": "bxs-plus-square",
|
|
40
|
-
"dot-circle-o": "bx-radio-circle-marked",
|
|
41
|
-
"phone-square": "bx-phone",
|
|
42
|
-
"clock-o": "bx-time-five",
|
|
43
|
-
link: "bx-link",
|
|
44
|
-
columns: "bx-columns",
|
|
45
|
-
"th-large": "bx-category",
|
|
46
|
-
"list-alt": "bx-credit-card-front",
|
|
47
|
-
"square-o": "bx-caret-down-square",
|
|
48
|
-
cubes: "bxs-cube",
|
|
49
|
-
stop: "bx-stop",
|
|
50
|
-
"check-square": "bx-checkbox-checked",
|
|
51
|
-
"remove-circle": "bx-x",
|
|
52
|
-
bars: "bx-menu"
|
|
53
|
-
};
|
|
1
|
+
import { BxIconsMapping } from "./bxIconsMapping.js";
|
|
2
|
+
import { LucideIconsMapping } from "./lucideIconsMapping.js";
|
|
54
3
|
|
|
55
4
|
export default (iconset: string | undefined, name: string, spinning?: boolean) => {
|
|
5
|
+
if (iconset === "lu") {
|
|
6
|
+
name = LucideIconsMapping[name] || name;
|
|
7
|
+
|
|
8
|
+
return [`icon-${name}`, spinning && (name === "bx-radio-circle" ? "animate-burst" : "animate-spin")].filter(Boolean).join(" ");
|
|
9
|
+
}
|
|
56
10
|
if (iconset === "bx") {
|
|
57
|
-
if (
|
|
58
|
-
name =
|
|
11
|
+
if (BxIconsMapping[name]) {
|
|
12
|
+
name = BxIconsMapping[name];
|
|
59
13
|
} else {
|
|
60
14
|
name = `${iconset}-${name}`;
|
|
61
15
|
}
|
|
62
|
-
}
|
|
63
16
|
|
|
64
|
-
|
|
65
|
-
if (name === "bx-radio-circle") {
|
|
66
|
-
return `${iconset} ${name} bx-burst`;
|
|
67
|
-
}
|
|
68
|
-
return `${iconset} ${name} bx-spin`;
|
|
17
|
+
return [iconset, name, spinning && (name === "bx-radio-circle" ? "animate-burst" : "animate-spin")].filter(Boolean).join(" ");
|
|
69
18
|
}
|
|
70
19
|
|
|
71
|
-
return `${iconset} ${name}`;
|
|
20
|
+
return `${iconset} ${iconset}-${name}`;
|
|
72
21
|
};
|
|
@@ -9,6 +9,7 @@ import builderSidebar from "./builderSidebar";
|
|
|
9
9
|
import builderSidebarGroup from "./builderSidebarGroup";
|
|
10
10
|
import builderWizard from "./builderWizard";
|
|
11
11
|
import button from "./button";
|
|
12
|
+
import { BxIconsMapping } from "./bxIconsMapping.js";
|
|
12
13
|
import checkbox from "./checkbox";
|
|
13
14
|
import columns from "./columns";
|
|
14
15
|
import component from "./component";
|
|
@@ -27,11 +28,12 @@ import fieldset from "./fieldset";
|
|
|
27
28
|
import file from "./file";
|
|
28
29
|
import html from "./html";
|
|
29
30
|
import icon from "./icon";
|
|
30
|
-
import iconClass
|
|
31
|
+
import iconClass from "./iconClass";
|
|
31
32
|
import input from "./input";
|
|
32
33
|
import label from "./label";
|
|
33
34
|
import loader from "./loader";
|
|
34
35
|
import loading from "./loading";
|
|
36
|
+
import { LucideIconsMapping } from "./lucideIconsMapping.js";
|
|
35
37
|
import map from "./map";
|
|
36
38
|
import message from "./message";
|
|
37
39
|
import modaldialog from "./modaldialog";
|
|
@@ -64,7 +66,10 @@ import wizardHeaderVertical from "./wizardHeaderVertical";
|
|
|
64
66
|
import wizardNav from "./wizardNav";
|
|
65
67
|
|
|
66
68
|
export default {
|
|
67
|
-
ICONS
|
|
69
|
+
ICONS: {
|
|
70
|
+
bx: BxIconsMapping,
|
|
71
|
+
lu: LucideIconsMapping
|
|
72
|
+
},
|
|
68
73
|
transform(type: string, text: string) {
|
|
69
74
|
if (!text) {
|
|
70
75
|
return text;
|
|
@@ -75,7 +80,7 @@ export default {
|
|
|
75
80
|
}
|
|
76
81
|
return text;
|
|
77
82
|
},
|
|
78
|
-
defaultIconset: "
|
|
83
|
+
defaultIconset: "lu",
|
|
79
84
|
iconClass,
|
|
80
85
|
cssClasses,
|
|
81
86
|
address,
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export const LucideIconsMapping: Record<string, any> = {
|
|
2
|
+
remove: "trash",
|
|
3
|
+
"question-sign": "circle-question-mark",
|
|
4
|
+
"new-window": "app-window",
|
|
5
|
+
"minus-square-o": "square-minus",
|
|
6
|
+
cog: "cog",
|
|
7
|
+
move: "move",
|
|
8
|
+
wrench: "wrench",
|
|
9
|
+
save: "save",
|
|
10
|
+
copy: "copy",
|
|
11
|
+
calendar: "calendar",
|
|
12
|
+
file: "file",
|
|
13
|
+
wpforms: "picture-in-picture-2",
|
|
14
|
+
"files-o": "files",
|
|
15
|
+
refresh: "refresh-cw",
|
|
16
|
+
indent: "list-indent-increase",
|
|
17
|
+
tasks: "rows-2",
|
|
18
|
+
th: "grid-3x3",
|
|
19
|
+
"th-list": "panel-top-open",
|
|
20
|
+
"folder-open": "folder-open",
|
|
21
|
+
"folder-o": "folder",
|
|
22
|
+
"user-secret": "user-round-x",
|
|
23
|
+
table: "table",
|
|
24
|
+
pencil: "pencil",
|
|
25
|
+
code: "code",
|
|
26
|
+
terminal: "terminal",
|
|
27
|
+
home: "house",
|
|
28
|
+
html5: "file-text",
|
|
29
|
+
list: "list",
|
|
30
|
+
usd: "dollar-sign",
|
|
31
|
+
hashtag: "hash",
|
|
32
|
+
tags: "tags",
|
|
33
|
+
at: "at-sign",
|
|
34
|
+
font: "type",
|
|
35
|
+
asterisk: "asterisk",
|
|
36
|
+
plus: "plus",
|
|
37
|
+
"plus-square": "list-check",
|
|
38
|
+
"plus-square-o": "square-plus",
|
|
39
|
+
"dot-circle-o": "circle-check",
|
|
40
|
+
"phone-square": "phone",
|
|
41
|
+
"clock-o": "clock",
|
|
42
|
+
link: "link",
|
|
43
|
+
columns: "columns-3",
|
|
44
|
+
"th-large": "layout-grid",
|
|
45
|
+
"list-alt": "app-window",
|
|
46
|
+
"square-o": "square",
|
|
47
|
+
cubes: "boxes",
|
|
48
|
+
stop: "square",
|
|
49
|
+
"check-square": "square-check",
|
|
50
|
+
"remove-circle": "x",
|
|
51
|
+
"circle-xmark": "circle-x",
|
|
52
|
+
bars: "list",
|
|
53
|
+
edit: "square-pen",
|
|
54
|
+
time: "clock",
|
|
55
|
+
microphone: "mic",
|
|
56
|
+
video: "video",
|
|
57
|
+
"times-circle": "circle-x",
|
|
58
|
+
minus: "minus",
|
|
59
|
+
circle: "circle",
|
|
60
|
+
"search-plus": "zoom-in",
|
|
61
|
+
"search-minus": "zoom-out",
|
|
62
|
+
"hand-paper-o": "pointer",
|
|
63
|
+
undo: "undo-2",
|
|
64
|
+
redo: "redo-2",
|
|
65
|
+
repeat: "repeat",
|
|
66
|
+
data: "database",
|
|
67
|
+
"paper-plane": "send",
|
|
68
|
+
reset: "rotate-ccw",
|
|
69
|
+
loader: "loader-circle",
|
|
70
|
+
detail: "file-text",
|
|
71
|
+
spreadsheet: "file-spreadsheet"
|
|
72
|
+
};
|