@onereach/ui-components 2.74.16-beta.2374.0 → 2.75.0-beta.2377.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/{OrCode-cdde94a4.js → OrCode-5b43ba50.js} +178 -14
- package/dist/bundled/v2/{OrNotification-76491313.js → OrNotification-209972e7.js} +2 -2
- package/dist/bundled/v2/{OrSkeletonText-feb27b8c.js → OrSkeletonText-1bf08dbc.js} +3 -3
- package/dist/bundled/v2/components/index.js +3 -3
- 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-notification/index.js +1 -1
- package/dist/bundled/v2/components/or-skeleton/index.js +1 -1
- package/dist/bundled/v2/index.js +4 -4
- package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-1fbe8517.js → OrCode.vue_vue_type_script_lang-7723c4a8.js} +176 -11
- package/dist/bundled/v3/components/index.js +1 -1
- 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/index.js +8 -8
- package/dist/esm/v2/{OrCode-9a2cdc0c.js → OrCode-930709c5.js} +182 -16
- package/dist/esm/v2/{OrNotification-f905da81.js → OrNotification-0b22c94c.js} +2 -2
- package/dist/esm/v2/{OrSkeletonText-38aef640.js → OrSkeletonText-6a6f285d.js} +3 -3
- package/dist/esm/v2/components/index.js +5 -3
- 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-notification/index.js +1 -1
- package/dist/esm/v2/components/or-skeleton/index.js +1 -1
- package/dist/esm/v2/index.js +5 -3
- package/dist/esm/v3/{OrCode-033d49f4.js → OrCode-fe49ca8e.js} +180 -14
- package/dist/esm/v3/{OrNotification-b90cf406.js → OrNotification-2d77aae4.js} +1 -1
- package/dist/esm/v3/{OrSkeletonText-2b1610ce.js → OrSkeletonText-0546754d.js} +3 -3
- package/dist/esm/v3/components/index.js +5 -3
- 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-notification/index.js +1 -1
- package/dist/esm/v3/components/or-skeleton/index.js +1 -1
- package/dist/esm/v3/index.js +5 -3
- 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-notification/OrNotification.vue +26 -1
- package/src/components/or-sidebar-v3/OrSidebar.stories3.ts +1 -1
- package/src/components/or-skeleton/styles.scss +18 -3
- package/src/components/or-stepper/OrStepper.stories.ts +1 -1
|
@@ -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;
|
|
@@ -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>
|
|
@@ -104,7 +104,7 @@ const DefaultTemplate: StoryFn<typeof OrSidebar> = (args) => ({
|
|
|
104
104
|
class="theme-background-surface-1 dark:theme-background-surface-1-dark text-on-background dark:text-on-background-dark"
|
|
105
105
|
style="flex-grow: 1; overflow: auto; padding: 16px"
|
|
106
106
|
>
|
|
107
|
-
${Faker.lorem.paragraphs(
|
|
107
|
+
${Faker.lorem.paragraphs(10)}
|
|
108
108
|
</div>
|
|
109
109
|
<OrSidebar
|
|
110
110
|
v-bind="args"
|
|
@@ -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
|
|