@onereach/ui-components 2.73.1-beta.2285.0 → 2.74.0-beta.2287.0
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/dist/bundled/v2/{OrCardCollection-9bc44ec5.js → OrCardCollection-4ac89ea5.js} +1 -1
- package/dist/bundled/v2/{OrCode-fc6876ec.js → OrCode-c0af38e3.js} +179 -15
- package/dist/bundled/v2/{OrConfirm-ea6ea2f7.js → OrConfirm-8c0e957d.js} +1 -1
- package/dist/bundled/v2/{OrInput-57a47093.js → OrInput-00070eee.js} +11 -28
- package/dist/bundled/v2/{OrInputBox-e54dcef9.js → OrInputBox-2f559e98.js} +3 -3
- package/dist/bundled/v2/{OrNotification-3909aaf2.js → OrNotification-2e2a1941.js} +3 -3
- package/dist/bundled/v2/{OrSearch-4072a079.js → OrSearch-09fd004c.js} +2 -2
- package/dist/bundled/v2/{OrSelect-359e891b.js → OrSelect-2ececfc1.js} +2 -2
- package/dist/bundled/v2/{OrSkeletonText-242d22f3.js → OrSkeletonText-2f1a3cc7.js} +3 -3
- package/dist/bundled/v2/{OrTextarea-1201353b.js → OrTextarea-5c57c02b.js} +1 -1
- package/dist/bundled/v2/components/index.js +11 -11
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +4 -4
- package/dist/bundled/v2/components/or-code/index.js +1 -1
- package/dist/bundled/v2/components/or-code/theme.d.ts +24 -0
- package/dist/bundled/v2/components/or-confirm-v3/index.js +3 -3
- package/dist/bundled/v2/components/or-input-box-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-input-v3/OrInput.vue.d.ts +0 -13
- package/dist/bundled/v2/components/or-input-v3/index.js +2 -3
- package/dist/bundled/v2/components/or-notification/index.js +1 -1
- package/dist/bundled/v2/components/or-search-v3/index.js +3 -4
- package/dist/bundled/v2/components/or-select-v3/index.js +3 -4
- package/dist/bundled/v2/components/or-skeleton/index.js +1 -1
- package/dist/bundled/v2/components/or-textarea-v3/index.js +2 -2
- package/dist/bundled/v2/index.js +11 -11
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-62eb2543.js → OrCardCollection.vue_vue_type_script_lang-f76c3264.js} +1 -1
- package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-c55de81d.js → OrCode.vue_vue_type_script_lang-79a42008.js} +176 -11
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-9aff9db3.js → OrConfirm.vue_vue_type_script_lang-eb2bfce2.js} +2 -2
- package/dist/bundled/v3/{OrInput-44a32124.js → OrInput-dcf2606e.js} +6 -15
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-4d9e2f4a.js → OrInput.vue_vue_type_script_lang-27220623.js} +3 -15
- package/dist/bundled/v3/{OrInputBox-358d4856.js → OrInputBox-4c7900c2.js} +1 -1
- package/dist/bundled/v3/{OrInputBox.vue_vue_type_script_lang-b387d4ba.js → OrInputBox.vue_vue_type_script_lang-47d98e81.js} +3 -3
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-0ddeada5.js → OrSearch.vue_vue_type_script_lang-c054c8db.js} +3 -3
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-c7a9bec2.js → OrSelect.vue_vue_type_script_lang-7fd5e2f0.js} +4 -4
- package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-de99a858.js → OrTextarea.vue_vue_type_script_lang-296da567.js} +2 -2
- package/dist/bundled/v3/components/index.js +11 -11
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +6 -6
- package/dist/bundled/v3/components/or-code/index.js +1 -1
- package/dist/bundled/v3/components/or-code/theme.d.ts +24 -0
- package/dist/bundled/v3/components/or-confirm-v3/index.js +5 -5
- package/dist/bundled/v3/components/or-input-box-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-input-v3/OrInput.vue.d.ts +0 -13
- package/dist/bundled/v3/components/or-input-v3/index.js +3 -5
- package/dist/bundled/v3/components/or-search-v3/index.js +5 -7
- package/dist/bundled/v3/components/or-select-v3/index.js +5 -7
- package/dist/bundled/v3/components/or-textarea-v3/index.js +3 -3
- package/dist/bundled/v3/index.js +21 -21
- package/dist/esm/v2/{OrCardCollection-4c909f4b.js → OrCardCollection-5a9eda35.js} +2 -2
- package/dist/esm/v2/{OrCode-d4400b42.js → OrCode-47331c24.js} +183 -17
- package/dist/esm/v2/{OrConfirm-7dc26526.js → OrConfirm-9dbdedd7.js} +1 -1
- package/dist/esm/v2/{OrInput-3d8c8925.js → OrInput-59a15d80.js} +11 -28
- package/dist/esm/v2/{OrInputBox-53d1f66d.js → OrInputBox-9ceb9fc4.js} +3 -3
- package/dist/esm/v2/{OrNotification-a9231a83.js → OrNotification-a49e76d3.js} +3 -3
- package/dist/esm/v2/{OrSearch-d6f1ba11.js → OrSearch-7411388b.js} +2 -2
- package/dist/esm/v2/{OrSelect-bdb9a78a.js → OrSelect-e31d1c8b.js} +2 -2
- package/dist/esm/v2/{OrSkeletonText-cc94bdc9.js → OrSkeletonText-24509efe.js} +3 -3
- package/dist/esm/v2/{OrTextarea-373d0554.js → OrTextarea-a5a3572b.js} +1 -1
- package/dist/esm/v2/components/index.js +13 -11
- package/dist/esm/v2/components/or-card-collection-v3/index.js +4 -4
- package/dist/esm/v2/components/or-code/index.js +4 -2
- package/dist/esm/v2/components/or-code/theme.d.ts +24 -0
- package/dist/esm/v2/components/or-confirm-v3/index.js +4 -4
- package/dist/esm/v2/components/or-input-box-v3/index.js +1 -1
- package/dist/esm/v2/components/or-input-v3/OrInput.vue.d.ts +0 -13
- package/dist/esm/v2/components/or-input-v3/index.js +3 -4
- package/dist/esm/v2/components/or-notification/index.js +1 -1
- package/dist/esm/v2/components/or-search-v3/index.js +4 -5
- package/dist/esm/v2/components/or-select-v3/index.js +4 -5
- package/dist/esm/v2/components/or-skeleton/index.js +1 -1
- package/dist/esm/v2/components/or-textarea-v3/index.js +2 -2
- package/dist/esm/v2/index.js +12 -10
- package/dist/esm/v3/{OrCardCollection-803f67f7.js → OrCardCollection-e4fde5b4.js} +2 -2
- package/dist/esm/v3/{OrCode-5ed69c23.js → OrCode-effa9edb.js} +180 -14
- package/dist/esm/v3/{OrConfirm-403896ca.js → OrConfirm-37454a63.js} +1 -1
- package/dist/esm/v3/{OrInput-71075f51.js → OrInput-bd054213.js} +7 -27
- package/dist/esm/v3/{OrInputBox-2467d7e4.js → OrInputBox-e16ade90.js} +3 -3
- package/dist/esm/v3/{OrNotification-e85a4956.js → OrNotification-eb08de33.js} +1 -1
- package/dist/esm/v3/{OrSearch-4e180e34.js → OrSearch-5406bf03.js} +2 -2
- package/dist/esm/v3/{OrSelect-c64eda46.js → OrSelect-466e50ca.js} +2 -2
- package/dist/esm/v3/{OrSkeletonText-2b1610ce.js → OrSkeletonText-0546754d.js} +3 -3
- package/dist/esm/v3/{OrTextarea-42d21f77.js → OrTextarea-37566985.js} +1 -1
- package/dist/esm/v3/components/index.js +13 -11
- package/dist/esm/v3/components/or-card-collection-v3/index.js +4 -4
- package/dist/esm/v3/components/or-code/index.js +4 -2
- package/dist/esm/v3/components/or-code/theme.d.ts +24 -0
- package/dist/esm/v3/components/or-confirm-v3/index.js +4 -4
- package/dist/esm/v3/components/or-input-box-v3/index.js +1 -1
- package/dist/esm/v3/components/or-input-v3/OrInput.vue.d.ts +0 -13
- package/dist/esm/v3/components/or-input-v3/index.js +3 -4
- package/dist/esm/v3/components/or-notification/index.js +1 -1
- package/dist/esm/v3/components/or-search-v3/index.js +4 -5
- package/dist/esm/v3/components/or-select-v3/index.js +4 -5
- package/dist/esm/v3/components/or-skeleton/index.js +1 -1
- package/dist/esm/v3/components/or-textarea-v3/index.js +2 -2
- package/dist/esm/v3/index.js +12 -10
- package/package.json +2 -2
- package/src/components/or-code/OrCode.vue +8 -6
- package/src/components/or-code/theme.ts +213 -0
- package/src/components/or-input-box-v3/styles.ts +6 -3
- package/src/components/or-input-v3/OrInput.stories3.ts +0 -4
- package/src/components/or-input-v3/OrInput.vue +19 -39
- package/src/components/or-notification/OrNotification.vue +26 -1
- package/src/components/or-skeleton/styles.scss +18 -3
- package/src/components/or-stepper/OrStepper.stories.ts +1 -1
package/dist/esm/v3/index.js
CHANGED
|
@@ -6,17 +6,17 @@ export { b as BUTTON_COLOR, d as BUTTON_LOADER_TYPE, c as BUTTON_SIZE, B as BUTT
|
|
|
6
6
|
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, s as OrButtonV3 } from './OrButton-c56998e7.js';
|
|
7
7
|
export { s as OrCard } from './OrCard-e3a5aea4.js';
|
|
8
8
|
export { C as CARD_COLLECTION_LAYOUT, s as OrCardCollection } from './OrCardCollection-1e44c758.js';
|
|
9
|
-
export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-
|
|
9
|
+
export { D as DefaultCardCollectionViews, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from './OrCardCollection-e4fde5b4.js';
|
|
10
10
|
export { s as OrCardV3 } from './OrCard-cd6af82e.js';
|
|
11
11
|
export { a as OrCarousel, s as OrCarouselItem } from './OrCarouselItem-636d99a1.js';
|
|
12
12
|
export { s as OrCheckbox } from './OrCheckbox-ed4a19cf.js';
|
|
13
13
|
export { s as OrCheckboxV3 } from './OrCheckbox-16c1e2f4.js';
|
|
14
14
|
export { s as OrChip, a as OrChips } from './OrChips-9afba42f.js';
|
|
15
|
-
export { s as OrCode, O as OrCodeLanguages } from './OrCode-
|
|
15
|
+
export { s as OrCode, O as OrCodeLanguages } from './OrCode-effa9edb.js';
|
|
16
16
|
export { s as OrCollapse } from './OrCollapse-445141ab.js';
|
|
17
17
|
export { s as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from './OrColorPicker-189cb097.js';
|
|
18
18
|
export { s as OrConfirm } from './OrConfirm-c11ee2ec.js';
|
|
19
|
-
export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-
|
|
19
|
+
export { C as ConfirmType, s as OrConfirmV3 } from './OrConfirm-37454a63.js';
|
|
20
20
|
export { D as DEFAULT_TEXT, s as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from './OrDateTimePicker-f2e08564.js';
|
|
21
21
|
export { s as OrError } from './OrError-f90296db.js';
|
|
22
22
|
export { s as OrErrorTagV3 } from './OrErrorTag-308119de.js';
|
|
@@ -34,8 +34,8 @@ export { I as InlineInputBoxSize, I as InlineInputSize, s as OrInlineInputBoxV3
|
|
|
34
34
|
export { I as InlineInputType, s as OrInlineInputV3 } from './OrInlineInput-fbc35f85.js';
|
|
35
35
|
export { a as InlineTextEditTrimmingTypes, I as InlineTextEditTypes, s as OrInlineTextEdit } from './OrInlineTextEdit-1aa477b5.js';
|
|
36
36
|
export { s as OrInlineTextareaV3 } from './OrInlineTextarea-79da8697.js';
|
|
37
|
-
export { a as InputBoxSize, I as InputBoxVariant, a as InputSize, s as OrInputBoxV3, a as SearchSize, a as SelectSize, a as TextareaSize } from './OrInputBox-
|
|
38
|
-
export { I as InputType, s as OrInputV3 } from './OrInput-
|
|
37
|
+
export { a as InputBoxSize, I as InputBoxVariant, a as InputSize, s as OrInputBoxV3, a as SearchSize, a as SelectSize, a as TextareaSize } from './OrInputBox-e16ade90.js';
|
|
38
|
+
export { I as InputType, s as OrInputV3 } from './OrInput-bd054213.js';
|
|
39
39
|
export { s as OrInput } from './OrInput-81125804.js';
|
|
40
40
|
export { s as OrLabel } from './OrLabel-876f8729.js';
|
|
41
41
|
export { L as LabelVariant, s as OrLabelV3 } from './OrLabel-f700f9fb.js';
|
|
@@ -49,7 +49,7 @@ export { s as OrMenuV3 } from './OrMenu-7f3ea117.js';
|
|
|
49
49
|
export { P as MenuPlacement, s as OrPopoverV3, P as PopoverPlacement, a as PopoverVariant, P as TooltipPlacement } from './OrPopover-40217b49.js';
|
|
50
50
|
export { s as OrModal, O as OrModalSizes } from './OrModal-8b074b0c.js';
|
|
51
51
|
export { M as ModalSize, s as OrModalV3 } from './OrModal-4219a6dc.js';
|
|
52
|
-
export { a as OR_NOTIFICATION_SIZE, O as OR_NOTIFICATION_TYPE, s as OrNotification } from './OrNotification-
|
|
52
|
+
export { a as OR_NOTIFICATION_SIZE, O as OR_NOTIFICATION_TYPE, s as OrNotification } from './OrNotification-eb08de33.js';
|
|
53
53
|
export { N as NotificationVariant, s as OrNotificationV3 } from './OrNotification-0e682c7f.js';
|
|
54
54
|
export { s as OrNumberInput } from './OrNumberInput-b32b5ce3.js';
|
|
55
55
|
export { s as OrOverflowMenu } from './OrOverflowMenu-e82cbcbe.js';
|
|
@@ -63,14 +63,14 @@ export { s as OrRadio } from './OrRadio-c3ab11f2.js';
|
|
|
63
63
|
export { s as OrRadioGroup } from './OrRadioGroup-00785e41.js';
|
|
64
64
|
export { s as OrRadioV3 } from './OrRadio-bb9b37c1.js';
|
|
65
65
|
export { s as OrSearch } from './OrSearch-11fdf667.js';
|
|
66
|
-
export { s as OrSearchV3 } from './OrSearch-
|
|
66
|
+
export { s as OrSearchV3 } from './OrSearch-5406bf03.js';
|
|
67
67
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './OrSegmentedControl-880b4911.js';
|
|
68
68
|
export { s as OrSelect } from './OrSelect-0821b907.js';
|
|
69
|
-
export { s as OrSelectV3 } from './OrSelect-
|
|
69
|
+
export { s as OrSelectV3 } from './OrSelect-466e50ca.js';
|
|
70
70
|
export { s as OrSidebar, O as OrSidebarSide } from './OrSidebar-375c85a3.js';
|
|
71
71
|
export { s as OrSidebarV3 } from './OrSidebar-61d84c3e.js';
|
|
72
72
|
export { O as OrSidebarPlacement } from './OrSidebarCollapseButton-1b9c83ef.js';
|
|
73
|
-
export { s as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeletonText-
|
|
73
|
+
export { s as OrSkeletonCircle, a as OrSkeletonRect, b as OrSkeletonText, O as OrSkeletonTextSizes } from './OrSkeletonText-0546754d.js';
|
|
74
74
|
export { s as OrSkeletonCircleV3, a as OrSkeletonRectV3, b as OrSkeletonTextV3 } from './OrSkeletonText-afd3d007.js';
|
|
75
75
|
export { s as OrSlider } from './OrSlider-87e2da8c.js';
|
|
76
76
|
export { s as OrSortHeaderV3 } from './OrSortHeader-a39f77f9.js';
|
|
@@ -88,7 +88,7 @@ export { s as OrTeleport } from './OrTeleportVue3-ad639f12.js';
|
|
|
88
88
|
export { s as OrTeleportV3 } from './OrTeleport.vue3-8099178c.js';
|
|
89
89
|
export { s as OrTextV3 } from './OrText-6b4f7cd1.js';
|
|
90
90
|
export { s as OrTextarea } from './OrTextarea-1f5c3be1.js';
|
|
91
|
-
export { s as OrTextareaV3 } from './OrTextarea-
|
|
91
|
+
export { s as OrTextareaV3 } from './OrTextarea-37566985.js';
|
|
92
92
|
export { s as OrTextbox, T as TextboxTypes } from './OrTextbox-2f33e9c3.js';
|
|
93
93
|
export { s as OrToast, a as OrToastContainer } from './OrToastContainer-40c4c1c8.js';
|
|
94
94
|
export { P as PositionsX, b as PositionsY, c as ToastType, T as TransitionType, a as useQueue, u as useToast } from './useToast-4fbe0e5a.js';
|
|
@@ -119,6 +119,8 @@ import '@codemirror/lang-css';
|
|
|
119
119
|
import '@codemirror/lang-json';
|
|
120
120
|
import '@codemirror/lang-javascript';
|
|
121
121
|
import '@codemirror/lang-markdown';
|
|
122
|
+
import '@codemirror/language';
|
|
123
|
+
import '@lezer/highlight';
|
|
122
124
|
import './px-to-rem-0b26b83e.js';
|
|
123
125
|
import './dom-3a15d036.js';
|
|
124
126
|
import '@vueuse/math';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.74.0-beta.2287.0",
|
|
4
4
|
"description": "Vue components library for v2/3",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/auto/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@codemirror/lang-json": "6.0.0",
|
|
39
39
|
"@codemirror/lang-markdown": "6.0.1",
|
|
40
40
|
"@floating-ui/dom": "0.3.1",
|
|
41
|
-
"@onereach/styles": "^2.
|
|
41
|
+
"@onereach/styles": "^2.35.0-beta.2287.0",
|
|
42
42
|
"@splidejs/splide": "4.0.6",
|
|
43
43
|
"@types/lodash": "4.14.173",
|
|
44
44
|
"@types/sortablejs": "1.10.7",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<or-icon-button
|
|
25
25
|
v-if="isShowingFullscreen"
|
|
26
26
|
icon="fullscreen"
|
|
27
|
-
icon-color="neutral-
|
|
27
|
+
icon-color="neutral-4"
|
|
28
28
|
class="fullscreen-button"
|
|
29
29
|
@click="toggleFullscreen(true)"
|
|
30
30
|
/>
|
|
@@ -85,8 +85,8 @@ import { Language, LanguageSupport } from '@codemirror/language';
|
|
|
85
85
|
import { EditorState, Extension, Transaction } from '@codemirror/state';
|
|
86
86
|
import { ViewUpdate, keymap } from '@codemirror/view';
|
|
87
87
|
import { indentWithTab } from '@codemirror/commands';
|
|
88
|
-
import { useElementHover } from '@vueuse/core';
|
|
89
88
|
import { basicSetup, EditorView } from 'codemirror';
|
|
89
|
+
import { useElementHover } from '@vueuse/core';
|
|
90
90
|
import _ from 'lodash';
|
|
91
91
|
import { defineComponent, PropType, ref, Ref } from 'vue-demi';
|
|
92
92
|
import { OrIconButton } from '../or-button-v2';
|
|
@@ -97,6 +97,7 @@ import { OrModal } from '../or-modal';
|
|
|
97
97
|
import { OrTeleport } from '../or-teleport';
|
|
98
98
|
import { OrCodeLanguages } from './constants';
|
|
99
99
|
import languages from './lang';
|
|
100
|
+
import orCodeTheme from './theme';
|
|
100
101
|
|
|
101
102
|
//partially based on https://github.com/logue/vue-codemirror6/blob/master/src/components/CodeMirror.vue
|
|
102
103
|
|
|
@@ -185,6 +186,7 @@ export default defineComponent({
|
|
|
185
186
|
emits: ['update:modelValue', 'focus', 'blur'],
|
|
186
187
|
|
|
187
188
|
setup(props, { emit }) {
|
|
189
|
+
// editor config
|
|
188
190
|
const root = ref<HTMLDivElement>();
|
|
189
191
|
const target = ref<HTMLDivElement>();
|
|
190
192
|
const fullscreenTarget = ref<HTMLDivElement>();
|
|
@@ -225,8 +227,9 @@ export default defineComponent({
|
|
|
225
227
|
},
|
|
226
228
|
localExtensions(): Extension[] {
|
|
227
229
|
const { allowDrop, allowPaste, lineWrapping } = this;
|
|
230
|
+
|
|
228
231
|
const ext = _.compact([
|
|
229
|
-
|
|
232
|
+
orCodeTheme,
|
|
230
233
|
EditorView.baseTheme({}),
|
|
231
234
|
// locale settings
|
|
232
235
|
this.phrases ? EditorState.phrases.of(this.phrases) : undefined,
|
|
@@ -259,11 +262,10 @@ export default defineComponent({
|
|
|
259
262
|
// line wrapping
|
|
260
263
|
lineWrapping ? EditorView.lineWrapping : undefined,
|
|
261
264
|
keymap.of([indentWithTab]),
|
|
265
|
+
...this.extensions,
|
|
262
266
|
]) as Extension[];
|
|
263
267
|
|
|
264
|
-
|
|
265
|
-
if (this.extensions.length !== 0) _.merge(ext, this.extensions);
|
|
266
|
-
return ext;
|
|
268
|
+
return [...ext];
|
|
267
269
|
},
|
|
268
270
|
isShowingError(): boolean {
|
|
269
271
|
return !!this.error && this.isInvalid;
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { EditorView } from '@codemirror/view';
|
|
2
|
+
import { Extension } from '@codemirror/state';
|
|
3
|
+
import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';
|
|
4
|
+
import { tags as t } from '@lezer/highlight';
|
|
5
|
+
|
|
6
|
+
// Using https://github.com/one-dark/vscode-one-dark-theme/ as reference for the colors
|
|
7
|
+
|
|
8
|
+
const chalky = 'var(--c-warning-darken-20)',
|
|
9
|
+
coral = 'var(--c-error)',
|
|
10
|
+
cyan = '#56b6c2',
|
|
11
|
+
invalid = 'var(--c-white)',
|
|
12
|
+
ivory = 'var(--c-neutral-6)',
|
|
13
|
+
stone = 'var(--c-neutral-5)', // Brightened compared to original to increase contrast
|
|
14
|
+
malibu = '#61afef',
|
|
15
|
+
sage = 'var(--c-success)',
|
|
16
|
+
whiskey = 'var(--c-warning-darken-5)',
|
|
17
|
+
violet = '#c678dd',
|
|
18
|
+
darkBackground = 'var(--c-neutral-1)',
|
|
19
|
+
highlightBackground = 'var(--c-neutral-2)',
|
|
20
|
+
background = 'var(--c-neutral-1)',
|
|
21
|
+
tooltipBackground = 'var(--c-neutral-2)',
|
|
22
|
+
selection = 'var(--c-neutral-3)',
|
|
23
|
+
cursor = 'var(--c-primary)';
|
|
24
|
+
|
|
25
|
+
/// The colors used in the theme, as CSS color strings.
|
|
26
|
+
export const color = {
|
|
27
|
+
chalky,
|
|
28
|
+
coral,
|
|
29
|
+
cyan,
|
|
30
|
+
invalid,
|
|
31
|
+
ivory,
|
|
32
|
+
stone,
|
|
33
|
+
malibu,
|
|
34
|
+
sage,
|
|
35
|
+
whiskey,
|
|
36
|
+
violet,
|
|
37
|
+
darkBackground,
|
|
38
|
+
highlightBackground,
|
|
39
|
+
background,
|
|
40
|
+
tooltipBackground,
|
|
41
|
+
selection,
|
|
42
|
+
cursor,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/// The editor theme styles for One Dark.
|
|
46
|
+
export const orCodeTheme = EditorView.theme({
|
|
47
|
+
'&': {
|
|
48
|
+
color: ivory,
|
|
49
|
+
backgroundColor: background,
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
'.cm-content': {
|
|
53
|
+
caretColor: cursor,
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
'.cm-button': {
|
|
57
|
+
background: highlightBackground,
|
|
58
|
+
color: 'var(--c-neutral-6)',
|
|
59
|
+
border: 0,
|
|
60
|
+
borderRadius: 'var(--s-2)',
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
'.cm-panel.cm-search input[type=checkbox]': {
|
|
64
|
+
display: 'inline-block',
|
|
65
|
+
verticalAlign: 'middle',
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
'.cm-cursor, .cm-dropCursor': { borderLeftColor: cursor },
|
|
69
|
+
'&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
|
|
70
|
+
backgroundColor: selection,
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
'.cm-panels': {
|
|
74
|
+
backgroundColor: darkBackground,
|
|
75
|
+
color: ivory,
|
|
76
|
+
},
|
|
77
|
+
'.cm-panels.cm-panels-top': { borderBottom: '2px solid var(--c-neutral-2)' },
|
|
78
|
+
'.cm-panels.cm-panels-bottom': { borderTop: '2px solid var(--c-neutral-2)' },
|
|
79
|
+
|
|
80
|
+
'.cm-searchMatch': {
|
|
81
|
+
backgroundColor: 'var(--c-neutral-1)',
|
|
82
|
+
outline: '1px solid var(--c-neutral-2)',
|
|
83
|
+
},
|
|
84
|
+
'.cm-searchMatch.cm-searchMatch-selected': {
|
|
85
|
+
backgroundColor: '#6199ff2f',
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
'.cm-activeLine': { backgroundColor: '#6699ff0b' },
|
|
89
|
+
'.cm-selectionMatch': { backgroundColor: '#aafe661a' },
|
|
90
|
+
|
|
91
|
+
'&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket': {
|
|
92
|
+
backgroundColor: '#bad0f847',
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
'.cm-gutters': {
|
|
96
|
+
backgroundColor: background,
|
|
97
|
+
color: stone,
|
|
98
|
+
border: 'none',
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
'.cm-activeLineGutter': {
|
|
102
|
+
backgroundColor: highlightBackground,
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
'.cm-foldPlaceholder': {
|
|
106
|
+
backgroundColor: 'transparent',
|
|
107
|
+
border: 'none',
|
|
108
|
+
color: '#ddd',
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
'.cm-tooltip': {
|
|
112
|
+
border: 'none',
|
|
113
|
+
backgroundColor: tooltipBackground,
|
|
114
|
+
},
|
|
115
|
+
'.cm-tooltip .cm-tooltip-arrow:before': {
|
|
116
|
+
borderTopColor: 'transparent',
|
|
117
|
+
borderBottomColor: 'transparent',
|
|
118
|
+
},
|
|
119
|
+
'.cm-tooltip .cm-tooltip-arrow:after': {
|
|
120
|
+
borderTopColor: tooltipBackground,
|
|
121
|
+
borderBottomColor: tooltipBackground,
|
|
122
|
+
},
|
|
123
|
+
'.cm-tooltip-autocomplete': {
|
|
124
|
+
'& > ul > li[aria-selected]': {
|
|
125
|
+
backgroundColor: highlightBackground,
|
|
126
|
+
color: ivory,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
'.cm-textfield': {
|
|
130
|
+
outline: 'none',
|
|
131
|
+
background: background,
|
|
132
|
+
color: 'var(--c-neutral-6)',
|
|
133
|
+
backgroundColor: 'var(--c-neutral-1)',
|
|
134
|
+
border: '1px solid var(--c-neutral-2)',
|
|
135
|
+
borderRadius: 'var(--s-2)',
|
|
136
|
+
},
|
|
137
|
+
}, { dark: true });
|
|
138
|
+
|
|
139
|
+
/// The highlighting style for code in the One Dark theme.
|
|
140
|
+
export const orCodeHighlightStyle = HighlightStyle.define([
|
|
141
|
+
{
|
|
142
|
+
tag: t.keyword,
|
|
143
|
+
color: violet,
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
tag: [t.name, t.deleted, t.character, t.propertyName, t.macroName],
|
|
147
|
+
color: coral,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
tag: [t.function(t.variableName), t.labelName],
|
|
151
|
+
color: malibu,
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
tag: [t.color, t.constant(t.name), t.standard(t.name)],
|
|
155
|
+
color: whiskey,
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
tag: [t.definition(t.name), t.separator],
|
|
159
|
+
color: ivory,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
tag: [t.typeName, t.className, t.number, t.changed, t.annotation, t.modifier, t.self, t.namespace],
|
|
163
|
+
color: chalky,
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
tag: [t.operator, t.operatorKeyword, t.url, t.escape, t.regexp, t.link, t.special(t.string)],
|
|
167
|
+
color: cyan,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
tag: [t.meta, t.comment],
|
|
171
|
+
color: stone,
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
tag: t.strong,
|
|
175
|
+
fontWeight: 'bold',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
tag: t.emphasis,
|
|
179
|
+
fontStyle: 'italic',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
tag: t.strikethrough,
|
|
183
|
+
textDecoration: 'line-through',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
tag: t.link,
|
|
187
|
+
color: stone,
|
|
188
|
+
textDecoration: 'underline',
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
tag: t.heading,
|
|
192
|
+
fontWeight: 'bold',
|
|
193
|
+
color: coral,
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
tag: [t.atom, t.bool, t.special(t.variableName)],
|
|
197
|
+
color: whiskey,
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
tag: [t.processingInstruction, t.string, t.inserted],
|
|
201
|
+
color: sage,
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
tag: t.invalid,
|
|
205
|
+
color: invalid,
|
|
206
|
+
},
|
|
207
|
+
]);
|
|
208
|
+
|
|
209
|
+
/// Extension to enable the One Dark theme (both the editor theme and
|
|
210
|
+
/// the highlight style).
|
|
211
|
+
const theme: Extension = [orCodeTheme, syntaxHighlighting(orCodeHighlightStyle)];
|
|
212
|
+
|
|
213
|
+
export default theme;
|
|
@@ -90,11 +90,13 @@ export const InputBoxRootVariants: Record<InputBoxVariant, string[]> = {
|
|
|
90
90
|
export const InputBoxRootSizes: Record<InputBoxSize, string[]> = {
|
|
91
91
|
'm': [
|
|
92
92
|
// Box
|
|
93
|
-
'children:min-h-[
|
|
93
|
+
'children:min-h-[34px]',
|
|
94
94
|
|
|
95
95
|
// Spacing
|
|
96
96
|
'first-child:pl-md first-child:md:pl-sm+',
|
|
97
97
|
'last-child:pr-md last-child:md:pr-sm+',
|
|
98
|
+
'children:pt-[11px] children:md:pt-[7px]',
|
|
99
|
+
'children:pb-[11px] children:md:pb-[6px]',
|
|
98
100
|
|
|
99
101
|
'gap-sm+ md:gap-sm',
|
|
100
102
|
|
|
@@ -107,8 +109,9 @@ export const InputBoxRootSizes: Record<InputBoxSize, string[]> = {
|
|
|
107
109
|
'children:min-h-[30px]',
|
|
108
110
|
|
|
109
111
|
// Spacing
|
|
110
|
-
'first-child:pl-
|
|
111
|
-
'last-child:pr-
|
|
112
|
+
'first-child:pl-sm',
|
|
113
|
+
'last-child:pr-sm',
|
|
114
|
+
'children:py-[6px]',
|
|
112
115
|
|
|
113
116
|
'gap-[6px]',
|
|
114
117
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
:variant="disableDefaultStyles ? 'unstyled' : 'styled'"
|
|
23
23
|
:size="size"
|
|
24
24
|
:invalid="invalid"
|
|
25
|
-
:readonly="readonly
|
|
25
|
+
:readonly="readonly"
|
|
26
26
|
:disabled="disabled"
|
|
27
27
|
>
|
|
28
28
|
<input
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
:type="type === 'password' && disclosed ? 'text' : type"
|
|
34
34
|
:placeholder="placeholder"
|
|
35
35
|
:required="required"
|
|
36
|
-
:readonly="readonly
|
|
36
|
+
:readonly="readonly"
|
|
37
37
|
:disabled="disabled"
|
|
38
38
|
@keydown="$emit('keydown', $event)"
|
|
39
39
|
@keyup="$emit('keyup', $event)"
|
|
@@ -42,40 +42,30 @@
|
|
|
42
42
|
>
|
|
43
43
|
|
|
44
44
|
<div :class="['layout-row']">
|
|
45
|
-
<template v-if="
|
|
46
|
-
<
|
|
47
|
-
:
|
|
48
|
-
:color="'
|
|
49
|
-
:
|
|
45
|
+
<template v-if="type === 'password'">
|
|
46
|
+
<OrIconButton
|
|
47
|
+
:icon="{ icon: disclosed ? 'visibility_off' : 'visibility', variant: 'filled' }"
|
|
48
|
+
:color="'inherit'"
|
|
49
|
+
:disabled="disabled"
|
|
50
|
+
@click.stop="disclosed = !disclosed"
|
|
50
51
|
/>
|
|
51
52
|
</template>
|
|
52
53
|
|
|
53
|
-
<template v-
|
|
54
|
-
<template v-if="
|
|
54
|
+
<template v-if="type === 'search'">
|
|
55
|
+
<template v-if="modelValue">
|
|
55
56
|
<OrIconButton
|
|
56
|
-
:icon="
|
|
57
|
+
:icon="'close'"
|
|
57
58
|
:color="'inherit'"
|
|
58
|
-
:disabled="disabled"
|
|
59
|
-
@click.stop="
|
|
59
|
+
:disabled="readonly || disabled"
|
|
60
|
+
@click.stop="$emit('update:modelValue', '')"
|
|
60
61
|
/>
|
|
61
62
|
</template>
|
|
62
63
|
|
|
63
|
-
<template v-
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
:disabled="readonly || disabled"
|
|
69
|
-
@click.stop="$emit('update:modelValue', '')"
|
|
70
|
-
/>
|
|
71
|
-
</template>
|
|
72
|
-
|
|
73
|
-
<template v-else>
|
|
74
|
-
<OrIcon
|
|
75
|
-
:icon="'search'"
|
|
76
|
-
:variant="'outlined'"
|
|
77
|
-
/>
|
|
78
|
-
</template>
|
|
64
|
+
<template v-else>
|
|
65
|
+
<OrIcon
|
|
66
|
+
:icon="'search'"
|
|
67
|
+
:variant="'outlined'"
|
|
68
|
+
/>
|
|
79
69
|
</template>
|
|
80
70
|
</template>
|
|
81
71
|
</div>
|
|
@@ -113,14 +103,13 @@
|
|
|
113
103
|
|
|
114
104
|
<script lang="ts">
|
|
115
105
|
import { computed, defineComponent, PropType, reactive, ref } from 'vue-demi';
|
|
116
|
-
import { useControlAttributes, useIdAttribute,
|
|
106
|
+
import { useControlAttributes, useIdAttribute, useValidationAttributes } from '../../hooks';
|
|
117
107
|
import { OrErrorV3 as OrError } from '../or-error-v3';
|
|
118
108
|
import { OrHintV3 as OrHint } from '../or-hint-v3';
|
|
119
109
|
import { OrIconButtonV3 as OrIconButton } from '../or-icon-button-v3';
|
|
120
110
|
import { OrIconV3 as OrIcon } from '../or-icon-v3';
|
|
121
111
|
import { OrInputBoxV3 as OrInputBox } from '../or-input-box-v3';
|
|
122
112
|
import { OrLabelV3 as OrLabel } from '../or-label-v3';
|
|
123
|
-
import { OrLoaderV3 as OrLoader } from '../or-loader-v3';
|
|
124
113
|
import { InputSize, InputType } from './props';
|
|
125
114
|
import { InputControl, InputRoot } from './styles';
|
|
126
115
|
|
|
@@ -134,7 +123,6 @@ export default defineComponent({
|
|
|
134
123
|
OrIconButton,
|
|
135
124
|
OrInputBox,
|
|
136
125
|
OrLabel,
|
|
137
|
-
OrLoader,
|
|
138
126
|
},
|
|
139
127
|
|
|
140
128
|
model: {
|
|
@@ -178,11 +166,6 @@ export default defineComponent({
|
|
|
178
166
|
default: undefined,
|
|
179
167
|
},
|
|
180
168
|
|
|
181
|
-
loading: {
|
|
182
|
-
type: Boolean,
|
|
183
|
-
default: false,
|
|
184
|
-
},
|
|
185
|
-
|
|
186
169
|
required: {
|
|
187
170
|
type: Boolean,
|
|
188
171
|
default: false,
|
|
@@ -257,8 +240,6 @@ export default defineComponent({
|
|
|
257
240
|
|
|
258
241
|
const disclosed = ref(false);
|
|
259
242
|
|
|
260
|
-
const { isMobile } = useResponsive();
|
|
261
|
-
|
|
262
243
|
// Methods
|
|
263
244
|
function focus(): void {
|
|
264
245
|
control.value?.focus();
|
|
@@ -279,7 +260,6 @@ export default defineComponent({
|
|
|
279
260
|
maxLength,
|
|
280
261
|
invalid,
|
|
281
262
|
disclosed,
|
|
282
|
-
isMobile,
|
|
283
263
|
focus,
|
|
284
264
|
blur,
|
|
285
265
|
};
|
|
@@ -115,7 +115,6 @@ export default defineComponent({
|
|
|
115
115
|
warning: ($c-warning, $c-warning-lighten-45),
|
|
116
116
|
success: ($c-success, $c-success-lighten-45),
|
|
117
117
|
);
|
|
118
|
-
|
|
119
118
|
/** TODO: Override when mobile design is ready to guarantee alignment of icons with first text row */
|
|
120
119
|
--alignment-height: #{$lh-1};
|
|
121
120
|
|
|
@@ -178,4 +177,30 @@ export default defineComponent({
|
|
|
178
177
|
}
|
|
179
178
|
}
|
|
180
179
|
}
|
|
180
|
+
|
|
181
|
+
[data-theme="dark"] {
|
|
182
|
+
.or-notification {
|
|
183
|
+
$notification-types: (
|
|
184
|
+
info: ($c-neutral-6, $c-primary-darken-45),
|
|
185
|
+
error: ($c-neutral-6, $c-error-darken-45),
|
|
186
|
+
warning: ($c-neutral-6, $c-warning-darken-45),
|
|
187
|
+
success: ($c-neutral-6, $c-success-darken-45),
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
.or-icon {
|
|
191
|
+
color: $c-neutral-1;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
@each $type, $colors in $notification-types {
|
|
195
|
+
&.is-type-#{$type} {
|
|
196
|
+
background-color: list.nth($colors, 2);
|
|
197
|
+
color: list.nth($colors, 1);
|
|
198
|
+
|
|
199
|
+
a {
|
|
200
|
+
color: list.nth($colors, 1);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
181
206
|
</style>
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
$c-skeleton-center: #fff;
|
|
12
|
+
$c-skeleton-bg: #f6f8fd;
|
|
13
|
+
$c-skeleton-center: #fff;
|
|
15
14
|
|
|
15
|
+
.or-skeleton {
|
|
16
16
|
overflow: hidden;
|
|
17
17
|
position: relative;
|
|
18
18
|
padding: 0;
|
|
@@ -33,3 +33,18 @@
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
[data-theme="dark"] {
|
|
39
|
+
$c-skeleton-dark-bg: $c-neutral-3;
|
|
40
|
+
$c-skeleton-dark-center: $c-neutral-2;
|
|
41
|
+
|
|
42
|
+
.or-skeleton {
|
|
43
|
+
background: $c-skeleton-dark-bg;
|
|
44
|
+
&.is-animated {
|
|
45
|
+
&::before {
|
|
46
|
+
background: linear-gradient(90.14deg, $c-skeleton-dark-bg 0.1%, $c-skeleton-dark-center 49.98%, $c-skeleton-dark-bg 99.06%);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -30,7 +30,7 @@ const Template: Story = (_args, { argTypes }) => ({
|
|
|
30
30
|
},
|
|
31
31
|
//<component :key="slot.Id" :someProp="slotProps"></component>
|
|
32
32
|
//<template #buttons="{onConfirm}"> here your button slot props <or-button content="slot-confirm" @click="onConfirm"/></template>
|
|
33
|
-
template: '<div><or-stepper v-bind="$props"> <template v-for="slot in slots" v-slot:[slot]="slotProps"><p class="bg-surface-5 rounded-sm p-
|
|
33
|
+
template: '<div><or-stepper v-bind="$props"> <template v-for="slot in slots" v-slot:[slot]="slotProps"><p class="bg-surface-5 text-on-surface rounded-sm p-md"> your slot named like content-{index} === {{slot}} ; slot props {{slotProps}}</p></template></or-stepper></div>',
|
|
34
34
|
|
|
35
35
|
});
|
|
36
36
|
|