@onereach/ui-components 2.74.16-beta.2375.0 → 2.75.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.
Files changed (48) hide show
  1. package/dist/bundled/v2/{OrCode-cdde94a4.js → OrCode-5b43ba50.js} +178 -14
  2. package/dist/bundled/v2/{OrModal-5f094323.js → OrModal-d845da2d.js} +4 -4
  3. package/dist/bundled/v2/{OrNotification-76491313.js → OrNotification-209972e7.js} +2 -2
  4. package/dist/bundled/v2/{OrSkeletonText-feb27b8c.js → OrSkeletonText-1bf08dbc.js} +3 -3
  5. package/dist/bundled/v2/components/index.js +4 -4
  6. package/dist/bundled/v2/components/or-code/index.js +1 -1
  7. package/dist/bundled/v2/components/or-code/theme.d.ts +24 -0
  8. package/dist/bundled/v2/components/or-modal-v3/index.js +1 -1
  9. package/dist/bundled/v2/components/or-notification/index.js +1 -1
  10. package/dist/bundled/v2/components/or-skeleton/index.js +1 -1
  11. package/dist/bundled/v2/index.js +5 -5
  12. package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-1fbe8517.js → OrCode.vue_vue_type_script_lang-7723c4a8.js} +176 -11
  13. package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-92339e0f.js → OrModal.vue_vue_type_script_lang-3f3ce339.js} +4 -4
  14. package/dist/bundled/v3/components/index.js +2 -2
  15. package/dist/bundled/v3/components/or-code/index.js +1 -1
  16. package/dist/bundled/v3/components/or-code/theme.d.ts +24 -0
  17. package/dist/bundled/v3/components/or-modal-v3/index.js +1 -1
  18. package/dist/bundled/v3/index.js +10 -10
  19. package/dist/esm/v2/{OrCode-9a2cdc0c.js → OrCode-930709c5.js} +182 -16
  20. package/dist/esm/v2/{OrModal-407f3ac7.js → OrModal-370cfc3b.js} +4 -4
  21. package/dist/esm/v2/{OrNotification-f905da81.js → OrNotification-0b22c94c.js} +2 -2
  22. package/dist/esm/v2/{OrSkeletonText-38aef640.js → OrSkeletonText-6a6f285d.js} +3 -3
  23. package/dist/esm/v2/components/index.js +6 -4
  24. package/dist/esm/v2/components/or-code/index.js +4 -2
  25. package/dist/esm/v2/components/or-code/theme.d.ts +24 -0
  26. package/dist/esm/v2/components/or-modal-v3/index.js +1 -1
  27. package/dist/esm/v2/components/or-notification/index.js +1 -1
  28. package/dist/esm/v2/components/or-skeleton/index.js +1 -1
  29. package/dist/esm/v2/index.js +6 -4
  30. package/dist/esm/v3/{OrCode-033d49f4.js → OrCode-fe49ca8e.js} +180 -14
  31. package/dist/esm/v3/{OrModal-17c3a1cb.js → OrModal-f9f2279b.js} +4 -4
  32. package/dist/esm/v3/{OrNotification-b90cf406.js → OrNotification-2d77aae4.js} +1 -1
  33. package/dist/esm/v3/{OrSkeletonText-2b1610ce.js → OrSkeletonText-0546754d.js} +3 -3
  34. package/dist/esm/v3/components/index.js +6 -4
  35. package/dist/esm/v3/components/or-code/index.js +4 -2
  36. package/dist/esm/v3/components/or-code/theme.d.ts +24 -0
  37. package/dist/esm/v3/components/or-modal-v3/index.js +1 -1
  38. package/dist/esm/v3/components/or-notification/index.js +1 -1
  39. package/dist/esm/v3/components/or-skeleton/index.js +1 -1
  40. package/dist/esm/v3/index.js +6 -4
  41. package/package.json +4 -3
  42. package/src/components/or-code/OrCode.vue +8 -6
  43. package/src/components/or-code/theme.ts +213 -0
  44. package/src/components/or-modal-v3/OrModal.stories3.ts +0 -19
  45. package/src/components/or-modal-v3/styles.ts +4 -1
  46. package/src/components/or-notification/OrNotification.vue +26 -1
  47. package/src/components/or-skeleton/styles.scss +18 -3
  48. 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;
@@ -1,7 +1,6 @@
1
1
  import { action } from '@storybook/addon-actions';
2
2
  import { Meta, StoryFn } from '@storybook/vue3';
3
3
  import { ref } from 'vue-demi';
4
- import Faker from 'faker';
5
4
  import { OrButtonV3 as OrButton } from '../or-button-v3';
6
5
  import OrModalDocs from './OrModal.docs.mdx';
7
6
  import OrModal from './OrModal.vue';
@@ -258,21 +257,3 @@ zIndex.args = {
258
257
  </div>
259
258
  `,
260
259
  };
261
-
262
- export const WithVerticalScroll = Template.bind({});
263
-
264
- WithVerticalScroll.args = {
265
- header: 'Upload Files',
266
- default: `
267
- <div class="flex items-center justify-center">
268
- ${Faker.lorem.lines(50)}
269
- </div>
270
- `,
271
-
272
- footer: `
273
- <div class="flex items-center justify-end gap-[16px]">
274
- <OrButton variant="outlined">Save</OrButton>
275
- <OrButton>Upload</OrButton>
276
- </div>
277
- `,
278
- };
@@ -6,7 +6,7 @@ export const ModalRoot: string[] = [
6
6
 
7
7
  // Box
8
8
  'w-full',
9
- 'h-full md:h-auto md:max-h-[min(calc(100%-(2*theme(spacing.3xl))),772px)]',
9
+ 'h-full',
10
10
 
11
11
  // Shape
12
12
  'md:rounded-md',
@@ -36,16 +36,19 @@ export const ModalRootSizes: Record<ModalSize, string[]> = {
36
36
  'l': [
37
37
  // Box
38
38
  'md:w-[1050px]',
39
+ 'md:h-auto',
39
40
  ],
40
41
 
41
42
  'm': [
42
43
  // Box
43
44
  'md:w-[700px]',
45
+ 'md:h-auto',
44
46
  ],
45
47
 
46
48
  's': [
47
49
  // Box
48
50
  'md:w-[480px]',
51
+ 'md:h-auto',
49
52
  ],
50
53
  };
51
54
 
@@ -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
- .or-skeleton {
13
- $c-skeleton-bg: #f6f8fd;
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-2"> your slot named like content-{index} === {{slot}} ; slot props {{slotProps}}</p></template></or-stepper></div>',
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