@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
@@ -9313,7 +9313,7 @@ function scaleBlock(block, scaler) {
9313
9313
  bBottom = scaler.toDOM(block.bottom);
9314
9314
  return new BlockInfo(block.from, block.length, bTop, bBottom - bTop, Array.isArray(block.type) ? block.type.map(b => scaleBlock(b, scaler)) : block.type);
9315
9315
  }
9316
- const theme = /*@__PURE__*/Facet.define({
9316
+ const theme$1 = /*@__PURE__*/Facet.define({
9317
9317
  combine: strs => strs.join(" ")
9318
9318
  });
9319
9319
  const darkTheme = /*@__PURE__*/Facet.define({
@@ -10457,7 +10457,7 @@ class EditorView {
10457
10457
  this.updateState = 0 /* UpdateState.Idle */;
10458
10458
  }
10459
10459
 
10460
- if (update.startState.facet(theme) != update.state.facet(theme)) this.viewState.mustMeasureContent = true;
10460
+ if (update.startState.facet(theme$1) != update.state.facet(theme$1)) this.viewState.mustMeasureContent = true;
10461
10461
  if (redrawn || attrsChanged || scrollTarget || this.viewState.mustEnforceCursorAssoc || this.viewState.mustMeasureContent) this.requestMeasure();
10462
10462
  if (!update.empty) for (let listener of this.state.facet(updateListener)) listener(update);
10463
10463
  if (domChange) {
@@ -10604,7 +10604,7 @@ class EditorView {
10604
10604
  Get the CSS classes for the currently active editor themes.
10605
10605
  */
10606
10606
  get themeClasses() {
10607
- return baseThemeID + " " + (this.state.facet(darkTheme) ? baseDarkID : baseLightID) + " " + this.state.facet(theme);
10607
+ return baseThemeID + " " + (this.state.facet(darkTheme) ? baseDarkID : baseLightID) + " " + this.state.facet(theme$1);
10608
10608
  }
10609
10609
  updateAttrs() {
10610
10610
  let editorAttrs = attrsFromFacet(this, editorAttributes, {
@@ -10991,7 +10991,7 @@ class EditorView {
10991
10991
  */
10992
10992
  static theme(spec, options) {
10993
10993
  let prefix = StyleModule.newName();
10994
- let result = [theme.of(prefix), styleModule.of(buildTheme(`.${prefix}`, spec))];
10994
+ let result = [theme$1.of(prefix), styleModule.of(buildTheme(`.${prefix}`, spec))];
10995
10995
  if (options && options.dark) result.push(darkTheme.of(true));
10996
10996
  return result;
10997
10997
  }
@@ -29392,6 +29392,174 @@ var languages = {
29392
29392
  [OrCodeLanguages.MD]: MD
29393
29393
  };
29394
29394
 
29395
+ // Using https://github.com/one-dark/vscode-one-dark-theme/ as reference for the colors
29396
+ const chalky = 'var(--c-warning-darken-20)',
29397
+ coral = 'var(--c-error)',
29398
+ cyan = '#56b6c2',
29399
+ invalid = 'var(--c-white)',
29400
+ ivory = 'var(--c-neutral-6)',
29401
+ stone = 'var(--c-neutral-5)',
29402
+ // Brightened compared to original to increase contrast
29403
+ malibu = '#61afef',
29404
+ sage = 'var(--c-success)',
29405
+ whiskey = 'var(--c-warning-darken-5)',
29406
+ violet = '#c678dd',
29407
+ darkBackground = 'var(--c-neutral-1)',
29408
+ highlightBackground = 'var(--c-neutral-2)',
29409
+ background = 'var(--c-neutral-1)',
29410
+ tooltipBackground = 'var(--c-neutral-2)',
29411
+ selection = 'var(--c-neutral-3)',
29412
+ cursor = 'var(--c-primary)';
29413
+ /// The editor theme styles for One Dark.
29414
+ const orCodeTheme = EditorView.theme({
29415
+ '&': {
29416
+ color: ivory,
29417
+ backgroundColor: background
29418
+ },
29419
+ '.cm-content': {
29420
+ caretColor: cursor
29421
+ },
29422
+ '.cm-button': {
29423
+ background: highlightBackground,
29424
+ color: 'var(--c-neutral-6)',
29425
+ border: 0,
29426
+ borderRadius: 'var(--s-2)'
29427
+ },
29428
+ '.cm-panel.cm-search input[type=checkbox]': {
29429
+ display: 'inline-block',
29430
+ verticalAlign: 'middle'
29431
+ },
29432
+ '.cm-cursor, .cm-dropCursor': {
29433
+ borderLeftColor: cursor
29434
+ },
29435
+ '&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection': {
29436
+ backgroundColor: selection
29437
+ },
29438
+ '.cm-panels': {
29439
+ backgroundColor: darkBackground,
29440
+ color: ivory
29441
+ },
29442
+ '.cm-panels.cm-panels-top': {
29443
+ borderBottom: '2px solid var(--c-neutral-2)'
29444
+ },
29445
+ '.cm-panels.cm-panels-bottom': {
29446
+ borderTop: '2px solid var(--c-neutral-2)'
29447
+ },
29448
+ '.cm-searchMatch': {
29449
+ backgroundColor: 'var(--c-neutral-1)',
29450
+ outline: '1px solid var(--c-neutral-2)'
29451
+ },
29452
+ '.cm-searchMatch.cm-searchMatch-selected': {
29453
+ backgroundColor: '#6199ff2f'
29454
+ },
29455
+ '.cm-activeLine': {
29456
+ backgroundColor: '#6699ff0b'
29457
+ },
29458
+ '.cm-selectionMatch': {
29459
+ backgroundColor: '#aafe661a'
29460
+ },
29461
+ '&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket': {
29462
+ backgroundColor: '#bad0f847'
29463
+ },
29464
+ '.cm-gutters': {
29465
+ backgroundColor: background,
29466
+ color: stone,
29467
+ border: 'none'
29468
+ },
29469
+ '.cm-activeLineGutter': {
29470
+ backgroundColor: highlightBackground
29471
+ },
29472
+ '.cm-foldPlaceholder': {
29473
+ backgroundColor: 'transparent',
29474
+ border: 'none',
29475
+ color: '#ddd'
29476
+ },
29477
+ '.cm-tooltip': {
29478
+ border: 'none',
29479
+ backgroundColor: tooltipBackground
29480
+ },
29481
+ '.cm-tooltip .cm-tooltip-arrow:before': {
29482
+ borderTopColor: 'transparent',
29483
+ borderBottomColor: 'transparent'
29484
+ },
29485
+ '.cm-tooltip .cm-tooltip-arrow:after': {
29486
+ borderTopColor: tooltipBackground,
29487
+ borderBottomColor: tooltipBackground
29488
+ },
29489
+ '.cm-tooltip-autocomplete': {
29490
+ '& > ul > li[aria-selected]': {
29491
+ backgroundColor: highlightBackground,
29492
+ color: ivory
29493
+ }
29494
+ },
29495
+ '.cm-textfield': {
29496
+ outline: 'none',
29497
+ background: background,
29498
+ color: 'var(--c-neutral-6)',
29499
+ backgroundColor: 'var(--c-neutral-1)',
29500
+ border: '1px solid var(--c-neutral-2)',
29501
+ borderRadius: 'var(--s-2)'
29502
+ }
29503
+ }, {
29504
+ dark: true
29505
+ });
29506
+ /// The highlighting style for code in the One Dark theme.
29507
+ const orCodeHighlightStyle = HighlightStyle.define([{
29508
+ tag: tags$1.keyword,
29509
+ color: violet
29510
+ }, {
29511
+ tag: [tags$1.name, tags$1.deleted, tags$1.character, tags$1.propertyName, tags$1.macroName],
29512
+ color: coral
29513
+ }, {
29514
+ tag: [tags$1.function(tags$1.variableName), tags$1.labelName],
29515
+ color: malibu
29516
+ }, {
29517
+ tag: [tags$1.color, tags$1.constant(tags$1.name), tags$1.standard(tags$1.name)],
29518
+ color: whiskey
29519
+ }, {
29520
+ tag: [tags$1.definition(tags$1.name), tags$1.separator],
29521
+ color: ivory
29522
+ }, {
29523
+ tag: [tags$1.typeName, tags$1.className, tags$1.number, tags$1.changed, tags$1.annotation, tags$1.modifier, tags$1.self, tags$1.namespace],
29524
+ color: chalky
29525
+ }, {
29526
+ tag: [tags$1.operator, tags$1.operatorKeyword, tags$1.url, tags$1.escape, tags$1.regexp, tags$1.link, tags$1.special(tags$1.string)],
29527
+ color: cyan
29528
+ }, {
29529
+ tag: [tags$1.meta, tags$1.comment],
29530
+ color: stone
29531
+ }, {
29532
+ tag: tags$1.strong,
29533
+ fontWeight: 'bold'
29534
+ }, {
29535
+ tag: tags$1.emphasis,
29536
+ fontStyle: 'italic'
29537
+ }, {
29538
+ tag: tags$1.strikethrough,
29539
+ textDecoration: 'line-through'
29540
+ }, {
29541
+ tag: tags$1.link,
29542
+ color: stone,
29543
+ textDecoration: 'underline'
29544
+ }, {
29545
+ tag: tags$1.heading,
29546
+ fontWeight: 'bold',
29547
+ color: coral
29548
+ }, {
29549
+ tag: [tags$1.atom, tags$1.bool, tags$1.special(tags$1.variableName)],
29550
+ color: whiskey
29551
+ }, {
29552
+ tag: [tags$1.processingInstruction, tags$1.string, tags$1.inserted],
29553
+ color: sage
29554
+ }, {
29555
+ tag: tags$1.invalid,
29556
+ color: invalid
29557
+ }]);
29558
+ /// Extension to enable the One Dark theme (both the editor theme and
29559
+ /// the highlight style).
29560
+ const theme = [orCodeTheme, syntaxHighlighting(orCodeHighlightStyle)];
29561
+ var orCodeTheme$1 = theme;
29562
+
29395
29563
  //partially based on https://github.com/logue/vue-codemirror6/blob/master/src/components/CodeMirror.vue
29396
29564
  var script = defineComponent({
29397
29565
  name: 'OrCode',
@@ -29475,6 +29643,7 @@ var script = defineComponent({
29475
29643
  setup(props, {
29476
29644
  emit
29477
29645
  }) {
29646
+ // editor config
29478
29647
  const root = ref();
29479
29648
  const target = ref();
29480
29649
  const fullscreenTarget = ref();
@@ -29516,9 +29685,7 @@ var script = defineComponent({
29516
29685
  allowPaste,
29517
29686
  lineWrapping
29518
29687
  } = this;
29519
- const ext = _.compact([
29520
- // Toggle light/dark mode
29521
- EditorView.baseTheme({}),
29688
+ const ext = _.compact([orCodeTheme$1, EditorView.baseTheme({}),
29522
29689
  // locale settings
29523
29690
  this.phrases ? EditorState.phrases.of(this.phrases) : undefined,
29524
29691
  // Parser language setting
@@ -29545,10 +29712,8 @@ var script = defineComponent({
29545
29712
  }
29546
29713
  }),
29547
29714
  // line wrapping
29548
- lineWrapping ? EditorView.lineWrapping : undefined, keymap.of([indentWithTab])]);
29549
- // Append Extensions (such as basic-setup)
29550
- if (this.extensions.length !== 0) _.merge(ext, this.extensions);
29551
- return ext;
29715
+ lineWrapping ? EditorView.lineWrapping : undefined, keymap.of([indentWithTab]), ...this.extensions]);
29716
+ return [...ext];
29552
29717
  },
29553
29718
  isShowingError() {
29554
29719
  return !!this.error && this.isInvalid;
@@ -15,7 +15,7 @@ const ModalRoot = [
15
15
  // Layout
16
16
  'layout-column',
17
17
  // Box
18
- 'w-full', 'h-full md:h-auto md:max-h-[min(calc(100%-(2*theme(spacing.3xl))),772px)]',
18
+ 'w-full', 'h-full',
19
19
  // Shape
20
20
  'md:rounded-md',
21
21
  // Spacing
@@ -29,13 +29,13 @@ const ModalRoot = [
29
29
  const ModalRootSizes = {
30
30
  'l': [
31
31
  // Box
32
- 'md:w-[1050px]'],
32
+ 'md:w-[1050px]', 'md:h-auto'],
33
33
  'm': [
34
34
  // Box
35
- 'md:w-[700px]'],
35
+ 'md:w-[700px]', 'md:h-auto'],
36
36
  's': [
37
37
  // Box
38
- 'md:w-[480px]']
38
+ 'md:w-[480px]', 'md:h-auto']
39
39
  };
40
40
  const ModalHeader = [
41
41
  // Layouot
@@ -15,7 +15,7 @@ export { s as OrCheckbox } from '../OrCheckbox.vue_vue_type_script_lang-87143106
15
15
  export { s as OrCheckboxV3 } from '../OrCheckbox.vue_vue_type_script_lang-08f64a02.js';
16
16
  export { s as OrChip } from '../OrChip-f8874fb2.js';
17
17
  export { s as OrChips } from '../OrChips.vue_vue_type_script_lang-3c26c28f.js';
18
- export { s as OrCode, O as OrCodeLanguages } from '../OrCode.vue_vue_type_script_lang-1fbe8517.js';
18
+ export { s as OrCode, O as OrCodeLanguages } from '../OrCode.vue_vue_type_script_lang-7723c4a8.js';
19
19
  export { s as OrCollapse } from '../OrCollapse.vue_vue_type_script_lang-04ffe655.js';
20
20
  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.vue_vue_type_script_lang-3b58e79f.js';
21
21
  export { s as OrConfirm } from '../OrConfirm.vue_vue_type_script_lang-ff06fe51.js';
@@ -51,7 +51,7 @@ export { s as OrMenuItemV3 } from '../OrMenuItem.vue_vue_type_script_lang-0b643c
51
51
  export { s as OrMenuV3 } from '../OrMenu.vue_vue_type_script_lang-cefb0eca.js';
52
52
  export { P as MenuPlacement, s as OrPopoverV3, P as PopoverPlacement, a as PopoverVariant, P as TooltipPlacement } from '../OrPopover.vue_vue_type_script_lang-aa819a00.js';
53
53
  export { s as OrModal, O as OrModalSizes } from '../OrModal.vue_vue_type_script_lang-27616063.js';
54
- export { M as ModalSize, s as OrModalV3 } from '../OrModal.vue_vue_type_script_lang-92339e0f.js';
54
+ export { M as ModalSize, s as OrModalV3 } from '../OrModal.vue_vue_type_script_lang-3f3ce339.js';
55
55
  export { a as OR_NOTIFICATION_SIZE, O as OR_NOTIFICATION_TYPE, s as OrNotification } from '../OrNotification.vue_vue_type_script_lang-2a131157.js';
56
56
  export { N as NotificationVariant, s as OrNotificationV3 } from '../OrNotification.vue_vue_type_script_lang-7dd0d85f.js';
57
57
  export { s as OrNumberInput } from '../OrNumberInput.vue_vue_type_script_lang-a25274f5.js';
@@ -1,4 +1,4 @@
1
- export { s as OrCode, O as OrCodeLanguages } from '../../OrCode.vue_vue_type_script_lang-1fbe8517.js';
1
+ export { s as OrCode, O as OrCodeLanguages } from '../../OrCode.vue_vue_type_script_lang-7723c4a8.js';
2
2
  import '@vueuse/core';
3
3
  import 'lodash';
4
4
  import 'vue';
@@ -0,0 +1,24 @@
1
+ import { Extension } from '@codemirror/state';
2
+ import { HighlightStyle } from '@codemirror/language';
3
+ export declare const color: {
4
+ chalky: string;
5
+ coral: string;
6
+ cyan: string;
7
+ invalid: string;
8
+ ivory: string;
9
+ stone: string;
10
+ malibu: string;
11
+ sage: string;
12
+ whiskey: string;
13
+ violet: string;
14
+ darkBackground: string;
15
+ highlightBackground: string;
16
+ background: string;
17
+ tooltipBackground: string;
18
+ selection: string;
19
+ cursor: string;
20
+ };
21
+ export declare const orCodeTheme: Extension;
22
+ export declare const orCodeHighlightStyle: HighlightStyle;
23
+ declare const theme: Extension;
24
+ export default theme;
@@ -1,4 +1,4 @@
1
- export { M as ModalSize, s as OrModalV3 } from '../../OrModal.vue_vue_type_script_lang-92339e0f.js';
1
+ export { M as ModalSize, s as OrModalV3 } from '../../OrModal.vue_vue_type_script_lang-3f3ce339.js';
2
2
  import 'vue';
3
3
  import '../../OrBottomSheet.vue_vue_type_script_lang-7b8553e9.js';
4
4
  import '@vueuse/core';