@onereach/ui-components 4.10.0 → 4.10.1-beta.2921.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 (63) hide show
  1. package/dist/bundled/v2/components/OrCode/OrCode.js +4 -3792
  2. package/dist/bundled/v2/components/OrCode/index.js +4 -2
  3. package/dist/bundled/v2/components/OrCode/lang.js +24 -3
  4. package/dist/bundled/v2/components/OrCode/theme.js +1 -1
  5. package/dist/bundled/v2/components/OrCodeV3/OrCode.js +333 -0
  6. package/dist/bundled/v2/components/OrCodeV3/OrCode.vue.d.ts +169 -0
  7. package/dist/bundled/v2/components/OrCodeV3/index.d.ts +2 -0
  8. package/dist/bundled/v2/components/OrCodeV3/index.js +49 -0
  9. package/dist/bundled/v2/components/OrCodeV3/props.d.ts +8 -0
  10. package/dist/bundled/v2/components/OrCodeV3/props.js +11 -0
  11. package/dist/bundled/v2/components/OrCodeV3/styles.d.ts +2 -0
  12. package/dist/bundled/v2/components/OrCodeV3/styles.js +10 -0
  13. package/dist/bundled/v2/components/OrModalV3/OrModal.js +2 -2
  14. package/dist/bundled/v2/components/index.d.ts +1 -0
  15. package/dist/bundled/v2/components/index.js +8 -3
  16. package/dist/bundled/{v3/OrCode.vue_vue_type_script_lang-46846a36.js → v2/index-576b3dec.js} +3 -235
  17. package/dist/bundled/v2/{index-cf2c3c27.js → index-6a13fa4e.js} +1 -1
  18. package/dist/bundled/v2/{lang-0fb8f78b.js → index-eba9b646.js} +2 -22
  19. package/dist/bundled/v2/index.js +9 -4
  20. package/dist/bundled/v3/OrCode.vue_vue_type_script_lang-1812e6e4.js +237 -0
  21. package/dist/bundled/v3/OrCode.vue_vue_type_script_lang-84a512fb.js +200 -0
  22. package/dist/bundled/v3/components/OrCode/OrCode.js +7 -5
  23. package/dist/bundled/v3/components/OrCode/index.js +5 -3
  24. package/dist/bundled/v3/components/OrCode/lang.js +24 -3
  25. package/dist/bundled/v3/components/OrCode/theme.js +1 -1
  26. package/dist/bundled/v3/components/OrCodeV3/OrCode.js +142 -0
  27. package/dist/bundled/v3/components/OrCodeV3/OrCode.vue.d.ts +119 -0
  28. package/dist/bundled/v3/components/OrCodeV3/index.d.ts +2 -0
  29. package/dist/bundled/v3/components/OrCodeV3/index.js +60 -0
  30. package/dist/bundled/v3/components/OrCodeV3/props.d.ts +8 -0
  31. package/dist/bundled/v3/components/OrCodeV3/props.js +11 -0
  32. package/dist/bundled/v3/components/OrCodeV3/styles.d.ts +2 -0
  33. package/dist/bundled/v3/components/OrCodeV3/styles.js +10 -0
  34. package/dist/bundled/v3/components/index.d.ts +1 -0
  35. package/dist/bundled/v3/components/index.js +10 -4
  36. package/dist/bundled/v3/index-576b3dec.js +3794 -0
  37. package/dist/bundled/v3/{index-cf2c3c27.js → index-6a13fa4e.js} +1 -1
  38. package/dist/bundled/v3/{lang-0fb8f78b.js → index-eba9b646.js} +2 -22
  39. package/dist/bundled/v3/index.js +16 -10
  40. package/dist/esm/v2/OrCode-ad718022.js +327 -0
  41. package/dist/esm/v2/components/index.d.ts +1 -0
  42. package/dist/esm/v2/components/index.js +2 -1
  43. package/dist/esm/v2/components/or-code-v3/OrCode.vue.d.ts +169 -0
  44. package/dist/esm/v2/components/or-code-v3/index.d.ts +2 -0
  45. package/dist/esm/v2/components/or-code-v3/index.js +35 -0
  46. package/dist/esm/v2/components/or-code-v3/props.d.ts +8 -0
  47. package/dist/esm/v2/components/or-code-v3/styles.d.ts +2 -0
  48. package/dist/esm/v2/index.js +1 -0
  49. package/dist/esm/v3/OrCode-8ccd5dc7.js +301 -0
  50. package/dist/esm/v3/components/index.d.ts +1 -0
  51. package/dist/esm/v3/components/index.js +2 -1
  52. package/dist/esm/v3/components/or-code-v3/OrCode.vue.d.ts +119 -0
  53. package/dist/esm/v3/components/or-code-v3/index.d.ts +2 -0
  54. package/dist/esm/v3/components/or-code-v3/index.js +33 -0
  55. package/dist/esm/v3/components/or-code-v3/props.d.ts +8 -0
  56. package/dist/esm/v3/components/or-code-v3/styles.d.ts +2 -0
  57. package/dist/esm/v3/index.js +1 -0
  58. package/package.json +2 -3
  59. package/src/components/index.ts +1 -0
  60. package/src/components/or-code-v3/OrCode.vue +338 -0
  61. package/src/components/or-code-v3/index.ts +2 -0
  62. package/src/components/or-code-v3/props.ts +8 -0
  63. package/src/components/or-code-v3/styles.ts +12 -0
@@ -0,0 +1,200 @@
1
+ import { b as basicSetup, i as indentWithTab } from './index-576b3dec.js';
2
+ import { m as markdown, j as json, a as javascript, c as css, h as html } from './index-eba9b646.js';
3
+ import { E as EditorView, k as keymap, a as EditorState } from './index-6a13fa4e.js';
4
+ import { defineComponent, ref, computed, reactive, watch, onMounted, onUnmounted } from 'vue-demi';
5
+ import { CodeLanguage } from './components/OrCodeV3/props.js';
6
+ import { Code, CodeControl } from './components/OrCodeV3/styles.js';
7
+ import './components/OrErrorV3/OrError.js';
8
+ import './components/OrHintV3/OrHint.js';
9
+ import './components/OrIconButtonV3/OrIconButton.js';
10
+ import './components/OrInputBoxV3/OrInputBox.js';
11
+ import './components/OrLabelV3/OrLabel.js';
12
+ import './components/OrModalV3/OrModal.js';
13
+ import { s as script$6 } from './OrModal.vue_vue_type_script_lang-83469d51.js';
14
+ import { useIdAttribute } from './hooks/useIdAttribute.js';
15
+ import { useControlAttributes } from './hooks/useControlAttributes.js';
16
+ import { useValidationAttributes } from './hooks/useValidationAttributes.js';
17
+ import { s as script$1 } from './OrError.vue_vue_type_script_lang-df7b5e32.js';
18
+ import { s as script$2 } from './OrHint.vue_vue_type_script_lang-0f5e8377.js';
19
+ import { s as script$3 } from './OrIconButton.vue_vue_type_script_lang-c3a78c23.js';
20
+ import { s as script$4 } from './OrInputBox.vue_vue_type_script_lang-49fb179a.js';
21
+ import { s as script$5 } from './OrLabel.vue_vue_type_script_lang-3e11ab8a.js';
22
+
23
+ var script = defineComponent({
24
+ name: 'OrCode',
25
+ components: {
26
+ OrError: script$1,
27
+ OrHint: script$2,
28
+ OrIconButton: script$3,
29
+ OrInputBox: script$4,
30
+ OrLabel: script$5,
31
+ OrModal: script$6
32
+ },
33
+ model: {
34
+ prop: 'modelValue',
35
+ event: 'update:modelValue'
36
+ },
37
+ props: {
38
+ modelValue: {
39
+ type: String,
40
+ default: undefined
41
+ },
42
+ language: {
43
+ type: String,
44
+ default: CodeLanguage.JS
45
+ },
46
+ extensions: {
47
+ type: Array,
48
+ default: () => [basicSetup]
49
+ },
50
+ label: {
51
+ type: String,
52
+ default: undefined
53
+ },
54
+ hint: {
55
+ type: String,
56
+ default: undefined
57
+ },
58
+ error: {
59
+ type: [String, Boolean],
60
+ default: undefined
61
+ },
62
+ required: {
63
+ type: Boolean,
64
+ default: false
65
+ },
66
+ readonly: {
67
+ type: Boolean,
68
+ default: false
69
+ },
70
+ disabled: {
71
+ type: Boolean,
72
+ default: false
73
+ }
74
+ },
75
+ emits: ['update:modelValue', 'keydown', 'keyup', 'focus', 'blur'],
76
+ expose: ['root', 'focus', 'blur'],
77
+ setup(props, context) {
78
+ // Refs
79
+ const root = ref();
80
+ const control = ref();
81
+ const fullscreenControl = ref();
82
+ const modal = ref();
83
+ // Styles
84
+ const rootStyles = computed(() => ['or-code-v3', ...Code]);
85
+ const controlStyles = computed(() => [...CodeControl]);
86
+ // State
87
+ const controlAttributes = reactive({
88
+ id: useIdAttribute(),
89
+ ...useControlAttributes(),
90
+ ...useValidationAttributes()
91
+ });
92
+ const proxyModelValue = computed({
93
+ get: () => props.modelValue,
94
+ set: value => {
95
+ context.emit('update:modelValue', value);
96
+ }
97
+ });
98
+ const proxyLanguage = computed(() => {
99
+ switch (props.language) {
100
+ case CodeLanguage.HTML:
101
+ return html();
102
+ case CodeLanguage.CSS:
103
+ return css();
104
+ case CodeLanguage.JS:
105
+ return javascript();
106
+ case CodeLanguage.TS:
107
+ return javascript({
108
+ typescript: true
109
+ });
110
+ case CodeLanguage.JSON:
111
+ return json();
112
+ case CodeLanguage.MD:
113
+ return markdown();
114
+ }
115
+ });
116
+ // Methods
117
+ function focus() {
118
+ var _a;
119
+ (_a = control.value) === null || _a === void 0 ? void 0 : _a.focus();
120
+ }
121
+ function blur() {
122
+ var _a;
123
+ (_a = control.value) === null || _a === void 0 ? void 0 : _a.blur();
124
+ }
125
+ // #region Codemirror
126
+ const editorView = new EditorView({
127
+ dispatch: transaction => {
128
+ editorView.update([transaction]);
129
+ proxyModelValue.value = String(editorView.state.doc);
130
+ }
131
+ });
132
+ const extensions = computed(() => [...props.extensions, proxyLanguage.value, keymap.of([indentWithTab]), EditorView.editable.of(!props.readonly && !props.disabled), EditorView.domEventHandlers({
133
+ keydown: event => {
134
+ context.emit('keydown', event);
135
+ },
136
+ keyup: event => {
137
+ context.emit('keyup', event);
138
+ },
139
+ focus: event => {
140
+ context.emit('focus', event);
141
+ },
142
+ blur: event => {
143
+ context.emit('blur', event);
144
+ }
145
+ }), EditorView.baseTheme({})]);
146
+ watch([proxyModelValue, extensions], _ref => {
147
+ let [modelValue = '', extensions] = _ref;
148
+ const {
149
+ selection
150
+ } = editorView.state;
151
+ editorView.setState(EditorState.create({
152
+ doc: modelValue,
153
+ extensions,
154
+ selection: selection.ranges.some(range => range.to > modelValue.length) ? {
155
+ anchor: modelValue.length
156
+ } : selection
157
+ }));
158
+ }, {
159
+ immediate: true
160
+ });
161
+ // #endregion
162
+ // Effects
163
+ watch(() => {
164
+ var _a;
165
+ return (_a = modal.value) === null || _a === void 0 ? void 0 : _a.state;
166
+ }, value => {
167
+ setTimeout(() => {
168
+ var _a, _b;
169
+ if (value === 'open') {
170
+ (_a = fullscreenControl.value) === null || _a === void 0 ? void 0 : _a.append(editorView.dom);
171
+ } else {
172
+ (_b = control.value) === null || _b === void 0 ? void 0 : _b.append(editorView.dom);
173
+ }
174
+ });
175
+ });
176
+ // Lifecycle
177
+ onMounted(() => {
178
+ var _a;
179
+ (_a = control.value) === null || _a === void 0 ? void 0 : _a.append(editorView.dom);
180
+ });
181
+ onUnmounted(() => {
182
+ editorView.destroy();
183
+ });
184
+ return {
185
+ root,
186
+ control,
187
+ fullscreenControl,
188
+ modal,
189
+ rootStyles,
190
+ controlStyles,
191
+ controlAttributes,
192
+ proxyModelValue,
193
+ proxyLanguage,
194
+ focus,
195
+ blur
196
+ };
197
+ }
198
+ });
199
+
200
+ export { script as s };
@@ -1,15 +1,17 @@
1
- import { s as script } from '../../OrCode.vue_vue_type_script_lang-46846a36.js';
2
- export { s as default } from '../../OrCode.vue_vue_type_script_lang-46846a36.js';
1
+ import { s as script } from '../../OrCode.vue_vue_type_script_lang-1812e6e4.js';
2
+ export { s as default } from '../../OrCode.vue_vue_type_script_lang-1812e6e4.js';
3
3
  import { resolveComponent, openBlock, createElementBlock, createVNode, withCtx, renderSlot, createElementVNode, normalizeClass, createBlock, createCommentVNode, withDirectives, vShow } from 'vue';
4
4
  import { s as styleInject } from '../../style-inject.es-4c6f2515.js';
5
- import '../../index-cf2c3c27.js';
6
- import '../../lang-0fb8f78b.js';
7
- import './constants.js';
5
+ import '../../index-6a13fa4e.js';
6
+ import '../../index-576b3dec.js';
7
+ import '../../index-eba9b646.js';
8
8
  import '../../index-09d1cb24.js';
9
9
  import '../../index-f4d8e24c.js';
10
10
  import 'vue-demi';
11
11
  import '../OrTeleport/OrTeleport.js';
12
12
  import '../OrTeleport/constants.js';
13
+ import './constants.js';
14
+ import './lang.js';
13
15
  import './theme.js';
14
16
  import '../OrIconButtonV2/OrIconButton.js';
15
17
  import '../../OrIconButton.vue_vue_type_script_lang-e078ed4c.js';
@@ -1,13 +1,15 @@
1
1
  export { OrCodeLanguages } from './constants.js';
2
- export { s as OrCode } from '../../OrCode.vue_vue_type_script_lang-46846a36.js';
3
- import '../../index-cf2c3c27.js';
4
- import '../../lang-0fb8f78b.js';
2
+ export { s as OrCode } from '../../OrCode.vue_vue_type_script_lang-1812e6e4.js';
3
+ import '../../index-6a13fa4e.js';
4
+ import '../../index-576b3dec.js';
5
+ import '../../index-eba9b646.js';
5
6
  import '../../index-09d1cb24.js';
6
7
  import '../../index-f4d8e24c.js';
7
8
  import 'vue-demi';
8
9
  import '../OrTeleport/OrTeleport.js';
9
10
  import '../OrTeleport/constants.js';
10
11
  import 'vue';
12
+ import './lang.js';
11
13
  import './theme.js';
12
14
  import '../OrIconButtonV2/OrIconButton.js';
13
15
  import '../../OrIconButton.vue_vue_type_script_lang-e078ed4c.js';
@@ -1,3 +1,24 @@
1
- export { C as CSS, H as HTML, J as JS, e as JSON, M as MD, T as TS, l as default } from '../../lang-0fb8f78b.js';
2
- import './constants.js';
3
- import '../../index-cf2c3c27.js';
1
+ import { a as javascript, c as css, h as html, j as json, m as markdown } from '../../index-eba9b646.js';
2
+ import { OrCodeLanguages } from './constants.js';
3
+ import '../../index-6a13fa4e.js';
4
+
5
+ const JS = javascript({
6
+ typescript: false
7
+ });
8
+ const TS = javascript({
9
+ typescript: true
10
+ });
11
+ const CSS = css();
12
+ const HTML = html();
13
+ const JSON = json();
14
+ const MD = markdown();
15
+ var languages = {
16
+ [OrCodeLanguages.JS]: JS,
17
+ [OrCodeLanguages.TS]: TS,
18
+ [OrCodeLanguages.CSS]: CSS,
19
+ [OrCodeLanguages.HTML]: HTML,
20
+ [OrCodeLanguages.JSON]: JSON,
21
+ [OrCodeLanguages.MD]: MD
22
+ };
23
+
24
+ export { CSS, HTML, JS, JSON, MD, TS, languages as default };
@@ -1,4 +1,4 @@
1
- import { E as EditorView, ar as HighlightStyle, aa as tags, L as syntaxHighlighting } from '../../index-cf2c3c27.js';
1
+ import { E as EditorView, _ as HighlightStyle, $ as tags, M as syntaxHighlighting } from '../../index-6a13fa4e.js';
2
2
 
3
3
  // Using https://github.com/one-dark/vscode-one-dark-theme/ as reference for the colors
4
4
  const chalky = 'var(--c-warning-darken-20)',
@@ -0,0 +1,142 @@
1
+ import { s as script } from '../../OrCode.vue_vue_type_script_lang-84a512fb.js';
2
+ export { s as default } from '../../OrCode.vue_vue_type_script_lang-84a512fb.js';
3
+ import { resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, createElementVNode, renderSlot, createVNode, withModifiers, createTextVNode, toDisplayString, createCommentVNode, withDirectives, vShow } from 'vue';
4
+ import '../../index-576b3dec.js';
5
+ import '../../index-6a13fa4e.js';
6
+ import '../../index-eba9b646.js';
7
+ import 'vue-demi';
8
+ import './props.js';
9
+ import './styles.js';
10
+ import '../OrErrorV3/OrError.js';
11
+ import '../../OrError.vue_vue_type_script_lang-df7b5e32.js';
12
+ import '../OrErrorV3/styles.js';
13
+ import '../OrHintV3/OrHint.js';
14
+ import '../../OrHint.vue_vue_type_script_lang-0f5e8377.js';
15
+ import '../OrHintV3/styles.js';
16
+ import '../OrIconButtonV3/OrIconButton.js';
17
+ import '../../OrIconButton.vue_vue_type_script_lang-c3a78c23.js';
18
+ import '../OrIconButtonV3/props.js';
19
+ import '../OrIconV3/props.js';
20
+ import '../OrIconButtonV3/styles.js';
21
+ import '../OrIconV3/OrIcon.js';
22
+ import '../../OrIcon.vue_vue_type_script_lang-73f9cc63.js';
23
+ import '../OrIconV3/styles.js';
24
+ import '../OrTooltipV3/OrTooltip.js';
25
+ import '../../OrTooltip.vue_vue_type_script_lang-227592d8.js';
26
+ import '../OrTooltipV3/styles.js';
27
+ import '../OrPopoverV3/OrPopover.js';
28
+ import '../../OrPopover.vue_vue_type_script_lang-506ae7bb.js';
29
+ import '../../floating-ui.dom.esm-83eba816.js';
30
+ import '../../index-09d1cb24.js';
31
+ import '../../index-f4d8e24c.js';
32
+ import '../OrPopoverV3/props.js';
33
+ import '../OrPopoverV3/styles.js';
34
+ import '../OrBottomSheetV3/OrBottomSheet.js';
35
+ import '../../OrBottomSheet.vue_vue_type_script_lang-214a0eea.js';
36
+ import '../OrBottomSheetV3/props.js';
37
+ import '../OrBottomSheetV3/styles.js';
38
+ import '../OrOverlayV3/OrOverlay.js';
39
+ import '../../OrOverlay.vue_vue_type_script_lang-0fdf19ba.js';
40
+ import '../OrOverlayV3/styles.js';
41
+ import '../OrTeleportV3/OrTeleport.js';
42
+ import '../../OrTeleport.vue3.vue_vue_type_script_lang-a6ce162e.js';
43
+ import '../../hooks/useElevation.js';
44
+ import '../../utils/isVisible.js';
45
+ import '../../hooks/usePopoverState.js';
46
+ import '../../hooks/useResponsive/useResponsive.js';
47
+ import '../OrInputBoxV3/OrInputBox.js';
48
+ import '../../OrInputBox.vue_vue_type_script_lang-49fb179a.js';
49
+ import '../OrInputBoxV3/props.js';
50
+ import '../OrInputBoxV3/styles.js';
51
+ import '../OrLabelV3/OrLabel.js';
52
+ import '../../OrLabel.vue_vue_type_script_lang-3e11ab8a.js';
53
+ import '../OrLabelV3/props.js';
54
+ import '../OrLabelV3/styles.js';
55
+ import '../OrModalV3/OrModal.js';
56
+ import '../../OrModal.vue_vue_type_script_lang-83469d51.js';
57
+ import '../OrModalV3/props.js';
58
+ import '../OrModalV3/styles.js';
59
+ import '../../hooks/useIdAttribute.js';
60
+ import '../../hooks/useControlAttributes.js';
61
+ import '../../hooks/useValidationAttributes.js';
62
+
63
+ const _hoisted_1 = {
64
+ class: /*#__PURE__*/normalizeClass(['layout-row', 'gap-xs'])
65
+ };
66
+ const _hoisted_2 = {
67
+ class: /*#__PURE__*/normalizeClass(['contents'])
68
+ };
69
+ const _hoisted_3 = {
70
+ class: /*#__PURE__*/normalizeClass(['contents'])
71
+ };
72
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
73
+ const _component_OrIconButton = resolveComponent("OrIconButton");
74
+ const _component_OrLabel = resolveComponent("OrLabel");
75
+ const _component_OrInputBox = resolveComponent("OrInputBox");
76
+ const _component_OrHint = resolveComponent("OrHint");
77
+ const _component_OrError = resolveComponent("OrError");
78
+ const _component_OrModal = resolveComponent("OrModal");
79
+ return openBlock(), createElementBlock("div", {
80
+ ref: "root",
81
+ class: normalizeClass(_ctx.rootStyles)
82
+ }, [_ctx.label ? (openBlock(), createBlock(_component_OrLabel, {
83
+ key: 0,
84
+ "control-id": _ctx.controlAttributes.id,
85
+ variant: 'input',
86
+ required: _ctx.required,
87
+ disabled: _ctx.disabled
88
+ }, {
89
+ addon: withCtx(() => [createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "addon"), createVNode(_component_OrIconButton, {
90
+ icon: 'fullscreen',
91
+ onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.modal.open(), ["stop"]))
92
+ })])]),
93
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.label) + " ", 1 /* TEXT */)]),
94
+
95
+ _: 3 /* FORWARDED */
96
+ }, 8 /* PROPS */, ["control-id", "required", "disabled"])) : createCommentVNode("v-if", true), createVNode(_component_OrInputBox, {
97
+ size: 'm',
98
+ invalid: !!_ctx.error,
99
+ readonly: _ctx.readonly,
100
+ disabled: _ctx.disabled
101
+ }, {
102
+ default: withCtx(() => [createElementVNode("div", {
103
+ ref: "control",
104
+ class: normalizeClass(_ctx.controlStyles)
105
+ }, null, 2 /* CLASS */)]),
106
+
107
+ _: 1 /* STABLE */
108
+ }, 8 /* PROPS */, ["invalid", "readonly", "disabled"]), withDirectives(createElementVNode("div", _hoisted_2, [_ctx.hint ? (openBlock(), createBlock(_component_OrHint, {
109
+ key: 0,
110
+ disabled: _ctx.disabled
111
+ }, {
112
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.hint), 1 /* TEXT */)]),
113
+
114
+ _: 1 /* STABLE */
115
+ }, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true)], 512 /* NEED_PATCH */), [[vShow, !_ctx.error]]), withDirectives(createElementVNode("div", _hoisted_3, [createVNode(_component_OrError, {
116
+ disabled: _ctx.disabled
117
+ }, {
118
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.error), 1 /* TEXT */)]),
119
+
120
+ _: 1 /* STABLE */
121
+ }, 8 /* PROPS */, ["disabled"])], 512 /* NEED_PATCH */), [[vShow, typeof _ctx.error === 'string']]), createVNode(_component_OrModal, {
122
+ ref: "modal"
123
+ }, {
124
+ default: withCtx(() => [createVNode(_component_OrInputBox, {
125
+ size: 'm',
126
+ invalid: !!_ctx.error,
127
+ readonly: _ctx.readonly,
128
+ disabled: _ctx.disabled
129
+ }, {
130
+ default: withCtx(() => [createElementVNode("div", {
131
+ ref: "fullscreenControl",
132
+ class: normalizeClass(_ctx.controlStyles)
133
+ }, null, 2 /* CLASS */)]),
134
+
135
+ _: 1 /* STABLE */
136
+ }, 8 /* PROPS */, ["invalid", "readonly", "disabled"])]),
137
+ _: 1 /* STABLE */
138
+ }, 512 /* NEED_PATCH */)], 2 /* CLASS */);
139
+ }
140
+
141
+ script.render = render;
142
+ script.__file = "src/components/or-code-v3/OrCode.vue";
@@ -0,0 +1,119 @@
1
+ import { Extension } from '@codemirror/state';
2
+ import { PropType } from 'vue-demi';
3
+ import { CodeLanguage } from './props';
4
+ declare const _default: import("vue-demi").DefineComponent<{
5
+ modelValue: {
6
+ type: StringConstructor;
7
+ default: undefined;
8
+ };
9
+ language: {
10
+ type: PropType<CodeLanguage>;
11
+ default: CodeLanguage;
12
+ };
13
+ extensions: {
14
+ type: PropType<Extension[]>;
15
+ default: () => Extension[];
16
+ };
17
+ label: {
18
+ type: StringConstructor;
19
+ default: undefined;
20
+ };
21
+ hint: {
22
+ type: StringConstructor;
23
+ default: undefined;
24
+ };
25
+ error: {
26
+ type: (BooleanConstructor | StringConstructor)[];
27
+ default: undefined;
28
+ };
29
+ required: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ readonly: {
34
+ type: BooleanConstructor;
35
+ default: boolean;
36
+ };
37
+ disabled: {
38
+ type: BooleanConstructor;
39
+ default: boolean;
40
+ };
41
+ }, {
42
+ root: import("vue-demi").Ref<HTMLElement | undefined>;
43
+ control: import("vue-demi").Ref<HTMLElement | undefined>;
44
+ fullscreenControl: import("vue-demi").Ref<HTMLElement | undefined>;
45
+ modal: import("vue-demi").Ref<any>;
46
+ rootStyles: import("vue-demi").ComputedRef<string[]>;
47
+ controlStyles: import("vue-demi").ComputedRef<string[]>;
48
+ controlAttributes: {
49
+ required: boolean | undefined;
50
+ minlength: number | undefined;
51
+ maxlength: number | undefined;
52
+ pattern: string | undefined;
53
+ min: number | undefined;
54
+ max: number | undefined;
55
+ step: number | undefined;
56
+ readonly: boolean | undefined;
57
+ disabled: boolean | undefined;
58
+ 'force-state': string | undefined;
59
+ id: string | undefined;
60
+ };
61
+ proxyModelValue: import("vue-demi").WritableComputedRef<string | undefined>;
62
+ proxyLanguage: import("vue-demi").ComputedRef<import("@codemirror/language").LanguageSupport>;
63
+ focus: () => void;
64
+ blur: () => void;
65
+ }, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("update:modelValue" | "keydown" | "keyup" | "focus" | "blur")[], "update:modelValue" | "keydown" | "keyup" | "focus" | "blur", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
66
+ modelValue: {
67
+ type: StringConstructor;
68
+ default: undefined;
69
+ };
70
+ language: {
71
+ type: PropType<CodeLanguage>;
72
+ default: CodeLanguage;
73
+ };
74
+ extensions: {
75
+ type: PropType<Extension[]>;
76
+ default: () => Extension[];
77
+ };
78
+ label: {
79
+ type: StringConstructor;
80
+ default: undefined;
81
+ };
82
+ hint: {
83
+ type: StringConstructor;
84
+ default: undefined;
85
+ };
86
+ error: {
87
+ type: (BooleanConstructor | StringConstructor)[];
88
+ default: undefined;
89
+ };
90
+ required: {
91
+ type: BooleanConstructor;
92
+ default: boolean;
93
+ };
94
+ readonly: {
95
+ type: BooleanConstructor;
96
+ default: boolean;
97
+ };
98
+ disabled: {
99
+ type: BooleanConstructor;
100
+ default: boolean;
101
+ };
102
+ }>> & {
103
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
104
+ onKeydown?: ((...args: any[]) => any) | undefined;
105
+ onKeyup?: ((...args: any[]) => any) | undefined;
106
+ onFocus?: ((...args: any[]) => any) | undefined;
107
+ onBlur?: ((...args: any[]) => any) | undefined;
108
+ }, {
109
+ modelValue: string;
110
+ language: CodeLanguage;
111
+ extensions: Extension[];
112
+ label: string;
113
+ hint: string;
114
+ error: string | boolean;
115
+ required: boolean;
116
+ readonly: boolean;
117
+ disabled: boolean;
118
+ }>;
119
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as OrCodeV3 } from './OrCode.vue';
2
+ export * from './props';
@@ -0,0 +1,60 @@
1
+ export { CodeLanguage } from './props.js';
2
+ export { s as OrCodeV3 } from '../../OrCode.vue_vue_type_script_lang-84a512fb.js';
3
+ import '../../index-576b3dec.js';
4
+ import '../../index-6a13fa4e.js';
5
+ import '../../index-eba9b646.js';
6
+ import 'vue-demi';
7
+ import './styles.js';
8
+ import '../OrErrorV3/OrError.js';
9
+ import '../../OrError.vue_vue_type_script_lang-df7b5e32.js';
10
+ import '../OrErrorV3/styles.js';
11
+ import 'vue';
12
+ import '../OrHintV3/OrHint.js';
13
+ import '../../OrHint.vue_vue_type_script_lang-0f5e8377.js';
14
+ import '../OrHintV3/styles.js';
15
+ import '../OrIconButtonV3/OrIconButton.js';
16
+ import '../../OrIconButton.vue_vue_type_script_lang-c3a78c23.js';
17
+ import '../OrIconButtonV3/props.js';
18
+ import '../OrIconV3/props.js';
19
+ import '../OrIconButtonV3/styles.js';
20
+ import '../OrIconV3/OrIcon.js';
21
+ import '../../OrIcon.vue_vue_type_script_lang-73f9cc63.js';
22
+ import '../OrIconV3/styles.js';
23
+ import '../OrTooltipV3/OrTooltip.js';
24
+ import '../../OrTooltip.vue_vue_type_script_lang-227592d8.js';
25
+ import '../OrTooltipV3/styles.js';
26
+ import '../OrPopoverV3/OrPopover.js';
27
+ import '../../OrPopover.vue_vue_type_script_lang-506ae7bb.js';
28
+ import '../../floating-ui.dom.esm-83eba816.js';
29
+ import '../../index-09d1cb24.js';
30
+ import '../../index-f4d8e24c.js';
31
+ import '../OrPopoverV3/props.js';
32
+ import '../OrPopoverV3/styles.js';
33
+ import '../OrBottomSheetV3/OrBottomSheet.js';
34
+ import '../../OrBottomSheet.vue_vue_type_script_lang-214a0eea.js';
35
+ import '../OrBottomSheetV3/props.js';
36
+ import '../OrBottomSheetV3/styles.js';
37
+ import '../OrOverlayV3/OrOverlay.js';
38
+ import '../../OrOverlay.vue_vue_type_script_lang-0fdf19ba.js';
39
+ import '../OrOverlayV3/styles.js';
40
+ import '../OrTeleportV3/OrTeleport.js';
41
+ import '../../OrTeleport.vue3.vue_vue_type_script_lang-a6ce162e.js';
42
+ import '../../hooks/useElevation.js';
43
+ import '../../utils/isVisible.js';
44
+ import '../../hooks/usePopoverState.js';
45
+ import '../../hooks/useResponsive/useResponsive.js';
46
+ import '../OrInputBoxV3/OrInputBox.js';
47
+ import '../../OrInputBox.vue_vue_type_script_lang-49fb179a.js';
48
+ import '../OrInputBoxV3/props.js';
49
+ import '../OrInputBoxV3/styles.js';
50
+ import '../OrLabelV3/OrLabel.js';
51
+ import '../../OrLabel.vue_vue_type_script_lang-3e11ab8a.js';
52
+ import '../OrLabelV3/props.js';
53
+ import '../OrLabelV3/styles.js';
54
+ import '../OrModalV3/OrModal.js';
55
+ import '../../OrModal.vue_vue_type_script_lang-83469d51.js';
56
+ import '../OrModalV3/props.js';
57
+ import '../OrModalV3/styles.js';
58
+ import '../../hooks/useIdAttribute.js';
59
+ import '../../hooks/useControlAttributes.js';
60
+ import '../../hooks/useValidationAttributes.js';
@@ -0,0 +1,8 @@
1
+ export declare enum CodeLanguage {
2
+ HTML = "html",
3
+ CSS = "css",
4
+ JS = "js",
5
+ TS = "ts",
6
+ JSON = "json",
7
+ MD = "md"
8
+ }
@@ -0,0 +1,11 @@
1
+ var CodeLanguage;
2
+ (function (CodeLanguage) {
3
+ CodeLanguage["HTML"] = "html";
4
+ CodeLanguage["CSS"] = "css";
5
+ CodeLanguage["JS"] = "js";
6
+ CodeLanguage["TS"] = "ts";
7
+ CodeLanguage["JSON"] = "json";
8
+ CodeLanguage["MD"] = "md";
9
+ })(CodeLanguage || (CodeLanguage = {}));
10
+
11
+ export { CodeLanguage };
@@ -0,0 +1,2 @@
1
+ export declare const Code: string[];
2
+ export declare const CodeControl: string[];
@@ -0,0 +1,10 @@
1
+ const Code = [
2
+ // Layout
3
+ 'layout-column',
4
+ // Spacing
5
+ 'gap-xs'];
6
+ const CodeControl = [
7
+ // Layout
8
+ 'grow'];
9
+
10
+ export { Code, CodeControl };
@@ -15,6 +15,7 @@ export * from './or-checkbox-tree-v3';
15
15
  export * from './or-checkbox-v3';
16
16
  export * from './or-chips';
17
17
  export * from './or-code';
18
+ export * from './or-code-v3';
18
19
  export * from './or-collapse';
19
20
  export * from './or-color-picker';
20
21
  export * from './or-combined-input-v3';