-
Notifications
You must be signed in to change notification settings - Fork 5
feat: Add ButtonSubmit #807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 128 commits
Commits
Show all changes
132 commits
Select commit
Hold shift + click to select a range
db8da7f
adds components list
dChiamp bd57d86
Update COMPONENTS.md
Sveb 4fa76ad
Update COMPONENTS.md
Sveb b4dc86d
Update COMPONENTS.md
Sveb 285e079
Update COMPONENTS.md
Sveb 213a640
adds notes
dChiamp 3004c74
Update COMPONENTS.md
Sveb 7a1e0aa
Merge branch 'main' of https://github.com/funkhaus/ucla-library-websi…
dChiamp e955637
claimed component
austinblanchard d5e45d1
Update COMPONENTS.md
Sveb d49eaf5
claim a component
lux-v 4b6cccf
claim a component
lux-v bfa79d4
Update COMPONENTS.md
Sveb 4852133
Update COMPONENTS.md
Sveb 2120974
Update COMPONENTS.md
Sveb c5d0581
take a component
lux-v fa2c258
add button-submit
lux-v d8241a2
remove unused import
lux-v af0a6b3
take a component
lux-v 2e73be7
take a component
lux-v 88bfe5e
Update COMPONENTS.md
austinblanchard 54deec4
Change storybook group name
lux-v 5d50d29
Change storybook group name
lux-v fa5a44b
add background color to button
lux-v 581dafd
add breakpoints
lux-v 22b88d7
Update COMPONENTS.md
Sveb 302c066
format a component with prettier
lux-v 498ab73
Adjust the component name - already exists
Sveb 3fd88d6
change hover color
lux-v 09c2fd0
take a component
lux-v 0c75f77
take a component
lux-v a7bf5fa
Update COMPONENTS.md
Sveb 069c123
Update COMPONENTS.md
Sveb cdb4a86
Update COMPONENTS.md
Sveb 8a29837
Update COMPONENTS.md
austinblanchard 7bdfa7a
Update COMPONENTS.md - marking BentoPod
Sveb bc0154d
add component
lux-v 597ef57
add component
lux-v 02aafc7
Update COMPONENTS.md
austinblanchard e675c1b
Update COMPONENTS.md
austinblanchard 2933c6d
take a component
lux-v d5c665a
take a component
lux-v e539e14
fix component description
lux-v 4808e2d
Update COMPONENTS.md
Sveb e372e04
Update COMPONENTS.md
Sveb 7d5d656
change component's name
lux-v ed656cf
Update COMPONENTS.md
Sveb 877fb65
take a component
lux-v 348494b
take a component
lux-v 45e6cf7
take a component
lux-v 183375c
remove AssetFeaturedImage definition
lux-v ee9dd92
take a component
lux-v 62919e6
take a components
lux-v 51430d6
take a components
lux-v f6de890
take a component
lux-v 76226de
take a component
lux-v d78dda6
add a new line
lux-v 7388620
add detailed component description
lux-v 63b619b
add detailed component description
lux-v e277dbe
take a component
lux-v 08e03ec
update component description
lux-v 0ee907a
Adds a button component
Sveb 864171d
Update COMPONENTS.md
Sveb 1bb618a
Update COMPONENTS.md
Sveb 54df91d
Update COMPONENTS.md
Sveb 0ed4fbb
Clean up components.md
Sveb b06efac
Taking the block-collection component
Sveb d31c91f
Taking the grid-collections component as well.
Sveb 94304d5
Update COMPONENTS.md
Sveb 279744a
Clean up component list
Sveb 82e0566
add spacing
lux-v d24c553
add spacing
lux-v 1a7297f
add dlc theme
lux-v c69bfac
Merge branch 'UCLALibrary:main' into main
lux-v 0f9c0aa
update component name
lux-v a10aa20
Update Button definition
lux-v 7f9084e
Update COMPONENTS.md
lux-v 4b9de5d
Update COMPONENTS.md
lux-v f3b329f
Remove duplicates
lux-v 2f4300d
remove duplicates
lux-v 2cde0d3
remove duplicates
lux-v df42ca4
Remove already existing components
lux-v 3db154c
Merge branch 'main' into main
lux-v 9287f6d
take a component
lux-v fe7041b
add a component
lux-v 05911af
Take a component
Sveb 92f95f4
adjust prop for block anchor nav
lux-v b876c86
take a component
lux-v 1d0497d
Update COMPONENTS.md
lux-v eec9a91
Merge branch 'main' into main
lux-v 4a3040f
Taking the DropdownSingleSelect
Sveb f72144c
Take the ButtonDropdownSearch component
Sveb 9beaa8f
Merge branch 'UCLALibrary:main' into main
lux-v 95d50e6
adding the correct packageMenager version for netlify to see.
Sveb 3aeb5a6
Merge pull request #30 from Sveb/installing-the-correct-pnpnm
Sveb 5af7c53
Merge branch 'main' of https://github.com/lux-v/ucla-library-website-…
lux-v 385d18f
Merge branch 'main' of https://github.com/funkhaus/ucla-library-websi…
lux-v 2954cb3
lint fix
lux-v 73a286e
Merge branch 'UCLALibrary:main' into main
lux-v 0b53484
Merge branch 'main' of https://github.com/lux-v/ucla-library-website-…
lux-v 74807a1
remove packageManager
lux-v 7947268
add proper storybook name
lux-v 4e2c716
add new line
lux-v f3e47de
Update COMPONENTS.md
Sveb cab92c8
Merge branch 'UCLALibrary:main' into main
lux-v 4284ea6
Marking a component as taken
Sveb 170b39f
Remove packageManager field from package.json
Sveb 336fda4
Update component statuses and remove completed items
Sveb fb8fc47
Merge branch 'UCLALibrary:main' into main
lux-v 21bfbcd
Update COMPONENTS.md
Sveb b8a8d23
Taking the FiltersDropdown
Sveb 345f8b9
Update COMPONENTS.md
lux-v 89788c4
Add note regarding existing header component tweaks
lux-v cfbbcd4
Update RefineSearchPanel ownership in COMPONENTS.md
Sveb 90661b7
Update DetailMedia component owner to Svebor
Sveb 12725ef
Update component list
austinblanchard 202ef87
Merge branch 'UCLALibrary:main' into main
lux-v 690b044
Clarify CTAHexButton entry in COMPONENTS.md
lux-v 3fe1723
Update COMPONENTS.md to remove and modify components
Sveb 6bc549e
Update component status and ownership in COMPONENTS.md
Sveb f570d75
Update component ownership in COMPONENTS.md
Sveb 5a8fab1
Merge branch 'UCLALibrary:main' into main
lux-v d902719
Merge branch 'UCLALibrary:main' into main
lux-v fb48e3b
Merge branch 'UCLALibrary:main' into main
lux-v e8a0500
Merge branch 'UCLALibrary:main' into main
lux-v 50aeb69
Merge branch 'UCLALibrary:main' into main
lux-v d388628
Merge branch 'main' of https://github.com/funkhaus/ucla-library-websi…
lux-v edfe481
Merge branch 'main' into button-submit
pghorpade c8f5fbb
Merge branch 'UCLALibrary:main' into main
lux-v d759bc3
Merge branch 'main' of https://github.com/funkhaus/ucla-library-websi…
lux-v 3d73304
remove NOTES.md
lux-v 124297f
Merge branch 'main' into button-submit
pghorpade File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,11 @@ | ||
| Designs: | ||
| https://www.figma.com/design/CDhWDARLb36ftkQce1LyLC/Breakpoints?node-id=1-25&m=dev | ||
|
|
||
| https://www.figma.com/design/CDhWDARLb36ftkQce1LyLC/Breakpoints?node-id=1-26&p=f&m=dev | ||
|
|
||
| Read in Recording: | ||
| https://drive.google.com/file/d/17tiGmE4aax-faoo5Rjue2Idbx3OGCFGa/view?usp=sharing | ||
|
|
||
| Relevant Links | ||
| https://www.library.ucla.edu/ | ||
| https://digital.library.ucla.edu/catalog/ark:/21198/z1x98m6j | ||
31 changes: 31 additions & 0 deletions
31
packages/vue-component-library/src/lib-components/ButtonSubmit.vue
This file contains hidden or 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,31 @@ | ||
| <script setup> | ||
| // Imports | ||
| import { computed, useSlots } from 'vue' | ||
| import IconSearch from 'ucla-library-design-tokens/assets/svgs/icon-search.svg' | ||
| import { useTheme } from '@/composables/useTheme' | ||
|
|
||
| const emit = defineEmits(['click']) | ||
| const slots = useSlots() | ||
|
|
||
| const theme = useTheme() | ||
|
|
||
| // Computeds | ||
| const classes = computed(() => ['button-submit', theme?.value || '']) | ||
|
|
||
| // Methods | ||
| function handleClick() { | ||
| emit('click') | ||
| } | ||
| </script> | ||
|
|
||
| <template> | ||
| <button :class="classes" type="submit" @click="handleClick"> | ||
| <slot> | ||
| <IconSearch /> | ||
| </slot> | ||
| </button> | ||
| </template> | ||
|
|
||
| <style lang="scss" scoped> | ||
| @import "@/styles/dlc/_button-submit.scss"; | ||
| </style> |
8 changes: 8 additions & 0 deletions
8
packages/vue-component-library/src/stories/ButtonSubmit.spec.js
This file contains hidden or 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,8 @@ | ||
| describe('Funkhaus / Button Submit', () => { | ||
| it('Default', () => { | ||
| cy.visit('/iframe.html?id=funkhaus-button-submit--default&args=&viewMode=story') | ||
| cy.get('.button-submit').should('exist') | ||
|
|
||
| cy.percySnapshot('Funkhaus / Button Submit') | ||
| }) | ||
| }) |
61 changes: 61 additions & 0 deletions
61
packages/vue-component-library/src/stories/ButtonSubmit.stories.js
This file contains hidden or 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,61 @@ | ||
| import SvgIconEye from 'ucla-library-design-tokens/assets/svgs/icon-eye.svg' | ||
| import { computed } from 'vue' | ||
| import ButtonSubmit from '@/lib-components/ButtonSubmit' | ||
|
|
||
| export default { | ||
| title: 'Funkhaus / Button Submit', | ||
| component: ButtonSubmit, | ||
| } | ||
|
|
||
| const methods = { | ||
| onSubmit() { | ||
| alert('Button clicked!') | ||
| }, | ||
| } | ||
|
|
||
| // Variations of stories below | ||
| export function Default() { | ||
| return { | ||
| components: { ButtonSubmit }, | ||
| provide() { | ||
| return { | ||
| theme: computed(() => 'dlc'), | ||
| } | ||
| }, | ||
| methods, | ||
| template: '<button-submit @click="onSubmit" />', | ||
| } | ||
| } | ||
|
|
||
| export function WithCustomIcon() { | ||
| return { | ||
| components: { ButtonSubmit }, | ||
| provide() { | ||
| return { | ||
| theme: computed(() => 'dlc'), | ||
| } | ||
| }, | ||
| data() { | ||
| return { | ||
| customIcon: SvgIconEye, | ||
| } | ||
| }, | ||
| methods, | ||
| template: ` | ||
| <button-submit @click="onSubmit"> | ||
| <template #default> | ||
| <component :is="customIcon" /> | ||
| </template> | ||
| </button-submit> | ||
| `, | ||
| } | ||
| } | ||
|
|
||
| // Variant: No theme provided (falls back to base styles) | ||
| export function NoThemeProvided() { | ||
| return { | ||
| components: { ButtonSubmit }, | ||
| methods, | ||
| template: '<button-submit @click="onSubmit" />', | ||
| } | ||
| } |
38 changes: 38 additions & 0 deletions
38
packages/vue-component-library/src/styles/dlc/_button-submit.scss
This file contains hidden or 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,38 @@ | ||
| .button-submit, | ||
| .dlc.button-submit { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
|
|
||
| height: 74px; | ||
| width: 74px; | ||
| padding: 0; | ||
| background-color: var(--color-primary-blue-01); | ||
|
|
||
| // Target SVG elements | ||
| :deep(svg path) { | ||
| fill: var(--color-primary-blue-04); | ||
| transition: fill 0.3s ease-in-out; | ||
| } | ||
|
|
||
| // Hovers | ||
| @media #{$has-hover} { | ||
| &:hover { | ||
| :deep(svg path) { | ||
| fill: var(--color-default-cyan-03); | ||
| } | ||
| } | ||
| } | ||
| // Breakpoints | ||
| @media #{$medium} { | ||
| height: 53px; | ||
| } | ||
| @media #{$small} { | ||
| height: 60px; | ||
|
|
||
| // Target SVG elements | ||
| :deep(svg path) { | ||
| fill: var(--color-default-cyan-03); | ||
| } | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove notes.md file. I copied this in the PR description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also we should be adding dlc theme to this component https://ucla-library-storybook.netlify.app/?path=/story/nav-search--default-with-placeholder-prop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We dont need this new component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This component is used in SearchFieldComposite.
SearchFieldCompositeis representing this component from Figma designsExample 1:
Example 2:

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lux-v I understand it is used in searchfiledcomposite. But we can use navSearch to create this

Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lux-v close this PR and update SearchComposite to use NavSearch