This repository has been archived by the owner on Aug 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
33f6869
commit 93f872f
Showing
28 changed files
with
413 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<template> | ||
<label class="fd-form__label" :aria-required="String(required)"> | ||
<slot /><template v-if="required" | ||
><slot name="required">*</slot></template | ||
> | ||
</label> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "FdFormLabel", | ||
props: { | ||
required: { | ||
type: Boolean, | ||
default: false | ||
} | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import FormLabel from "./FormLabel.vue"; | ||
import { pluginify } from "./../../util"; | ||
export default pluginify(FormLabel); | ||
export { FormLabel }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<template> | ||
<span :class="classes" /> | ||
<span :class="classes" role="presentation" /> | ||
</template> | ||
|
||
<script> | ||
|
37 changes: 28 additions & 9 deletions
37
src/components/Form/Controls/InputGroup.vue → src/components/InputGroup/InputGroup.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<span class="fd-input-group__addon" :class="classes"><slot /></span> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "FdInputGroupAddon", | ||
inject: { | ||
$_fdInputGroupAddonContext: { default: null } | ||
}, | ||
provide() { | ||
return { | ||
$_fdInputGroupAddon: this | ||
}; | ||
}, | ||
data() { | ||
return { | ||
hasButton: false | ||
}; | ||
}, | ||
computed: { | ||
addonContext() { | ||
return this.$_fdInputGroupAddonContext; | ||
}, | ||
classes() { | ||
return { | ||
"fd-input-group__addon--button": this.hasButton, | ||
"fd-input-group__addon--before": this.addonContext === "before", | ||
"fd-input-group__addon--after": this.addonContext === "after" | ||
}; | ||
} | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<template> | ||
<fd-button styling="light" v-bind="$attrs" v-on="$listeners" | ||
><slot | ||
/></fd-button> | ||
</template> | ||
|
||
<script> | ||
import FdButton from "./../Button/Button.vue"; | ||
export default { | ||
name: "FdInputGroupButton", | ||
components: { FdButton }, | ||
inject: ["$_fdInputGroupAddon"], | ||
mounted() { | ||
this.$_fdInputGroupAddon.hasButton = true; | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<template> | ||
<!-- the inline style is a workaround and should be removed --> | ||
<!-- once it has been fixed in fund. styles. --> | ||
<button | ||
class="fd-input-group__button fd-input-group__button--clear" | ||
style="z-index: 2;" | ||
aria-label="Clear" | ||
v-bind="$attrs" | ||
v-on="$listeners" | ||
> | ||
<slot /> | ||
</button> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: "FdInputGroupClearButton", | ||
inject: ["$_fdInputGroupAddon"], | ||
mounted() { | ||
this.$_fdInputGroupAddon.hasButton = true; | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<template> | ||
<fd-input-group> | ||
<template #input> | ||
<fd-input type="search" plain placeholder="Enter Search Term…" /> | ||
</template> | ||
<template #after-input> | ||
<fd-input-group-addon> | ||
<slot name="clear" /> | ||
</fd-input-group-addon> | ||
</template> | ||
</fd-input-group> | ||
</template> | ||
|
||
<script> | ||
import FdInputGroup from "./InputGroup.vue"; | ||
import FdInputGroupAddon from "./InputGroupAddon.vue"; | ||
export default { | ||
name: "FdInputGroupSearch", | ||
components: { FdInputGroup, FdInputGroupAddon } | ||
}; | ||
</script> |
Oops, something went wrong.