@toife/vue 3.0.7 → 3.1.3
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 +4 -2
- package/package.json +4 -7
- package/src/components/action/action.html +1 -1
- package/src/components/action/action.scss +1 -1
- package/src/components/app/app.scss +1 -1
- package/src/components/avatar/avatar.scss +1 -1
- package/src/components/button/button.scss +1 -1
- package/src/components/cable/cable.scss +1 -1
- package/src/components/card/card/card.scss +1 -1
- package/src/components/card/card-body/card-body.scss +1 -1
- package/src/components/card/card-footer/card-footer.scss +1 -1
- package/src/components/card/card-header/card-header.scss +1 -1
- package/src/components/checkbox/checkbox.scss +1 -1
- package/src/components/collapse/collapse.scss +1 -1
- package/src/components/container/container.scss +1 -1
- package/src/components/decision-modal/decision-modal.scss +6 -1
- package/src/components/divider/divider.md +6 -6
- package/src/components/divider/divider.scss +1 -1
- package/src/components/divider/divider.type.ts +2 -2
- package/src/components/divider/divider.vue +2 -2
- package/src/components/divider/index.ts +1 -1
- package/src/components/dropdown/dropdown.scss +4 -10
- package/src/components/field/outline/outline.html +13 -13
- package/src/components/field/outline/outline.scss +97 -36
- package/src/components/field/outline/outline.vue +59 -16
- package/src/components/form-group/form-group.md +4 -4
- package/src/components/form-group/form-group.scss +1 -1
- package/src/components/form-group/form-group.type.ts +2 -2
- package/src/components/form-group/form-group.vue +2 -2
- package/src/components/gesture-indicator/gesture-indicator.scss +1 -1
- package/src/components/index.ts +1 -0
- package/src/components/layout/cell/cell.html +1 -0
- package/src/components/layout/cell/cell.md +47 -0
- package/src/components/layout/cell/cell.scss +54 -0
- package/src/components/layout/cell/cell.type.ts +19 -0
- package/src/components/layout/cell/cell.vue +35 -0
- package/src/components/layout/cell/index.ts +2 -0
- package/src/components/layout/flex/flex.html +1 -0
- package/src/components/layout/flex/flex.scss +59 -0
- package/src/components/layout/flex/flex.type.ts +15 -0
- package/src/components/layout/flex/flex.vue +34 -0
- package/src/components/layout/flex/index.ts +2 -0
- package/src/components/layout/grid/grid.html +1 -0
- package/src/components/layout/grid/grid.md +50 -0
- package/src/components/layout/grid/grid.scss +53 -0
- package/src/components/layout/grid/grid.type.ts +12 -0
- package/src/components/layout/grid/grid.vue +32 -0
- package/src/components/layout/grid/index.ts +2 -0
- package/src/components/layout/index.ts +3 -0
- package/src/components/modal/modal.scss +1 -1
- package/src/components/page/page.scss +1 -1
- package/src/components/present/present.scss +1 -1
- package/src/components/radio/radio/radio.scss +1 -1
- package/src/components/radio/radio-group/index.ts +1 -1
- package/src/components/radio/radio-group/radio-group.md +10 -10
- package/src/components/radio/radio-group/radio-group.scss +1 -1
- package/src/components/radio/radio-group/radio-group.type.ts +2 -2
- package/src/components/radio/radio-group/radio-group.vue +2 -2
- package/src/components/refresher/refresher.scss +1 -1
- package/src/components/route/route-navigator/route-navigator.scss +5 -5
- package/src/components/route/route-navigator/route-navigator.vue +26 -20
- package/src/components/segmented-field/segmented-field.scss +1 -1
- package/src/components/select/index.ts +1 -1
- package/src/components/select/select.html +9 -6
- package/src/components/select/select.scss +82 -11
- package/src/components/select/select.type.ts +14 -1
- package/src/components/select/select.vue +38 -8
- package/src/components/skeleton/skeleton.scss +1 -1
- package/src/components/switch/switch.scss +1 -1
- package/src/components/tabs/tabs/tabs.scss +6 -6
- package/src/components/toast/toast/toast.scss +1 -1
- package/src/components/toast/toast-content/toast-content.scss +1 -1
- package/src/components/toolbar/toolbar.html +1 -3
- package/src/components/toolbar/toolbar.md +5 -8
- package/src/components/toolbar/toolbar.scss +25 -40
- package/src/components/toolbar/toolbar.type.ts +1 -1
- package/src/components/toolbar/toolbar.vue +4 -4
- package/src/factory.ts +6 -0
- package/src/utils/style/index.ts +1 -1
package/README.md
CHANGED
|
@@ -27,6 +27,8 @@ Usage docs live **next to source** under `src/`. Authoring scaffold: [docs/templ
|
|
|
27
27
|
| [field.md](src/components/field/field.md) | `t-field` |
|
|
28
28
|
| [form-group.md](src/components/form-group/form-group.md) | `t-form-group` |
|
|
29
29
|
| [gesture-indicator.md](src/components/gesture-indicator/gesture-indicator.md) | `t-gesture-indicator` |
|
|
30
|
+
| [grid.md](src/components/grid/grid/grid.md) | `t-grid` |
|
|
31
|
+
| [grid-item.md](src/components/grid/grid-item/grid-item.md) | `t-grid-item` |
|
|
30
32
|
| [image.md](src/components/image/image.md) | `t-image` |
|
|
31
33
|
| [modal.md](src/components/modal/modal.md) | `t-modal` |
|
|
32
34
|
| [page.md](src/components/page/page.md) | `t-page` |
|
|
@@ -62,7 +64,7 @@ Usage docs live **next to source** under `src/`. Authoring scaffold: [docs/templ
|
|
|
62
64
|
| `vue` ^3.5 | Required |
|
|
63
65
|
| `vue-router` ^4 | Required when using route-related components |
|
|
64
66
|
| `@toife/gesture` | Gestures |
|
|
65
|
-
| `@toife/sass-layer
|
|
67
|
+
| `@toife/sass-layer` | Component SCSS uses `@use`; install in the app and configure Sass (e.g. Vite `css.preprocessorOptions`) |
|
|
66
68
|
|
|
67
69
|
## Installation
|
|
68
70
|
|
|
@@ -217,7 +219,7 @@ See [src/utils/element.md](src/utils/element.md), [src/utils/events.md](src/util
|
|
|
217
219
|
|
|
218
220
|
## Sass / theming
|
|
219
221
|
|
|
220
|
-
Component styles use `@use "@toife/sass-layer
|
|
222
|
+
Component styles use `@use "@toife/sass-layer"` and SCSS under `src`. Configure **sass-embedded** / **sass** and any aliases in **your** app so tokens, layers, and variables resolve when you build.
|
|
221
223
|
|
|
222
224
|
## License
|
|
223
225
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toife/vue",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.3",
|
|
4
4
|
"description": "A Frontend framework for Vue",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"registry": "https://registry.npmjs.org/"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@toife/gesture": "^1.1.4",
|
|
34
33
|
"vue": "^3.5.0",
|
|
35
34
|
"vue-router": "^4.0.0"
|
|
36
35
|
},
|
|
@@ -47,6 +46,8 @@
|
|
|
47
46
|
"devDependencies": {
|
|
48
47
|
"@commitlint/cli": "^20.4.4",
|
|
49
48
|
"@commitlint/config-conventional": "^20.4.4",
|
|
49
|
+
"@toife/gesture": "^1.1.5",
|
|
50
|
+
"@toife/sass-layer": "^1.0.2",
|
|
50
51
|
"@types/node": "^25.0.3",
|
|
51
52
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
52
53
|
"husky": "^9.1.7",
|
|
@@ -58,9 +59,5 @@
|
|
|
58
59
|
"vue": "^3.5.0",
|
|
59
60
|
"vue-router": "^4.0.0"
|
|
60
61
|
},
|
|
61
|
-
"packageManager": "yarn@4.12.0"
|
|
62
|
-
"dependencies": {
|
|
63
|
-
"@toife/gesture": "^1.1.4",
|
|
64
|
-
"@toife/sass-layer-generator": "^1.1.0"
|
|
65
|
-
}
|
|
62
|
+
"packageManager": "yarn@4.12.0"
|
|
66
63
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
>
|
|
8
8
|
<div v-bind="actionAttrs">
|
|
9
9
|
<slot name="body">
|
|
10
|
-
<FormGroup
|
|
10
|
+
<FormGroup direction="vertical" v-for="(buttons, groupIndex) in actions" :key="groupIndex">
|
|
11
11
|
<CustomButton
|
|
12
12
|
v-for="(btn, btnIndex) in buttons"
|
|
13
13
|
:key="`${groupIndex}-${btnIndex}`"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use "@toife/sass-layer
|
|
1
|
+
@use "@toife/sass-layer" as sass;
|
|
2
2
|
|
|
3
3
|
// Class name
|
|
4
4
|
$decision-modal: sass.fn-naming-prefix("decision-modal");
|
|
@@ -11,6 +11,7 @@ $shape-pill: sass.fn-naming-prefix("shape-pill");
|
|
|
11
11
|
// Property name - layer: decision-modal
|
|
12
12
|
$decision-modal-background-color: sass.fn-naming-var("decision-modal", "background-color");
|
|
13
13
|
$decision-modal-border-color: sass.fn-naming-var("decision-modal", "border-color");
|
|
14
|
+
$decision-modal-color: sass.fn-naming-var("decision-modal", "color");
|
|
14
15
|
|
|
15
16
|
$border-radius: sass.fn-naming-var("border-radius");
|
|
16
17
|
$width: sass.fn-naming-var("viewport", "width");
|
|
@@ -26,6 +27,7 @@ $transition-duration: sass.fn-naming-var("motion", "duration");
|
|
|
26
27
|
.#{$decision-modal} {
|
|
27
28
|
// Styles
|
|
28
29
|
background-color: rgb(#{$decision-modal-background-color});
|
|
30
|
+
color: rgb(#{$decision-modal-color});
|
|
29
31
|
width: #{$width};
|
|
30
32
|
max-width: #{$max-width};
|
|
31
33
|
overflow: hidden;
|
|
@@ -47,6 +49,7 @@ $transition-duration: sass.fn-naming-var("motion", "duration");
|
|
|
47
49
|
align-items: center;
|
|
48
50
|
font-weight: 600;
|
|
49
51
|
border-bottom: #{$border-width} solid transparent;
|
|
52
|
+
color: rgb(#{$decision-modal-color});
|
|
50
53
|
transition:
|
|
51
54
|
box-shadow #{$transition-duration} ease,
|
|
52
55
|
border-color #{$transition-duration} ease,
|
|
@@ -58,12 +61,14 @@ $transition-duration: sass.fn-naming-var("motion", "duration");
|
|
|
58
61
|
// Content of alert
|
|
59
62
|
.#{$decision-modal-body} {
|
|
60
63
|
padding: calc(#{$padding-y} * 4) calc(#{$padding-x} * 4);
|
|
64
|
+
color: rgb(#{$decision-modal-color});
|
|
61
65
|
}
|
|
62
66
|
|
|
63
67
|
// Footer of alert
|
|
64
68
|
.#{$decision-modal-footer} {
|
|
65
69
|
display: flex;
|
|
66
70
|
border-top: #{$border-width} solid transparent;
|
|
71
|
+
color: rgb(#{$decision-modal-color});
|
|
67
72
|
transition:
|
|
68
73
|
box-shadow #{$transition-duration} ease,
|
|
69
74
|
border-color #{$transition-duration} ease,
|
|
@@ -16,16 +16,16 @@ Horizontal or vertical divider line following theme.
|
|
|
16
16
|
## Basic usage
|
|
17
17
|
|
|
18
18
|
```vue
|
|
19
|
-
<t-divider
|
|
20
|
-
<t-divider
|
|
19
|
+
<t-divider direction="horizontal" />
|
|
20
|
+
<t-divider direction="vertical" />
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Props
|
|
24
24
|
|
|
25
|
-
| Prop
|
|
26
|
-
|
|
|
27
|
-
| `
|
|
28
|
-
| `role`
|
|
25
|
+
| Prop | Type | Default | Description |
|
|
26
|
+
| ----------- | ---------------------------- | -------------- | ------------------------------- |
|
|
27
|
+
| `direction` | `"horizontal" \| "vertical"` | `"horizontal"` | Divider direction. |
|
|
28
|
+
| `role` | `string` | — | Theme stroke; default from app. |
|
|
29
29
|
|
|
30
30
|
**Type source:** `src/components/divider/divider.type.ts`
|
|
31
31
|
|
|
@@ -9,7 +9,7 @@ import { type AppProviderState, APP_PROVIDER_STATE_KEY } from "../app";
|
|
|
9
9
|
// Component setup (props, emits, injects)
|
|
10
10
|
// ----------------------------------------------------------------------------
|
|
11
11
|
const props = withDefaults(defineProps<DividerProps>(), {
|
|
12
|
-
|
|
12
|
+
direction: "horizontal",
|
|
13
13
|
});
|
|
14
14
|
const appState = inject<AppProviderState>(APP_PROVIDER_STATE_KEY);
|
|
15
15
|
|
|
@@ -23,7 +23,7 @@ const dividerAttrs = computed(() => {
|
|
|
23
23
|
withPrefix(["role", role]),
|
|
24
24
|
withPrefix("divider"),
|
|
25
25
|
{
|
|
26
|
-
[props.
|
|
26
|
+
[props.direction]: true,
|
|
27
27
|
},
|
|
28
28
|
],
|
|
29
29
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as Divider } from "./divider.vue";
|
|
2
|
-
export type {
|
|
2
|
+
export type { DividerDirection, DividerProps } from "./divider.type";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
@use "@toife/sass-layer
|
|
1
|
+
@use "@toife/sass-layer" as sass;
|
|
2
2
|
|
|
3
|
+
// Class name
|
|
3
4
|
$dropdown: sass.fn-naming-prefix("dropdown");
|
|
4
5
|
$dropdown-panel: sass.fn-naming-prefix("dropdown-panel");
|
|
5
6
|
|
|
7
|
+
// Property name - layer: dropdown
|
|
6
8
|
$dropdown-border-color: sass.fn-naming-var("dropdown", "border-color");
|
|
7
9
|
$dropdown-background-color: sass.fn-naming-var("dropdown", "background-color");
|
|
8
10
|
$dropdown-color: sass.fn-naming-var("dropdown", "color");
|
|
@@ -18,11 +20,6 @@ $transition-duration: sass.fn-naming-var("motion", "duration");
|
|
|
18
20
|
position: relative;
|
|
19
21
|
display: block;
|
|
20
22
|
width: 100%;
|
|
21
|
-
|
|
22
|
-
&.disabled {
|
|
23
|
-
opacity: 0.5;
|
|
24
|
-
cursor: not-allowed;
|
|
25
|
-
}
|
|
26
23
|
}
|
|
27
24
|
|
|
28
25
|
.#{$dropdown-panel} {
|
|
@@ -30,18 +27,15 @@ $transition-duration: sass.fn-naming-var("motion", "duration");
|
|
|
30
27
|
z-index: 20;
|
|
31
28
|
min-width: 100%;
|
|
32
29
|
box-sizing: border-box;
|
|
33
|
-
margin-top: calc(#{$spacing-y} * 0.25);
|
|
34
|
-
margin-bottom: calc(#{$spacing-y} * 0.25);
|
|
35
|
-
padding: calc(#{$spacing-y} * 0.5) 0;
|
|
36
30
|
border-radius: #{$border-radius};
|
|
37
31
|
border-width: #{$border-width};
|
|
32
|
+
margin: #{$spacing-y} 0;
|
|
38
33
|
border-style: solid;
|
|
39
34
|
border-color: rgb(#{$dropdown-border-color});
|
|
40
35
|
background-color: rgb(#{$dropdown-background-color});
|
|
41
36
|
color: rgb(#{$dropdown-color});
|
|
42
37
|
font-size: #{$size-font-size};
|
|
43
38
|
line-height: #{$size-line-height};
|
|
44
|
-
box-shadow: 0 #{$border-width} #{$spacing-y} rgb(#{$dropdown-border-color}, 0.12);
|
|
45
39
|
max-height: min(50vh, 16rem);
|
|
46
40
|
overflow-y: auto;
|
|
47
41
|
transition:
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
<div v-bind="fieldContentAttrs">
|
|
3
3
|
<slot name="start-input"></slot>
|
|
4
4
|
<slot name="input">
|
|
5
|
-
<div
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
<div v-bind="fieldInputShellAttrs" v-if="type !== 'password'">
|
|
6
|
+
<div
|
|
7
|
+
v-bind="fieldEditableAttrs"
|
|
8
|
+
@input="onInput"
|
|
9
|
+
@compositionstart="onCompositionStart"
|
|
10
|
+
@compositionend="onCompositionEnd"
|
|
11
|
+
@focus="onFocus"
|
|
12
|
+
@blur="onBlur"
|
|
13
|
+
@beforeinput="onBeforeinput"
|
|
14
|
+
ref="contentRef"
|
|
15
|
+
></div>
|
|
16
|
+
</div>
|
|
17
17
|
<input
|
|
18
|
-
v-bind="
|
|
18
|
+
v-bind="fieldPasswordInputAttrs"
|
|
19
19
|
@input="onInput"
|
|
20
20
|
@compositionstart="onCompositionStart"
|
|
21
21
|
@compositionend="onCompositionEnd"
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
@use "@toife/sass-layer
|
|
1
|
+
@use "@toife/sass-layer" as sass;
|
|
2
2
|
|
|
3
3
|
// Class name
|
|
4
4
|
$field: sass.fn-naming-prefix("field");
|
|
5
5
|
$field-content: sass.fn-naming-prefix("field-content");
|
|
6
6
|
$field-input: sass.fn-naming-prefix("field-input");
|
|
7
|
+
$field-input-editable: sass.fn-naming-prefix("field-input-editable");
|
|
7
8
|
$field-message: sass.fn-naming-prefix("field-message");
|
|
8
9
|
$field-help: sass.fn-naming-prefix("field-help");
|
|
9
10
|
|
|
@@ -56,8 +57,8 @@ $direction-justify-content: sass.fn-naming-var("justify-content");
|
|
|
56
57
|
align-items: center;
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
// Input
|
|
60
|
-
.#{$field-input} {
|
|
60
|
+
// Input shell wrapping contenteditable (flex layout); must not apply display:flex to <input>.
|
|
61
|
+
div.#{$field-input} {
|
|
61
62
|
padding: calc(#{$spacing-y} * #{$size-coefficient-y})
|
|
62
63
|
calc(#{$spacing-x} * #{$size-coefficient-x});
|
|
63
64
|
position: relative;
|
|
@@ -65,16 +66,11 @@ $direction-justify-content: sass.fn-naming-var("justify-content");
|
|
|
65
66
|
z-index: 2;
|
|
66
67
|
min-height: calc(#{$field-line} * #{$size-height} - 2 * #{$border-width});
|
|
67
68
|
max-height: calc(#{$field-max-line} * #{$size-height} - 2 * #{$border-width});
|
|
68
|
-
color: rgb(#{$app-color});
|
|
69
|
-
caret-color: rgb(#{$app-color});
|
|
70
|
-
border: none;
|
|
71
|
-
user-select: all;
|
|
72
|
-
font-size: #{$size-font-size};
|
|
73
|
-
line-height: #{$size-line-height};
|
|
74
69
|
box-sizing: border-box;
|
|
75
70
|
width: 100%;
|
|
76
|
-
overflow: auto;
|
|
77
71
|
flex: 1;
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
78
74
|
transition:
|
|
79
75
|
box-shadow #{$transition-duration} ease,
|
|
80
76
|
border-color #{$transition-duration} ease,
|
|
@@ -82,13 +78,44 @@ $direction-justify-content: sass.fn-naming-var("justify-content");
|
|
|
82
78
|
color #{$transition-duration} ease,
|
|
83
79
|
border-radius #{$transition-duration} ease;
|
|
84
80
|
|
|
85
|
-
&:focus,
|
|
81
|
+
&:focus-within,
|
|
86
82
|
&:active,
|
|
87
83
|
&:hover {
|
|
88
84
|
outline: none;
|
|
89
|
-
border: none;
|
|
90
85
|
}
|
|
91
86
|
|
|
87
|
+
&::placeholder {
|
|
88
|
+
color: rgba(#{$app-color}, 0.5);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Native password <input> (single node, not wrapped).
|
|
93
|
+
input.#{$field-input} {
|
|
94
|
+
padding: calc(#{$spacing-y} * #{$size-coefficient-y})
|
|
95
|
+
calc(#{$spacing-x} * #{$size-coefficient-x});
|
|
96
|
+
position: relative;
|
|
97
|
+
background-color: transparent;
|
|
98
|
+
z-index: 2;
|
|
99
|
+
min-height: calc(#{$field-line} * #{$size-height} - 2 * #{$border-width});
|
|
100
|
+
max-height: calc(#{$field-max-line} * #{$size-height} - 2 * #{$border-width});
|
|
101
|
+
box-sizing: border-box;
|
|
102
|
+
width: 100%;
|
|
103
|
+
flex: 1;
|
|
104
|
+
color: rgb(#{$app-color});
|
|
105
|
+
caret-color: rgb(#{$app-color});
|
|
106
|
+
border: none;
|
|
107
|
+
-webkit-user-select: text;
|
|
108
|
+
user-select: text;
|
|
109
|
+
font-size: #{$size-font-size};
|
|
110
|
+
line-height: #{$size-line-height};
|
|
111
|
+
overflow: auto;
|
|
112
|
+
transition:
|
|
113
|
+
box-shadow #{$transition-duration} ease,
|
|
114
|
+
border-color #{$transition-duration} ease,
|
|
115
|
+
background-color #{$transition-duration} ease,
|
|
116
|
+
color #{$transition-duration} ease,
|
|
117
|
+
border-radius #{$transition-duration} ease;
|
|
118
|
+
|
|
92
119
|
// Firefox
|
|
93
120
|
-moz-appearance: textfield;
|
|
94
121
|
appearance: textfield;
|
|
@@ -100,11 +127,46 @@ $direction-justify-content: sass.fn-naming-var("justify-content");
|
|
|
100
127
|
margin: 0;
|
|
101
128
|
}
|
|
102
129
|
|
|
130
|
+
&:focus,
|
|
131
|
+
&:active,
|
|
132
|
+
&:hover {
|
|
133
|
+
outline: none;
|
|
134
|
+
border: none;
|
|
135
|
+
}
|
|
136
|
+
|
|
103
137
|
&::placeholder {
|
|
104
138
|
color: rgba(#{$app-color}, 0.5);
|
|
105
139
|
}
|
|
106
140
|
}
|
|
107
141
|
|
|
142
|
+
.#{$field-input-editable} {
|
|
143
|
+
flex: 1 1 auto;
|
|
144
|
+
min-width: 0;
|
|
145
|
+
min-height: 0;
|
|
146
|
+
display: block;
|
|
147
|
+
position: relative;
|
|
148
|
+
z-index: 2;
|
|
149
|
+
background-color: transparent;
|
|
150
|
+
color: rgb(#{$app-color});
|
|
151
|
+
caret-color: rgb(#{$app-color});
|
|
152
|
+
border: none;
|
|
153
|
+
// user-select:all breaks caret placement on many mobile browsers for contenteditable.
|
|
154
|
+
-webkit-user-select: text;
|
|
155
|
+
user-select: text;
|
|
156
|
+
font-size: #{$size-font-size};
|
|
157
|
+
line-height: #{$size-line-height};
|
|
158
|
+
box-sizing: border-box;
|
|
159
|
+
width: 100%;
|
|
160
|
+
overflow: auto;
|
|
161
|
+
outline: none;
|
|
162
|
+
|
|
163
|
+
&:focus,
|
|
164
|
+
&:active {
|
|
165
|
+
outline: none;
|
|
166
|
+
border: none;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
108
170
|
// Message
|
|
109
171
|
.#{$field-message} {
|
|
110
172
|
color: rgb(#{$field-background-color});
|
|
@@ -131,33 +193,34 @@ $direction-justify-content: sass.fn-naming-var("justify-content");
|
|
|
131
193
|
border-radius #{$transition-duration} ease;
|
|
132
194
|
}
|
|
133
195
|
|
|
134
|
-
// State
|
|
135
|
-
&.active {
|
|
136
|
-
.#{$field-content} {
|
|
137
|
-
border-color: rgb(#{$field-border-color});
|
|
138
|
-
box-shadow: 0 0 0 calc(#{$border-width} * 1.5) rgb(#{$field-border-color});
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
|
|
142
196
|
&.focus {
|
|
143
197
|
&.shadow {
|
|
144
198
|
.#{$field-content} {
|
|
145
199
|
box-shadow: 0 0 0 0.25rem rgb(#{$field-border-color}, 0.25);
|
|
146
200
|
}
|
|
147
201
|
}
|
|
202
|
+
|
|
203
|
+
&:not(.shadow) {
|
|
204
|
+
.#{$field-content} {
|
|
205
|
+
box-shadow: 0 0 0 calc(#{$border-width} * 1.5) rgb(#{$field-border-color});
|
|
206
|
+
}
|
|
207
|
+
}
|
|
148
208
|
}
|
|
149
209
|
|
|
150
210
|
&.disabled {
|
|
151
211
|
opacity: 0.5;
|
|
152
212
|
cursor: not-allowed;
|
|
153
|
-
.#{$field-input}
|
|
213
|
+
div.#{$field-input},
|
|
214
|
+
input.#{$field-input},
|
|
215
|
+
.#{$field-input-editable} {
|
|
154
216
|
cursor: not-allowed;
|
|
217
|
+
-webkit-user-select: none;
|
|
155
218
|
user-select: none;
|
|
156
219
|
}
|
|
157
220
|
}
|
|
158
221
|
|
|
159
222
|
&.empty:not(.typing) {
|
|
160
|
-
.#{$field-input} {
|
|
223
|
+
div.#{$field-input} {
|
|
161
224
|
&::before {
|
|
162
225
|
content: attr(placeholder);
|
|
163
226
|
color: rgba(#{$app-color}, 0.5);
|
|
@@ -181,38 +244,36 @@ $direction-justify-content: sass.fn-naming-var("justify-content");
|
|
|
181
244
|
|
|
182
245
|
// Type
|
|
183
246
|
&.paragraph {
|
|
184
|
-
.#{$field-input} {
|
|
247
|
+
div.#{$field-input} {
|
|
248
|
+
align-items: flex-start;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.#{$field-input-editable} {
|
|
185
252
|
white-space: pre-wrap;
|
|
186
253
|
word-break: break-word;
|
|
187
|
-
display: flex;
|
|
188
|
-
align-items: start;
|
|
189
|
-
overflow: auto;
|
|
190
254
|
}
|
|
191
255
|
}
|
|
192
256
|
|
|
193
257
|
&.text {
|
|
194
|
-
.#{$field-input}
|
|
258
|
+
.#{$field-input-editable},
|
|
259
|
+
input.#{$field-input} {
|
|
195
260
|
white-space: nowrap;
|
|
196
|
-
display: flex;
|
|
197
|
-
align-items: center;
|
|
198
261
|
}
|
|
199
262
|
}
|
|
200
263
|
|
|
201
264
|
&.password {
|
|
202
|
-
.#{$field-input} {
|
|
265
|
+
input.#{$field-input} {
|
|
203
266
|
white-space: nowrap;
|
|
204
|
-
display: flex;
|
|
205
|
-
align-items: center;
|
|
206
267
|
}
|
|
207
268
|
}
|
|
208
269
|
|
|
209
270
|
// Direction
|
|
210
|
-
.#{$field-input} {
|
|
271
|
+
div.#{$field-input} {
|
|
211
272
|
justify-content: #{$direction-justify-content};
|
|
212
|
-
text-align: #{$direction-text-align};
|
|
213
273
|
}
|
|
214
274
|
|
|
215
|
-
.#{$field-input}
|
|
216
|
-
|
|
275
|
+
.#{$field-input-editable},
|
|
276
|
+
input.#{$field-input} {
|
|
277
|
+
text-align: #{$direction-text-align};
|
|
217
278
|
}
|
|
218
279
|
}
|