@phila/phila-ui-input-form 0.0.3 → 0.0.7
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 +68 -11
- package/dist/InputForm.vue.d.ts +3 -49
- package/dist/InputForm.vue.d.ts.map +1 -0
- package/dist/index.css +0 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/index.mjs +22 -0
- package/package.json +41 -26
- package/dist/InputForm.css +0 -1
- package/dist/InputForm.js +0 -64
- package/dist/InputForm.umd.cjs +0 -2
- package/dist/types.d.ts +0 -13
package/README.md
CHANGED
|
@@ -1,18 +1,75 @@
|
|
|
1
|
-
#
|
|
1
|
+
# InputForm Component
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A simple, customizable Vue 3. InputForm component built with TypeScript and Vite.
|
|
4
|
+
A form component for the basic layout of inputs, errors and actions.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## Features
|
|
6
7
|
|
|
7
|
-
-
|
|
8
|
+
- 🎯 TypeScript support with full type definitions
|
|
8
9
|
|
|
9
|
-
##
|
|
10
|
+
## Installation
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
```bash
|
|
13
|
+
npm install @phila/phila-ui-input-form
|
|
14
|
+
# or
|
|
15
|
+
yarn add @phila/phila-ui-input-form
|
|
16
|
+
# or
|
|
17
|
+
pnpm add @phila/phila-ui-input-form
|
|
18
|
+
```
|
|
12
19
|
|
|
13
|
-
|
|
20
|
+
## Usage
|
|
14
21
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
```vue
|
|
23
|
+
<script setup lang="ts">
|
|
24
|
+
import { InputForm } from "@phila/phila-ui-input-form";
|
|
25
|
+
</script>
|
|
26
|
+
<template>...Add basic component template here...</template>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Props
|
|
30
|
+
|
|
31
|
+
| Prop | Type | Default | Description |
|
|
32
|
+
| ---- | ---- | ------- | ----------- |
|
|
33
|
+
|
|
34
|
+
| ...Add props here...
|
|
35
|
+
|
|
36
|
+
## Events
|
|
37
|
+
|
|
38
|
+
| Event | Payload | Description |
|
|
39
|
+
| ----- | ------- | ----------- |
|
|
40
|
+
|
|
41
|
+
| ...Add events here...
|
|
42
|
+
|
|
43
|
+
## Examples
|
|
44
|
+
|
|
45
|
+
...Add examples here...
|
|
46
|
+
|
|
47
|
+
## Development
|
|
48
|
+
|
|
49
|
+
### Install Dependencies
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pnpm install
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Run Demo
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pnpm dev
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Build Library
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pnpm build
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Type Check
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pnpm type-check
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
MIT
|
package/dist/InputForm.vue.d.ts
CHANGED
|
@@ -1,50 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { InputFormProps }
|
|
3
|
-
|
|
4
|
-
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<InputProps & InputFormProps>, {
|
|
5
|
-
title: string;
|
|
6
|
-
desc: string;
|
|
7
|
-
hideErrorsCount: boolean;
|
|
8
|
-
errorsCount: number;
|
|
9
|
-
errors(): never[];
|
|
10
|
-
id: any;
|
|
11
|
-
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<InputProps & InputFormProps>, {
|
|
12
|
-
title: string;
|
|
13
|
-
desc: string;
|
|
14
|
-
hideErrorsCount: boolean;
|
|
15
|
-
errorsCount: number;
|
|
16
|
-
errors(): never[];
|
|
17
|
-
id: any;
|
|
18
|
-
}>>>, {
|
|
19
|
-
id: string;
|
|
20
|
-
errors: import('@phila/phila-ui-core').InputErrors;
|
|
21
|
-
title: string;
|
|
22
|
-
desc: string;
|
|
23
|
-
hideErrorsCount: boolean;
|
|
24
|
-
}, {}>, {
|
|
25
|
-
default?(_: {}): any;
|
|
26
|
-
submit?(_: {}): any;
|
|
27
|
-
}>;
|
|
1
|
+
import { InputFormProps } from './index';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<InputFormProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<InputFormProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
28
3
|
export default _default;
|
|
29
|
-
|
|
30
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
31
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
32
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
33
|
-
} : {
|
|
34
|
-
type: import('vue').PropType<T[K]>;
|
|
35
|
-
required: true;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
type __VLS_WithDefaults<P, D> = {
|
|
39
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
40
|
-
default: D[K];
|
|
41
|
-
}> : P[K];
|
|
42
|
-
};
|
|
43
|
-
type __VLS_Prettify<T> = {
|
|
44
|
-
[K in keyof T]: T[K];
|
|
45
|
-
} & {};
|
|
46
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
47
|
-
new (): {
|
|
48
|
-
$slots: S;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
4
|
+
//# sourceMappingURL=InputForm.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputForm.vue.d.ts","sourceRoot":"","sources":["../src/InputForm.vue"],"names":[],"mappings":"AAGA;AAgCA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;;AA+D9C,wBASG"}
|
package/dist/index.css
ADDED
|
File without changes
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIvD,MAAM,WAAW,cAAe,SAAQ,SAAS;CAEhD"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');const e=require("vue"),c=require("@phila/phila-ui-core"),a=e.defineComponent({__name:"InputForm",props:{className:{}},setup(t,{emit:n}){const o=t,s=e.computed(()=>c.cn("default-class",o.className));return(r,u)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(s.value)}," Hello world! I am InputForm ",2))}}),l=(t,n)=>{const o=t.__vccOpts||t;for(const[s,r]of n)o[s]=r;return o},p=l(a,[["__scopeId","data-v-622eda3a"]]);exports.InputForm=p;
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineComponent as n, computed as r, createElementBlock as a, openBlock as m, normalizeClass as p } from "vue";
|
|
2
|
+
import { cn as l } from "@phila/phila-ui-core";
|
|
3
|
+
import './index.css';const _ = /* @__PURE__ */ n({
|
|
4
|
+
__name: "InputForm",
|
|
5
|
+
props: {
|
|
6
|
+
className: {}
|
|
7
|
+
},
|
|
8
|
+
setup(e, { emit: s }) {
|
|
9
|
+
const t = e, o = r(() => l("default-class", t.className));
|
|
10
|
+
return (c, d) => (m(), a("span", {
|
|
11
|
+
class: p(o.value)
|
|
12
|
+
}, " Hello world! I am InputForm ", 2));
|
|
13
|
+
}
|
|
14
|
+
}), u = (e, s) => {
|
|
15
|
+
const t = e.__vccOpts || e;
|
|
16
|
+
for (const [o, c] of s)
|
|
17
|
+
t[o] = c;
|
|
18
|
+
return t;
|
|
19
|
+
}, I = /* @__PURE__ */ u(_, [["__scopeId", "data-v-622eda3a"]]);
|
|
20
|
+
export {
|
|
21
|
+
I as InputForm
|
|
22
|
+
};
|
package/package.json
CHANGED
|
@@ -1,37 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phila/phila-ui-input-form",
|
|
3
|
-
"
|
|
4
|
-
"version": "0.0.3",
|
|
3
|
+
"version": "0.0.7",
|
|
5
4
|
"type": "module",
|
|
5
|
+
"description": "A form component for the basic layout of inputs, errors and actions.",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"require": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
6
16
|
"files": [
|
|
7
17
|
"dist"
|
|
8
18
|
],
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"registry": "https://registry.npmjs.com/",
|
|
20
|
-
"access": "public"
|
|
19
|
+
"keywords": [
|
|
20
|
+
"ui",
|
|
21
|
+
"input-form",
|
|
22
|
+
"vue",
|
|
23
|
+
"component"
|
|
24
|
+
],
|
|
25
|
+
"author": "",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"vue": "^3.0.0"
|
|
21
29
|
},
|
|
22
30
|
"dependencies": {
|
|
23
|
-
"@phila/phila-ui-core": "
|
|
24
|
-
"vue": "^3.3.8"
|
|
31
|
+
"@phila/phila-ui-core": "2.1.0"
|
|
25
32
|
},
|
|
26
33
|
"devDependencies": {
|
|
27
|
-
"@types/node": "^
|
|
28
|
-
"@vitejs/plugin-vue": "^
|
|
29
|
-
"
|
|
30
|
-
"typescript": "^5.
|
|
31
|
-
"vite": "^
|
|
32
|
-
"vite-plugin-dts": "^
|
|
33
|
-
"vite-plugin-lib-inject-css": "^
|
|
34
|
-
"vue-tsc": "^1.8.22"
|
|
34
|
+
"@types/node": "^24.0.0",
|
|
35
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
36
|
+
"eslint": "^9.0.0",
|
|
37
|
+
"typescript": "^5.8.3",
|
|
38
|
+
"vite": "^7.0.6",
|
|
39
|
+
"vite-plugin-dts": "^4.5.4",
|
|
40
|
+
"vite-plugin-lib-inject-css": "^2.2.2"
|
|
35
41
|
},
|
|
36
|
-
"
|
|
37
|
-
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "vite build",
|
|
44
|
+
"dev": "vite build --watch",
|
|
45
|
+
"lint": "eslint src --ext .ts,.tsx,.vue",
|
|
46
|
+
"lint:fix": "eslint src --ext .ts,.tsx,.vue --fix",
|
|
47
|
+
"type-check": "tsc --noEmit",
|
|
48
|
+
"clean": "rm -rf dist",
|
|
49
|
+
"format": "prettier --write .",
|
|
50
|
+
"format:check": "prettier --check ."
|
|
51
|
+
}
|
|
52
|
+
}
|
package/dist/InputForm.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@font-face{font-family:Montserrat;src:local("Montserrat Regular"),local("Montserrat-Regular"),url(https://www.phila.gov/assets/fonts/Montserrat/Montserrat-Regular.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/Montserrat/Montserrat-Regular.woff) format("woff");font-weight:400;font-style:normal}@font-face{font-family:Open Sans;src:local("Open Sans Italic"),local("OpenSans-Italic"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Italic.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Italic.woff) format("woff");font-weight:400;font-style:italic}@font-face{font-family:Open Sans;src:local("Open Sans Bold Italic"),local("OpenSans-BoldItalic"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-BoldItalic.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-BoldItalic.woff) format("woff");font-weight:700;font-style:italic}@font-face{font-family:Montserrat;src:local("Montserrat Bold"),local("Montserrat-Bold"),url(https://www.phila.gov/assets/fonts/Montserrat/Montserrat-Bold.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/Montserrat/Montserrat-Bold.woff) format("woff");font-weight:700;font-style:normal}@font-face{font-family:Open Sans;src:local("Open Sans Bold"),local("OpenSans-Bold"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Bold.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Bold.woff) format("woff");font-weight:700;font-style:normal}@font-face{font-family:Open Sans;src:local("Open Sans SemiBold Italic"),local("OpenSans-SemiBoldItalic"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-SemiBoldItalic.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-SemiBoldItalic.woff) format("woff");font-weight:600;font-style:italic}@font-face{font-family:Open Sans;src:local("Open Sans SemiBold"),local("OpenSans-SemiBold"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-SemiBold.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-SemiBold.woff) format("woff");font-weight:600;font-style:normal}@font-face{font-family:Open Sans;src:local("Open Sans Regular"),local("OpenSans-Regular"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Regular.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Regular.woff) format("woff");font-weight:400;font-style:normal}.form-title[data-v-906e820c]{font-family:Montserrat,BlinkMacSystemFont,-apple-system,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;color:#444;font-weight:600;margin:0 0 .5rem;line-height:2.1875rem;font-size:1.75rem!important}.form-errors[data-v-906e820c]{font-size:.875rem;padding:1rem 1.5rem;background-color:#fee7e7;margin:1rem 0}.form-errors span.icon[data-v-906e820c]{font-size:1rem}
|
package/dist/InputForm.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import "./InputForm.css";
|
|
2
|
-
import { defineComponent as f, computed as h, openBlock as s, createElementBlock as a, mergeProps as v, toDisplayString as d, createCommentVNode as i, renderSlot as c, createElementVNode as u, pushScopeId as y, popScopeId as _ } from "vue";
|
|
3
|
-
import g from "@phila/phila-ui-core";
|
|
4
|
-
const k = (t) => (y("data-v-906e820c"), t = t(), _(), t), b = ["id"], I = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "form-title form-padding"
|
|
7
|
-
}, C = {
|
|
8
|
-
key: 1,
|
|
9
|
-
class: "form-subtitle form-padding"
|
|
10
|
-
}, B = {
|
|
11
|
-
key: 2,
|
|
12
|
-
class: "form-errors has-text-centered has-text-weight-bold has-text-love-park-red-dark"
|
|
13
|
-
}, E = /* @__PURE__ */ k(() => /* @__PURE__ */ u("span", { class: "icon" }, [
|
|
14
|
-
/* @__PURE__ */ u("i", { class: "fa fa-exclamation-triangle" })
|
|
15
|
-
], -1)), S = {
|
|
16
|
-
key: 3,
|
|
17
|
-
class: "form-submit form-padding"
|
|
18
|
-
}, { formHelpers: $ } = g, { randomID: V } = $, O = /* @__PURE__ */ f({
|
|
19
|
-
__name: "InputForm",
|
|
20
|
-
props: {
|
|
21
|
-
id: { default: V() },
|
|
22
|
-
errors: { default() {
|
|
23
|
-
return [];
|
|
24
|
-
} },
|
|
25
|
-
optgroup: { type: Boolean },
|
|
26
|
-
disableableOptions: { type: Boolean },
|
|
27
|
-
options: {},
|
|
28
|
-
name: {},
|
|
29
|
-
textKey: {},
|
|
30
|
-
valueKey: {},
|
|
31
|
-
imaskProps: {},
|
|
32
|
-
title: { default: "" },
|
|
33
|
-
desc: { default: "" },
|
|
34
|
-
hideErrorsCount: { type: Boolean, default: !1 }
|
|
35
|
-
},
|
|
36
|
-
setup(t) {
|
|
37
|
-
const o = t, r = h(() => Array.isArray(o.errors) ? o.errors.length : typeof o.errors == "string" || typeof o.errors == "number" ? 1 : l(o.errors)), l = (e) => Object.keys(e).map((n) => e[n]).reduce(
|
|
38
|
-
(n, m) => m.length > 0 ? n + 1 : n,
|
|
39
|
-
0
|
|
40
|
-
);
|
|
41
|
-
return (e, p) => (s(), a("form", v({
|
|
42
|
-
id: `form-${e.id}`
|
|
43
|
-
}, e.$attrs, { novalidate: "" }), [
|
|
44
|
-
e.title ? (s(), a("div", I, d(e.title), 1)) : i("", !0),
|
|
45
|
-
e.desc ? (s(), a("p", C, d(e.desc), 1)) : i("", !0),
|
|
46
|
-
c(e.$slots, "default", {}, void 0, !0),
|
|
47
|
-
!e.hideErrorsCount && r.value > 0 ? (s(), a("div", B, [
|
|
48
|
-
E,
|
|
49
|
-
u("span", null, " This form has " + d(r.value) + " error" + d(r.value > 1 ? "s" : ""), 1)
|
|
50
|
-
])) : i("", !0),
|
|
51
|
-
e.$slots.submit ? (s(), a("div", S, [
|
|
52
|
-
c(e.$slots, "submit", {}, void 0, !0)
|
|
53
|
-
])) : i("", !0)
|
|
54
|
-
], 16, b));
|
|
55
|
-
}
|
|
56
|
-
}), P = (t, o) => {
|
|
57
|
-
const r = t.__vccOpts || t;
|
|
58
|
-
for (const [l, e] of o)
|
|
59
|
-
r[l] = e;
|
|
60
|
-
return r;
|
|
61
|
-
}, K = /* @__PURE__ */ P(O, [["__scopeId", "data-v-906e820c"]]);
|
|
62
|
-
export {
|
|
63
|
-
K as default
|
|
64
|
-
};
|
package/dist/InputForm.umd.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(function(t,a){typeof exports=="object"&&typeof module<"u"?module.exports=a(require("vue"),require("@phila/phila-ui-core")):typeof define=="function"&&define.amd?define(["vue","@phila/phila-ui-core"],a):(t=typeof globalThis<"u"?globalThis:t||self,t.InputForm=a(t.Vue,t.PhilaUICore))})(this,function(t,a){"use strict";var f=document.createElement("style");f.textContent=`@font-face{font-family:Montserrat;src:local("Montserrat Regular"),local("Montserrat-Regular"),url(https://www.phila.gov/assets/fonts/Montserrat/Montserrat-Regular.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/Montserrat/Montserrat-Regular.woff) format("woff");font-weight:400;font-style:normal}@font-face{font-family:Open Sans;src:local("Open Sans Italic"),local("OpenSans-Italic"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Italic.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Italic.woff) format("woff");font-weight:400;font-style:italic}@font-face{font-family:Open Sans;src:local("Open Sans Bold Italic"),local("OpenSans-BoldItalic"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-BoldItalic.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-BoldItalic.woff) format("woff");font-weight:700;font-style:italic}@font-face{font-family:Montserrat;src:local("Montserrat Bold"),local("Montserrat-Bold"),url(https://www.phila.gov/assets/fonts/Montserrat/Montserrat-Bold.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/Montserrat/Montserrat-Bold.woff) format("woff");font-weight:700;font-style:normal}@font-face{font-family:Open Sans;src:local("Open Sans Bold"),local("OpenSans-Bold"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Bold.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Bold.woff) format("woff");font-weight:700;font-style:normal}@font-face{font-family:Open Sans;src:local("Open Sans SemiBold Italic"),local("OpenSans-SemiBoldItalic"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-SemiBoldItalic.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-SemiBoldItalic.woff) format("woff");font-weight:600;font-style:italic}@font-face{font-family:Open Sans;src:local("Open Sans SemiBold"),local("OpenSans-SemiBold"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-SemiBold.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-SemiBold.woff) format("woff");font-weight:600;font-style:normal}@font-face{font-family:Open Sans;src:local("Open Sans Regular"),local("OpenSans-Regular"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Regular.woff2) format("woff2"),url(https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Regular.woff) format("woff");font-weight:400;font-style:normal}.form-title[data-v-906e820c]{font-family:Montserrat,BlinkMacSystemFont,-apple-system,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif;color:#444;font-weight:600;margin:0 0 .5rem;line-height:2.1875rem;font-size:1.75rem!important}.form-errors[data-v-906e820c]{font-size:.875rem;padding:1rem 1.5rem;background-color:#fee7e7;margin:1rem 0}.form-errors span.icon[data-v-906e820c]{font-size:1rem}
|
|
2
|
-
`,document.head.appendChild(f);const i=o=>(t.pushScopeId("data-v-906e820c"),o=o(),t.popScopeId(),o),p=["id"],c={key:0,class:"form-title form-padding"},m={key:1,class:"form-subtitle form-padding"},d={key:2,class:"form-errors has-text-centered has-text-weight-bold has-text-love-park-red-dark"},w=i(()=>t.createElementVNode("span",{class:"icon"},[t.createElementVNode("i",{class:"fa fa-exclamation-triangle"})],-1)),h={key:3,class:"form-submit form-padding"},{formHelpers:u}=a,{randomID:S}=u,g=t.defineComponent({__name:"InputForm",props:{id:{default:S()},errors:{default(){return[]}},optgroup:{type:Boolean},disableableOptions:{type:Boolean},options:{},name:{},textKey:{},valueKey:{},imaskProps:{},title:{default:""},desc:{default:""},hideErrorsCount:{type:Boolean,default:!1}},setup(o){const n=o,s=t.computed(()=>Array.isArray(n.errors)?n.errors.length:typeof n.errors=="string"||typeof n.errors=="number"?1:l(n.errors)),l=e=>Object.keys(e).map(r=>e[r]).reduce((r,y)=>y.length>0?r+1:r,0);return(e,O)=>(t.openBlock(),t.createElementBlock("form",t.mergeProps({id:`form-${e.id}`},e.$attrs,{novalidate:""}),[e.title?(t.openBlock(),t.createElementBlock("div",c,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.desc?(t.openBlock(),t.createElementBlock("p",m,t.toDisplayString(e.desc),1)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"default",{},void 0,!0),!e.hideErrorsCount&&s.value>0?(t.openBlock(),t.createElementBlock("div",d,[w,t.createElementVNode("span",null," This form has "+t.toDisplayString(s.value)+" error"+t.toDisplayString(s.value>1?"s":""),1)])):t.createCommentVNode("",!0),e.$slots.submit?(t.openBlock(),t.createElementBlock("div",h,[t.renderSlot(e.$slots,"submit",{},void 0,!0)])):t.createCommentVNode("",!0)],16,p))}});return((o,n)=>{const s=o.__vccOpts||o;for(const[l,e]of n)s[l]=e;return s})(g,[["__scopeId","data-v-906e820c"]])});
|
package/dist/types.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { default as InputForm } from './InputForm.vue';
|
|
2
|
-
|
|
3
|
-
declare module "vue" {
|
|
4
|
-
interface GlobalComponents {
|
|
5
|
-
InputForm: typeof InputForm;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
export interface InputFormProps {
|
|
9
|
-
title?: string;
|
|
10
|
-
desc?: string;
|
|
11
|
-
hideErrorsCount: boolean;
|
|
12
|
-
}
|
|
13
|
-
export default InputForm;
|