pgo-ui 1.0.0
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/README.md +195 -0
- package/dist/InputSearch-CHSoQ7GH.js +155 -0
- package/dist/favicon.ico +0 -0
- package/dist/index-B7ko30VS.js +5899 -0
- package/dist/index-BKsLeoKP.js +4781 -0
- package/dist/index-BeW0KHDT.js +34237 -0
- package/dist/index-DjwGqWIf.js +5086 -0
- package/dist/index-jnIKSPXM.js +4949 -0
- package/dist/index.es.js +58 -0
- package/dist/index.umd.js +111 -0
- package/dist/pgo-ui.css +1 -0
- package/package.json +99 -0
- package/src/App.vue +369 -0
- package/src/assets/fonts/Faruma.ttf +0 -0
- package/src/assets/logo.png +0 -0
- package/src/components/examples/AppBarExample.vue +100 -0
- package/src/components/examples/AvatarExample.vue +47 -0
- package/src/components/examples/BannerExample.vue +287 -0
- package/src/components/examples/BaseInputExample.vue +25 -0
- package/src/components/examples/BreadcrumbExample.vue +53 -0
- package/src/components/examples/CardExample.vue +77 -0
- package/src/components/examples/ChipExample.vue +225 -0
- package/src/components/examples/DatePickerExample.vue +31 -0
- package/src/components/examples/DropdownExample.vue +84 -0
- package/src/components/examples/EditorExample.vue +200 -0
- package/src/components/examples/ExpansionPanelExample.vue +42 -0
- package/src/components/examples/FileUploadExample.vue +40 -0
- package/src/components/examples/FormExample.vue +121 -0
- package/src/components/examples/HugeTest.vue +8 -0
- package/src/components/examples/LayoutContainerExample.vue +80 -0
- package/src/components/examples/ModalExample.vue +82 -0
- package/src/components/examples/NavDrawerExample.vue +171 -0
- package/src/components/examples/NumberFieldExample.vue +145 -0
- package/src/components/examples/RadioButtonExample.vue +161 -0
- package/src/components/examples/SearchExample.vue +322 -0
- package/src/components/examples/SelectExample.vue +121 -0
- package/src/components/examples/StackedTableViewExample.vue +53 -0
- package/src/components/examples/TabExample.vue +336 -0
- package/src/components/examples/TableExample.vue +228 -0
- package/src/components/examples/TextFieldExample.vue +181 -0
- package/src/components/examples/TextareaExample.vue +173 -0
- package/src/components/examples/ThemeToggle.vue +50 -0
- package/src/components/examples/TimelineExample.vue +66 -0
- package/src/components/examples/TipTapEditorExample.vue +20 -0
- package/src/components/examples/TooltipExample.vue +53 -0
- package/src/components/examples/VueDatePickerShowcase.vue +214 -0
- package/src/components/examples/_DatePickerExample.vue +33 -0
- package/src/components/examples/__FormExample.vue +77 -0
- package/src/components/index.ts +25 -0
- package/src/components/pgo/AppBar.vue +348 -0
- package/src/components/pgo/Avatar.vue +139 -0
- package/src/components/pgo/Banner.vue +300 -0
- package/src/components/pgo/Breadcrumb.vue +103 -0
- package/src/components/pgo/Button.vue +171 -0
- package/src/components/pgo/Card.vue +179 -0
- package/src/components/pgo/ConfirmationModel.vue +32 -0
- package/src/components/pgo/DataTable.vue +845 -0
- package/src/components/pgo/DatePicker/CalendarPanel.vue +43 -0
- package/src/components/pgo/DatePicker/__DatePicker.vue +122 -0
- package/src/components/pgo/DatePicker/types.ts +11 -0
- package/src/components/pgo/DatePicker/useCalendar.ts +39 -0
- package/src/components/pgo/DatePicker/useDatePicker.ts +31 -0
- package/src/components/pgo/Deprecated/ToastContainer.vue +51 -0
- package/src/components/pgo/Deprecated/ToastItem.vue +55 -0
- package/src/components/pgo/Dropdown.vue +296 -0
- package/src/components/pgo/DropdownItem.vue +40 -0
- package/src/components/pgo/Editor.vue +511 -0
- package/src/components/pgo/ExpansionPanel.vue +185 -0
- package/src/components/pgo/Footer.vue +39 -0
- package/src/components/pgo/HeroIcon.vue +124 -0
- package/src/components/pgo/LayoutContainer.vue +104 -0
- package/src/components/pgo/Main.vue +37 -0
- package/src/components/pgo/Modal.vue +261 -0
- package/src/components/pgo/NavDrawer.vue +127 -0
- package/src/components/pgo/NavDrawerItem.vue +161 -0
- package/src/components/pgo/NavigationDrawer.vue +850 -0
- package/src/components/pgo/OLDNavDrawer.vue +661 -0
- package/src/components/pgo/OldAppBar.vue +223 -0
- package/src/components/pgo/PApp.vue +102 -0
- package/src/components/pgo/Pagination.vue +242 -0
- package/src/components/pgo/Search copy.vue +310 -0
- package/src/components/pgo/Search.vue +411 -0
- package/src/components/pgo/StackedTableView.vue +167 -0
- package/src/components/pgo/Tab.vue +617 -0
- package/src/components/pgo/TestInput.vue +395 -0
- package/src/components/pgo/Timeline.vue +367 -0
- package/src/components/pgo/TimelineItem.vue +80 -0
- package/src/components/pgo/TipTapEditor.vue +315 -0
- package/src/components/pgo/Tooltip.NOTES.md +12 -0
- package/src/components/pgo/Tooltip.PROPS.md +21 -0
- package/src/components/pgo/Tooltip.vue +281 -0
- package/src/components/pgo/base/Base.vue +444 -0
- package/src/components/pgo/buttons/Chip.vue +324 -0
- package/src/components/pgo/buttons/ChipGroup.vue +224 -0
- package/src/components/pgo/buttons/Radio.vue +424 -0
- package/src/components/pgo/filters/FilterSection.vue +188 -0
- package/src/components/pgo/filters/Searchbar.vue +216 -0
- package/src/components/pgo/forms/DynamicForm.vue +45 -0
- package/src/components/pgo/forms/Form.vue +132 -0
- package/src/components/pgo/index.ts +89 -0
- package/src/components/pgo/inputs/Checkbox.vue +320 -0
- package/src/components/pgo/inputs/DatePicker.vue +395 -0
- package/src/components/pgo/inputs/FileUpload.vue +326 -0
- package/src/components/pgo/inputs/InputSearch.vue +194 -0
- package/src/components/pgo/inputs/NumberField.vue +243 -0
- package/src/components/pgo/inputs/Radio.vue +162 -0
- package/src/components/pgo/inputs/RadioGroup.vue +188 -0
- package/src/components/pgo/inputs/Select.vue +535 -0
- package/src/components/pgo/inputs/TextField.vue +194 -0
- package/src/components/pgo/inputs/Textarea.vue +181 -0
- package/src/index.js +81 -0
- package/src/main.js +12 -0
- package/src/pgo-components/__index.js +104 -0
- package/src/pgo-components/_index.js +31 -0
- package/src/pgo-components/assets/fonts/Faruma.ttf +0 -0
- package/src/pgo-components/assets/fonts/logo.png +0 -0
- package/src/pgo-components/composables/useTheme.js +10 -0
- package/src/pgo-components/directives/tooltip-directive.ts +393 -0
- package/src/pgo-components/lib/componentConfig.js +147 -0
- package/src/pgo-components/lib/core/composables/_useCalendar.ts +127 -0
- package/src/pgo-components/lib/core/composables/useDefaults.ts +15 -0
- package/src/pgo-components/lib/core/composables/useLanguageSelect.js +0 -0
- package/src/pgo-components/lib/core/composables/useRtl.ts +12 -0
- package/src/pgo-components/lib/core/defaults/createDefaults.ts +5 -0
- package/src/pgo-components/lib/core/defaults/defaults.ts +7 -0
- package/src/pgo-components/lib/core/rtl/rtl.ts +3 -0
- package/src/pgo-components/lib/core/rtl/setRtl.ts +19 -0
- package/src/pgo-components/lib/drawerState.ts +3 -0
- package/src/pgo-components/lib/i18n/defaultLables.js +71 -0
- package/src/pgo-components/lib/i18n/i18nPlugin.js +52 -0
- package/src/pgo-components/lib/i18n/useI18n.js +35 -0
- package/src/pgo-components/lib/index.ts +38 -0
- package/src/pgo-components/pages/Component.vue +7 -0
- package/src/pgo-components/pages/ComponentRenderer.vue +99 -0
- package/src/pgo-components/pages/Home.vue +125 -0
- package/src/pgo-components/pages/ListView.vue +372 -0
- package/src/pgo-components/pages/Page1.vue +296 -0
- package/src/pgo-components/pages/_Page1.vue +180 -0
- package/src/pgo-components/plugins/SnackBar.vue +251 -0
- package/src/pgo-components/plugins/SnackBarContainer.vue +53 -0
- package/src/pgo-components/plugins/SnackBarPlugin.ts +136 -0
- package/src/pgo-components/plugins/theme-plugin.js +114 -0
- package/src/pgo-components/plugins/types.ts +46 -0
- package/src/pgo-components/plugins/useSnackBar.js +11 -0
- package/src/pgo-components/plugins/useSnackBar.ts +21 -0
- package/src/pgo-components/plugins/validation-plugin.js +11 -0
- package/src/pgo-components/services/Entry.json +813 -0
- package/src/pgo-components/services/axios.js +54 -0
- package/src/pgo-components/services/data.json +90 -0
- package/src/pgo-components/services/person.json +260 -0
- package/src/pgo-components/services/toast.ts +44 -0
- package/src/pgo-components/styles/global.css +234 -0
- package/src/pgo-components/styles/reset.css +96 -0
- package/src/pgo-components/styles/tokens.css +18 -0
- package/src/pgo-components/styles/utilities/border-radius.css +57 -0
- package/src/pgo-components/styles/utilities/borders.css +85 -0
- package/src/pgo-components/styles/utilities/colors.css +38 -0
- package/src/pgo-components/styles/utilities/cursor.css +19 -0
- package/src/pgo-components/styles/utilities/display.css +78 -0
- package/src/pgo-components/styles/utilities/elevation.css +33 -0
- package/src/pgo-components/styles/utilities/flex.css +403 -0
- package/src/pgo-components/styles/utilities/float.css +41 -0
- package/src/pgo-components/styles/utilities/hover.css +9 -0
- package/src/pgo-components/styles/utilities/index.css +18 -0
- package/src/pgo-components/styles/utilities/opacity.css +27 -0
- package/src/pgo-components/styles/utilities/overflow.css +26 -0
- package/src/pgo-components/styles/utilities/palette.css +515 -0
- package/src/pgo-components/styles/utilities/position.css +14 -0
- package/src/pgo-components/styles/utilities/sizing.css +70 -0
- package/src/pgo-components/styles/utilities/spacing.css +578 -0
- package/src/pgo-components/styles/utilities/transitions.css +58 -0
- package/src/pgo-components/styles/utilities/typography.css +91 -0
- package/src/pgo-components/styles/utilities/z-index.css +11 -0
- package/src/pgo-components/tokens/index.js +337 -0
- package/src/router/index.js +88 -0
- package/src/shims-vue.d.ts +14 -0
- package/src/validations/validationRules.js +50 -0
- package/tailwind.config.js +73 -0
package/README.md
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# uiux
|
|
2
|
+
PGP UIUX
|
|
3
|
+
|
|
4
|
+
## Installation (as a package)
|
|
5
|
+
|
|
6
|
+
Install the package in your Vue 3 project:
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
npm install pgo-uiux2
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
1. **Import the library and styles in your main.js/main.ts:**
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
import { createApp } from 'vue'
|
|
18
|
+
import App from './App.vue'
|
|
19
|
+
|
|
20
|
+
import router from './router/index.js' //Add this
|
|
21
|
+
import 'pgo-uiux2/style.css' //Add this
|
|
22
|
+
import PgoUiux from 'pgo-uiux2' //Add this Line
|
|
23
|
+
|
|
24
|
+
const app = createApp(App)
|
|
25
|
+
app.use(router)
|
|
26
|
+
app.use(PgoUiux) //Add this
|
|
27
|
+
|
|
28
|
+
app.mount('#app')
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
2. **Add routes in your router: (router/index.js)**
|
|
32
|
+
|
|
33
|
+
```js
|
|
34
|
+
import { ComponentRenderer, Examples } from 'pgo-uiux2'
|
|
35
|
+
|
|
36
|
+
const routes = [
|
|
37
|
+
{
|
|
38
|
+
path: '/',
|
|
39
|
+
name: 'Home',
|
|
40
|
+
component: Examples,
|
|
41
|
+
meta: {
|
|
42
|
+
title: 'Home - PGO UI Components',
|
|
43
|
+
breadcrumb: [
|
|
44
|
+
{ label: 'Home', to: '/' },
|
|
45
|
+
{ label: 'Examples', to: '/asdf' },
|
|
46
|
+
{ label: 'Page 1' }
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
path: '/page/:modelName/:componentName',
|
|
52
|
+
name: 'Custom Home',
|
|
53
|
+
model: 'modelName',
|
|
54
|
+
componentName: 'componentName',
|
|
55
|
+
component: ComponentRenderer,
|
|
56
|
+
meta: {
|
|
57
|
+
title: 'Home - PGO UI Components',
|
|
58
|
+
breadcrumb: [
|
|
59
|
+
{ label: 'Home', to: '/' },
|
|
60
|
+
{ label: 'Examples', to: '/asdf' },
|
|
61
|
+
{ label: 'Page 1' }
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
// ...other routes
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
const router = createRouter({
|
|
69
|
+
history: createWebHistory(),
|
|
70
|
+
routes,
|
|
71
|
+
scrollBehavior(to, from, savedPosition) {
|
|
72
|
+
if (savedPosition) {
|
|
73
|
+
return savedPosition
|
|
74
|
+
} else {
|
|
75
|
+
return { top: 0 }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
// Update document title
|
|
81
|
+
router.beforeEach((to, from, next) => {
|
|
82
|
+
const title = (to && to.meta && to.meta.title) ? String(to.meta.title) : 'PGO UI Components'
|
|
83
|
+
document.title = title
|
|
84
|
+
next()
|
|
85
|
+
})
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
############### Optional #############
|
|
89
|
+
|
|
90
|
+
**Tailwind CSS Setup**
|
|
91
|
+
|
|
92
|
+
Make sure your `tailwind.config.js` includes the package for class scanning:
|
|
93
|
+
|
|
94
|
+
```js
|
|
95
|
+
content: [
|
|
96
|
+
'./index.html',
|
|
97
|
+
'./src/**/*.{vue,js,ts,jsx,tsx}',
|
|
98
|
+
'./node_modules/pgo-uiux2/**/*.{js,ts,vue}'
|
|
99
|
+
],
|
|
100
|
+
darkMode: 'selector',
|
|
101
|
+
theme: {
|
|
102
|
+
extend: {
|
|
103
|
+
// Add RTL and app font families for easier usage in utilities or components
|
|
104
|
+
fontFamily: {
|
|
105
|
+
app: ['var(--app-font)'],
|
|
106
|
+
rtl: [
|
|
107
|
+
'Faruma',
|
|
108
|
+
'system-ui',
|
|
109
|
+
'sans-serif',
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
colors: {
|
|
114
|
+
// background: '#05644D',
|
|
115
|
+
primary: '#05644D',
|
|
116
|
+
// secondary: '#FFA500',
|
|
117
|
+
// third: '#1E40AF',
|
|
118
|
+
// appcolor: '#05644D',
|
|
119
|
+
|
|
120
|
+
// required defaults (otherwise classes like bg-white fail)
|
|
121
|
+
white: '#ffffff',
|
|
122
|
+
black: '#000000',
|
|
123
|
+
transparent: 'transparent',
|
|
124
|
+
current: 'currentColor',
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
fontFamily: {
|
|
128
|
+
// Make Tailwind's default font-sans use the app font CSS variable
|
|
129
|
+
sans: ['var(--app-font)'],
|
|
130
|
+
dv: ['Faruma', 'sans-serif'],
|
|
131
|
+
en: ['Roboto', 'sans-serif'],
|
|
132
|
+
// keep `app` and `rtl` in extend above for convenience
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
// Optional (Vuetify compatibility)
|
|
137
|
+
corePlugins: {
|
|
138
|
+
preflight: false,
|
|
139
|
+
},
|
|
140
|
+
|
|
141
|
+
plugins: [
|
|
142
|
+
// Add small utilities to toggle app font and rtl font via classes
|
|
143
|
+
function ({ addUtilities, theme }) {
|
|
144
|
+
const newUtilities = {
|
|
145
|
+
'.font-app': { 'font-family': theme('fontFamily.app', 'var(--app-font)') },
|
|
146
|
+
'.rtl-font': { 'font-family': theme('fontFamily.rtl').join(', ') },
|
|
147
|
+
}
|
|
148
|
+
addUtilities(newUtilities, { variants: ['responsive'] })
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## package.json Setup
|
|
156
|
+
```js
|
|
157
|
+
"dependencies": {
|
|
158
|
+
"@heroicons/vue": "^2.2.0",
|
|
159
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
160
|
+
"@tiptap/extension-character-count": "^3.13.0",
|
|
161
|
+
"@tiptap/extension-table": "^3.13.0",
|
|
162
|
+
"@tiptap/extension-table-cell": "^3.13.0",
|
|
163
|
+
"@tiptap/extension-table-header": "^3.13.0",
|
|
164
|
+
"@tiptap/extension-table-row": "^3.13.0",
|
|
165
|
+
"@tiptap/extension-text-align": "^3.13.0",
|
|
166
|
+
"@tiptap/pm": "^3.13.0",
|
|
167
|
+
"@tiptap/starter-kit": "^3.13.0",
|
|
168
|
+
"@tiptap/vue-3": "^3.13.0",
|
|
169
|
+
"@vuepic/vue-datepicker": "^12.1.0",
|
|
170
|
+
"@vueuse/components": "^14.0.0",
|
|
171
|
+
"@vueuse/core": "^14.0.0",
|
|
172
|
+
"axios": "^1.13.2",
|
|
173
|
+
"date-fns": "^4.1.0",
|
|
174
|
+
"pgo-uiux": "^1.0.13",
|
|
175
|
+
"pgo-uiux2": "^1.0.55",
|
|
176
|
+
"vue": "^3.5.26",
|
|
177
|
+
"vue-router": "^4.6.4",
|
|
178
|
+
"vue3-tailwind-components": "^0.3.3"
|
|
179
|
+
},
|
|
180
|
+
"devDependencies": {
|
|
181
|
+
"@vitejs/plugin-vue": "^6.0.3",
|
|
182
|
+
"autoprefixer": "^10.4.23",
|
|
183
|
+
"eslint": "^9.39.2",
|
|
184
|
+
"eslint-plugin-vue": "^10.6.2",
|
|
185
|
+
"postcss": "^8.5.6",
|
|
186
|
+
"sass-embedded": "^1.96.0",
|
|
187
|
+
"tailwindcss": "^4.1.17",
|
|
188
|
+
"typescript": "^5.9.3",
|
|
189
|
+
"vite": "^7.3.0",
|
|
190
|
+
"vite-plugin-dts": "^4.5.4",
|
|
191
|
+
"vite-plugin-vue-devtools": "^8.0.5"
|
|
192
|
+
},
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { inject as f, computed as o, ref as c, onBeforeUnmount as T, openBlock as q, createElementBlock as A, normalizeClass as N, createVNode as R, unref as D, createSlots as E, withCtx as g, createElementVNode as d, mergeProps as F, toHandlers as L, withKeys as j } from "vue";
|
|
2
|
+
import { _ as H, a as K } from "./index-BeW0KHDT.js";
|
|
3
|
+
import "vue-router";
|
|
4
|
+
const $ = ["value", "placeholder"], O = {
|
|
5
|
+
__name: "InputSearch",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: { type: [String, Number], default: "" },
|
|
8
|
+
label: { type: [String, Object], default: "" },
|
|
9
|
+
placeholder: { type: String, default: "Search..." },
|
|
10
|
+
hint: { type: String, default: "" },
|
|
11
|
+
error: { type: String, default: "" },
|
|
12
|
+
errorMessages: { type: Array, default: () => [] },
|
|
13
|
+
disabled: { type: Boolean, default: !1 },
|
|
14
|
+
readonly: { type: Boolean, default: !1 },
|
|
15
|
+
required: { type: Boolean, default: !1 },
|
|
16
|
+
clearable: { type: Boolean, default: !0 },
|
|
17
|
+
loading: { type: Boolean, default: !1 },
|
|
18
|
+
prepend: { type: String, default: "" },
|
|
19
|
+
append: { type: String, default: "" },
|
|
20
|
+
rules: { type: Array, default: () => [] },
|
|
21
|
+
// ADD THIS
|
|
22
|
+
// Search behavior
|
|
23
|
+
debounce: { type: Number, default: 300 },
|
|
24
|
+
// Appearance
|
|
25
|
+
size: { type: String },
|
|
26
|
+
rounded: { type: String },
|
|
27
|
+
border: { type: String },
|
|
28
|
+
textColor: { type: String },
|
|
29
|
+
bg: { type: String },
|
|
30
|
+
containerClass: { type: String, default: "" },
|
|
31
|
+
id: { type: String, default: "" },
|
|
32
|
+
width: { type: String, default: "w-full" },
|
|
33
|
+
// RTL/Lang support
|
|
34
|
+
dir: { type: String, default: "" },
|
|
35
|
+
lang: { type: String, default: "" },
|
|
36
|
+
// Props that might be passed but not used (to avoid warnings)
|
|
37
|
+
items: { type: Array, default: () => [] },
|
|
38
|
+
itemText: { type: String, default: "text" },
|
|
39
|
+
itemValue: { type: String, default: "value" }
|
|
40
|
+
},
|
|
41
|
+
emits: [
|
|
42
|
+
"update:modelValue",
|
|
43
|
+
"input",
|
|
44
|
+
"change",
|
|
45
|
+
"focus",
|
|
46
|
+
"blur",
|
|
47
|
+
"clear",
|
|
48
|
+
"search",
|
|
49
|
+
"enter"
|
|
50
|
+
],
|
|
51
|
+
setup(e, { expose: m, emit: y }) {
|
|
52
|
+
const a = e, h = f("parentDir", ""), p = f("parentLang", ""), b = o(() => a.dir || h), S = o(() => a.lang || p), t = y, u = c(null), v = c(null), r = c(!1);
|
|
53
|
+
let i = null;
|
|
54
|
+
const x = o(() => a.id || `search-${Math.random().toString(36).substr(2, 9)}`), V = o(() => [
|
|
55
|
+
"w-full bg-transparent outline-none border-none",
|
|
56
|
+
"placeholder:text-gray-400",
|
|
57
|
+
"focus:outline-none"
|
|
58
|
+
]), w = (l) => {
|
|
59
|
+
const n = l.target.value;
|
|
60
|
+
t("update:modelValue", n), clearTimeout(i), i = setTimeout(() => {
|
|
61
|
+
t("input", n), t("search", n);
|
|
62
|
+
}, a.debounce);
|
|
63
|
+
}, B = (l) => {
|
|
64
|
+
r.value = !0, t("focus", l);
|
|
65
|
+
}, C = (l) => {
|
|
66
|
+
r.value = !1, t("blur", l);
|
|
67
|
+
}, k = (l) => {
|
|
68
|
+
t("enter", a.modelValue), t("search", a.modelValue);
|
|
69
|
+
}, s = () => {
|
|
70
|
+
t("update:modelValue", ""), t("clear"), u.value?.focus();
|
|
71
|
+
}, z = () => {
|
|
72
|
+
u.value?.focus();
|
|
73
|
+
};
|
|
74
|
+
return T(() => {
|
|
75
|
+
clearTimeout(i);
|
|
76
|
+
}), m({ focus: z, clear: s }), (l, n) => (q(), A("div", {
|
|
77
|
+
ref_key: "containerRef",
|
|
78
|
+
ref: v,
|
|
79
|
+
class: N(["relative", e.containerClass, e.width])
|
|
80
|
+
}, [
|
|
81
|
+
R(D(K), {
|
|
82
|
+
"model-value": e.modelValue,
|
|
83
|
+
label: e.label,
|
|
84
|
+
hint: e.hint,
|
|
85
|
+
"persistent-hint": !!e.hint,
|
|
86
|
+
disabled: e.disabled,
|
|
87
|
+
readonly: e.readonly,
|
|
88
|
+
required: e.required,
|
|
89
|
+
error: !!e.error || e.errorMessages.length > 0,
|
|
90
|
+
"error-messages": e.errorMessages,
|
|
91
|
+
clearable: e.clearable && !e.loading,
|
|
92
|
+
size: e.size,
|
|
93
|
+
id: x.value,
|
|
94
|
+
prepend: e.prepend,
|
|
95
|
+
append: e.append,
|
|
96
|
+
"is-open": r.value,
|
|
97
|
+
"onClick:clear": s,
|
|
98
|
+
bg: e.bg,
|
|
99
|
+
border: e.border,
|
|
100
|
+
"text-color": e.textColor,
|
|
101
|
+
rounded: e.rounded,
|
|
102
|
+
dir: b.value,
|
|
103
|
+
lang: S.value,
|
|
104
|
+
width: e.width,
|
|
105
|
+
rules: e.rules
|
|
106
|
+
}, E({
|
|
107
|
+
control: g(({ attrs: I, events: M }) => [
|
|
108
|
+
d("input", F({
|
|
109
|
+
ref_key: "inputRef",
|
|
110
|
+
ref: u
|
|
111
|
+
}, I, L(M, !0), {
|
|
112
|
+
type: "search",
|
|
113
|
+
value: e.modelValue,
|
|
114
|
+
placeholder: r.value && !e.modelValue || !e.label && !e.modelValue ? e.placeholder : "",
|
|
115
|
+
class: V.value,
|
|
116
|
+
onInput: w,
|
|
117
|
+
onKeydown: j(k, ["enter"]),
|
|
118
|
+
onFocus: B,
|
|
119
|
+
onBlur: C
|
|
120
|
+
}), null, 16, $)
|
|
121
|
+
]),
|
|
122
|
+
_: 2
|
|
123
|
+
}, [
|
|
124
|
+
e.loading ? {
|
|
125
|
+
name: "append",
|
|
126
|
+
fn: g(() => [
|
|
127
|
+
n[0] || (n[0] = d("svg", {
|
|
128
|
+
class: "animate-spin h-4 w-4",
|
|
129
|
+
fill: "none",
|
|
130
|
+
viewBox: "0 0 24 24"
|
|
131
|
+
}, [
|
|
132
|
+
d("circle", {
|
|
133
|
+
class: "opacity-25",
|
|
134
|
+
cx: "12",
|
|
135
|
+
cy: "12",
|
|
136
|
+
r: "10",
|
|
137
|
+
stroke: "currentColor",
|
|
138
|
+
"stroke-width": "4"
|
|
139
|
+
}),
|
|
140
|
+
d("path", {
|
|
141
|
+
class: "opacity-75",
|
|
142
|
+
fill: "currentColor",
|
|
143
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 714 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
144
|
+
})
|
|
145
|
+
], -1))
|
|
146
|
+
]),
|
|
147
|
+
key: "0"
|
|
148
|
+
} : void 0
|
|
149
|
+
]), 1032, ["model-value", "label", "hint", "persistent-hint", "disabled", "readonly", "required", "error", "error-messages", "clearable", "size", "id", "prepend", "append", "is-open", "bg", "border", "text-color", "rounded", "dir", "lang", "width", "rules"])
|
|
150
|
+
], 2));
|
|
151
|
+
}
|
|
152
|
+
}, J = /* @__PURE__ */ H(O, [["__scopeId", "data-v-eb472641"]]);
|
|
153
|
+
export {
|
|
154
|
+
J as default
|
|
155
|
+
};
|
package/dist/favicon.ico
ADDED
|
Binary file
|