-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add default design with daisy for mobile prefab and add right c…
…lass on prefab mobile
- Loading branch information
Showing
6 changed files
with
145 additions
and
42 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
doc-app/app/controllers/docs/ember-input-validation/prefabs/mobile.ts
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,9 +1,21 @@ | ||
import Controller from '@ember/controller'; | ||
import { ImmerChangeset } from 'ember-immer-changeset'; | ||
import { tracked } from '@glimmer/tracking'; | ||
import type { Owner } from '@ember/test-helpers/build-owner'; | ||
|
||
export default class DocsEmberInputValidationPrefabsPhoneController extends Controller { | ||
@tracked changeset = new ImmerChangeset({ | ||
phone: '', | ||
error: '', | ||
disabled: '', | ||
}); | ||
constructor(owner: Owner) { | ||
super(owner); | ||
this.changeset.addError({ | ||
message: 'This is an error message', | ||
value: '', | ||
originalValue: '', | ||
key: 'error', | ||
}); | ||
} | ||
} |
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
61 changes: 61 additions & 0 deletions
61
packages/ember-input-validation/src/components/prefabs/styles/tpk-mobile.css
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,61 @@ | ||
.tpk-mobile-container { | ||
@apply relative pb-4; | ||
} | ||
|
||
.tpk-mobile-container .tpk-label { | ||
@apply label; | ||
} | ||
|
||
.tpk-mobile-input { | ||
@apply input input-bordered w-full; | ||
} | ||
|
||
.tpk-mobile-content { | ||
@apply flex space-x-2; | ||
} | ||
|
||
.tpk-mobile-content .ember-basic-dropdown-trigger { | ||
@apply input input-bordered pr-10 !rounded-lg; | ||
} | ||
|
||
.tpk-mobile-content .ember-basic-dropdown-trigger[aria-disabled="true"] { | ||
cursor: not-allowed; | ||
--tw-border-opacity: 1; | ||
border-color: var(--fallback-b2, oklch(var(--b2) / var(--tw-border-opacity))); | ||
--tw-bg-opacity: 1; | ||
background-color: var(--fallback-b2, oklch(var(--b2) / var(--tw-bg-opacity))); | ||
color: var(--fallback-bc, oklch(var(--bc) / .4)); | ||
} | ||
|
||
.tpk-mobile-content .ember-power-select-selected-item { | ||
@apply m-0 h-full flex justify-center items-center; | ||
} | ||
|
||
.tpk-mobile-content .ember-basic-dropdown-content { | ||
@apply rounded-lg mt-2.5 z-[100]; | ||
--tw-bg-opacity: 1; | ||
border-color: var(--fallback-bc, oklch(var(--bc) / 0.2)); | ||
background-color: var(--fallback-b1, oklch(var(--b1) / var(--tw-bg-opacity))); | ||
} | ||
|
||
.tpk-mobile-container .ember-basic-dropdown-trigger .flag, .tpk-mobile-container .ember-power-select-option .flag { | ||
@apply flex items-center space-x-2; | ||
} | ||
|
||
.tpk-mobile-container[data-has-error~="true"] > .tpk-text-input { | ||
@apply input-error text-error; | ||
} | ||
|
||
.tpk-mobile-container[data-has-error~="true"] | ||
.tpk-validation-errors { | ||
@apply text-error text-sm justify-self-end right-0 absolute; | ||
} | ||
|
||
.tpk-mobile-container[data-has-error~="true"] .tpk-mobile-input { | ||
@apply input-error text-error; | ||
} | ||
|
||
.tpk-mobile-container[data-has-error~="true"] .tpk-label { | ||
@apply text-error label; | ||
} | ||
|
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