@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,35 @@
1
+ export { C as CodeLanguage, _ as OrCodeV3 } from '../../OrCode-ad718022.js';
2
+ import '@codemirror/commands';
3
+ import '@codemirror/lang-css';
4
+ import '@codemirror/lang-html';
5
+ import '@codemirror/lang-javascript';
6
+ import '@codemirror/lang-json';
7
+ import '@codemirror/lang-markdown';
8
+ import '@codemirror/state';
9
+ import '@codemirror/view';
10
+ import 'codemirror';
11
+ import 'vue-demi';
12
+ import '../../useIdAttribute-859439f0.js';
13
+ import '@vueuse/core';
14
+ import '@onereach/styles/tailwind.config';
15
+ import 'tailwindcss/resolveConfig';
16
+ import '../../useValidationAttributes-d1abbe34.js';
17
+ import '../../OrError-4ffc1c39.js';
18
+ import '../../normalize-component-6e8e3d80.js';
19
+ import '../../OrHint-aa221198.js';
20
+ import '../../OrIconButton-ab726d49.js';
21
+ import '../../OrIcon-d35a84d8.js';
22
+ import '../../OrTooltip-bf4c725c.js';
23
+ import '../../usePopoverState-8a95a300.js';
24
+ import '../../OrPopover-ef16a904.js';
25
+ import '@floating-ui/dom';
26
+ import '../../useElevation-a50ec347.js';
27
+ import '../../useResponsive-a02e95b7.js';
28
+ import '../../OrBottomSheet-af25c131.js';
29
+ import '../../OrOverlay-948346df.js';
30
+ import '../../OrTeleport.vue2-424c7f33.js';
31
+ import 'portal-vue';
32
+ import '../../OrInputBox-11227ecd.js';
33
+ import '../../OrInputBox.vue_rollup-plugin-vue_script-1715021a.js';
34
+ import '../../OrLabel-63380256.js';
35
+ import '../../OrModal-7b7c35e1.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,2 @@
1
+ export declare const Code: string[];
2
+ export declare const CodeControl: string[];
@@ -19,6 +19,7 @@ export { _ as OrCheckboxV3 } from './OrCheckbox-41f2822d.js';
19
19
  export { _ as OrChip } from './OrChip-a614bbb9.js';
20
20
  export { _ as OrChips } from './OrChips-bdf51639.js';
21
21
  export { _ as OrCode, O as OrCodeLanguages } from './OrCode-cbd05828.js';
22
+ export { C as CodeLanguage, _ as OrCodeV3 } from './OrCode-ad718022.js';
22
23
  export { _ as OrCollapse } from './OrCollapse-9b5d590f.js';
23
24
  export { _ 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-5370585d.js';
24
25
  export { _ as OrCombinedInputV3 } from './OrCombinedInput-ed20e33b.js';
@@ -0,0 +1,301 @@
1
+ import { indentWithTab } from '@codemirror/commands';
2
+ import { css } from '@codemirror/lang-css';
3
+ import { html } from '@codemirror/lang-html';
4
+ import { javascript } from '@codemirror/lang-javascript';
5
+ import { json } from '@codemirror/lang-json';
6
+ import { markdown } from '@codemirror/lang-markdown';
7
+ import { EditorState } from '@codemirror/state';
8
+ import { EditorView, keymap } from '@codemirror/view';
9
+ import { basicSetup } from 'codemirror';
10
+ import { defineComponent, ref, computed, reactive, watch, onMounted, onUnmounted } from 'vue-demi';
11
+ import { a as useIdAttribute, u as useControlAttributes } from './useIdAttribute-859439f0.js';
12
+ import '@vueuse/core';
13
+ import '@onereach/styles/tailwind.config';
14
+ import 'tailwindcss/resolveConfig';
15
+ import { u as useValidationAttributes } from './useValidationAttributes-d1abbe34.js';
16
+ import { s as script$1 } from './OrError-c01d0c29.js';
17
+ import { s as script$2 } from './OrHint-06ab89d7.js';
18
+ import { s as script$3 } from './OrIconButton-0aaadc68.js';
19
+ import { s as script$4 } from './OrInputBox-32b37b17.js';
20
+ import { s as script$5 } from './OrLabel-4da56db0.js';
21
+ import { s as script$6 } from './OrModal-cabce172.js';
22
+ import { resolveComponent, openBlock, createElementBlock, normalizeClass, createBlock, withCtx, createElementVNode, renderSlot, createVNode, withModifiers, createTextVNode, toDisplayString, createCommentVNode, withDirectives, vShow } from 'vue';
23
+
24
+ var CodeLanguage;
25
+ (function (CodeLanguage) {
26
+ CodeLanguage["HTML"] = "html";
27
+ CodeLanguage["CSS"] = "css";
28
+ CodeLanguage["JS"] = "js";
29
+ CodeLanguage["TS"] = "ts";
30
+ CodeLanguage["JSON"] = "json";
31
+ CodeLanguage["MD"] = "md";
32
+ })(CodeLanguage || (CodeLanguage = {}));
33
+
34
+ const Code = [
35
+ // Layout
36
+ 'layout-column',
37
+ // Spacing
38
+ 'gap-xs'];
39
+ const CodeControl = [
40
+ // Layout
41
+ 'grow'];
42
+
43
+ var script = defineComponent({
44
+ name: 'OrCode',
45
+ components: {
46
+ OrError: script$1,
47
+ OrHint: script$2,
48
+ OrIconButton: script$3,
49
+ OrInputBox: script$4,
50
+ OrLabel: script$5,
51
+ OrModal: script$6
52
+ },
53
+ model: {
54
+ prop: 'modelValue',
55
+ event: 'update:modelValue'
56
+ },
57
+ props: {
58
+ modelValue: {
59
+ type: String,
60
+ default: undefined
61
+ },
62
+ language: {
63
+ type: String,
64
+ default: CodeLanguage.JS
65
+ },
66
+ extensions: {
67
+ type: Array,
68
+ default: () => [basicSetup]
69
+ },
70
+ label: {
71
+ type: String,
72
+ default: undefined
73
+ },
74
+ hint: {
75
+ type: String,
76
+ default: undefined
77
+ },
78
+ error: {
79
+ type: [String, Boolean],
80
+ default: undefined
81
+ },
82
+ required: {
83
+ type: Boolean,
84
+ default: false
85
+ },
86
+ readonly: {
87
+ type: Boolean,
88
+ default: false
89
+ },
90
+ disabled: {
91
+ type: Boolean,
92
+ default: false
93
+ }
94
+ },
95
+ emits: ['update:modelValue', 'keydown', 'keyup', 'focus', 'blur'],
96
+ expose: ['root', 'focus', 'blur'],
97
+ setup(props, context) {
98
+ // Refs
99
+ const root = ref();
100
+ const control = ref();
101
+ const fullscreenControl = ref();
102
+ const modal = ref();
103
+ // Styles
104
+ const rootStyles = computed(() => ['or-code-v3', ...Code]);
105
+ const controlStyles = computed(() => [...CodeControl]);
106
+ // State
107
+ const controlAttributes = reactive({
108
+ id: useIdAttribute(),
109
+ ...useControlAttributes(),
110
+ ...useValidationAttributes()
111
+ });
112
+ const proxyModelValue = computed({
113
+ get: () => props.modelValue,
114
+ set: value => {
115
+ context.emit('update:modelValue', value);
116
+ }
117
+ });
118
+ const proxyLanguage = computed(() => {
119
+ switch (props.language) {
120
+ case CodeLanguage.HTML:
121
+ return html();
122
+ case CodeLanguage.CSS:
123
+ return css();
124
+ case CodeLanguage.JS:
125
+ return javascript();
126
+ case CodeLanguage.TS:
127
+ return javascript({
128
+ typescript: true
129
+ });
130
+ case CodeLanguage.JSON:
131
+ return json();
132
+ case CodeLanguage.MD:
133
+ return markdown();
134
+ }
135
+ });
136
+ // Methods
137
+ function focus() {
138
+ var _a;
139
+ (_a = control.value) === null || _a === void 0 ? void 0 : _a.focus();
140
+ }
141
+ function blur() {
142
+ var _a;
143
+ (_a = control.value) === null || _a === void 0 ? void 0 : _a.blur();
144
+ }
145
+ // #region Codemirror
146
+ const editorView = new EditorView({
147
+ dispatch: transaction => {
148
+ editorView.update([transaction]);
149
+ proxyModelValue.value = String(editorView.state.doc);
150
+ }
151
+ });
152
+ const extensions = computed(() => [...props.extensions, proxyLanguage.value, keymap.of([indentWithTab]), EditorView.editable.of(!props.readonly && !props.disabled), EditorView.domEventHandlers({
153
+ keydown: event => {
154
+ context.emit('keydown', event);
155
+ },
156
+ keyup: event => {
157
+ context.emit('keyup', event);
158
+ },
159
+ focus: event => {
160
+ context.emit('focus', event);
161
+ },
162
+ blur: event => {
163
+ context.emit('blur', event);
164
+ }
165
+ }), EditorView.baseTheme({})]);
166
+ watch([proxyModelValue, extensions], _ref => {
167
+ let [modelValue = '', extensions] = _ref;
168
+ const {
169
+ selection
170
+ } = editorView.state;
171
+ editorView.setState(EditorState.create({
172
+ doc: modelValue,
173
+ extensions,
174
+ selection: selection.ranges.some(range => range.to > modelValue.length) ? {
175
+ anchor: modelValue.length
176
+ } : selection
177
+ }));
178
+ }, {
179
+ immediate: true
180
+ });
181
+ // #endregion
182
+ // Effects
183
+ watch(() => {
184
+ var _a;
185
+ return (_a = modal.value) === null || _a === void 0 ? void 0 : _a.state;
186
+ }, value => {
187
+ setTimeout(() => {
188
+ var _a, _b;
189
+ if (value === 'open') {
190
+ (_a = fullscreenControl.value) === null || _a === void 0 ? void 0 : _a.append(editorView.dom);
191
+ } else {
192
+ (_b = control.value) === null || _b === void 0 ? void 0 : _b.append(editorView.dom);
193
+ }
194
+ });
195
+ });
196
+ // Lifecycle
197
+ onMounted(() => {
198
+ var _a;
199
+ (_a = control.value) === null || _a === void 0 ? void 0 : _a.append(editorView.dom);
200
+ });
201
+ onUnmounted(() => {
202
+ editorView.destroy();
203
+ });
204
+ return {
205
+ root,
206
+ control,
207
+ fullscreenControl,
208
+ modal,
209
+ rootStyles,
210
+ controlStyles,
211
+ controlAttributes,
212
+ proxyModelValue,
213
+ proxyLanguage,
214
+ focus,
215
+ blur
216
+ };
217
+ }
218
+ });
219
+
220
+ const _hoisted_1 = {
221
+ class: /*#__PURE__*/normalizeClass(['layout-row', 'gap-xs'])
222
+ };
223
+ const _hoisted_2 = {
224
+ class: /*#__PURE__*/normalizeClass(['contents'])
225
+ };
226
+ const _hoisted_3 = {
227
+ class: /*#__PURE__*/normalizeClass(['contents'])
228
+ };
229
+ function render(_ctx, _cache, $props, $setup, $data, $options) {
230
+ const _component_OrIconButton = resolveComponent("OrIconButton");
231
+ const _component_OrLabel = resolveComponent("OrLabel");
232
+ const _component_OrInputBox = resolveComponent("OrInputBox");
233
+ const _component_OrHint = resolveComponent("OrHint");
234
+ const _component_OrError = resolveComponent("OrError");
235
+ const _component_OrModal = resolveComponent("OrModal");
236
+ return openBlock(), createElementBlock("div", {
237
+ ref: "root",
238
+ class: normalizeClass(_ctx.rootStyles)
239
+ }, [_ctx.label ? (openBlock(), createBlock(_component_OrLabel, {
240
+ key: 0,
241
+ "control-id": _ctx.controlAttributes.id,
242
+ variant: 'input',
243
+ required: _ctx.required,
244
+ disabled: _ctx.disabled
245
+ }, {
246
+ addon: withCtx(() => [createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "addon"), createVNode(_component_OrIconButton, {
247
+ icon: 'fullscreen',
248
+ onClick: _cache[0] || (_cache[0] = withModifiers($event => _ctx.modal.open(), ["stop"]))
249
+ })])]),
250
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.label) + " ", 1 /* TEXT */)]),
251
+
252
+ _: 3 /* FORWARDED */
253
+ }, 8 /* PROPS */, ["control-id", "required", "disabled"])) : createCommentVNode("v-if", true), createVNode(_component_OrInputBox, {
254
+ size: 'm',
255
+ invalid: !!_ctx.error,
256
+ readonly: _ctx.readonly,
257
+ disabled: _ctx.disabled
258
+ }, {
259
+ default: withCtx(() => [createElementVNode("div", {
260
+ ref: "control",
261
+ class: normalizeClass(_ctx.controlStyles)
262
+ }, null, 2 /* CLASS */)]),
263
+
264
+ _: 1 /* STABLE */
265
+ }, 8 /* PROPS */, ["invalid", "readonly", "disabled"]), withDirectives(createElementVNode("div", _hoisted_2, [_ctx.hint ? (openBlock(), createBlock(_component_OrHint, {
266
+ key: 0,
267
+ disabled: _ctx.disabled
268
+ }, {
269
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.hint), 1 /* TEXT */)]),
270
+
271
+ _: 1 /* STABLE */
272
+ }, 8 /* PROPS */, ["disabled"])) : createCommentVNode("v-if", true)], 512 /* NEED_PATCH */), [[vShow, !_ctx.error]]), withDirectives(createElementVNode("div", _hoisted_3, [createVNode(_component_OrError, {
273
+ disabled: _ctx.disabled
274
+ }, {
275
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.error), 1 /* TEXT */)]),
276
+
277
+ _: 1 /* STABLE */
278
+ }, 8 /* PROPS */, ["disabled"])], 512 /* NEED_PATCH */), [[vShow, typeof _ctx.error === 'string']]), createVNode(_component_OrModal, {
279
+ ref: "modal"
280
+ }, {
281
+ default: withCtx(() => [createVNode(_component_OrInputBox, {
282
+ size: 'm',
283
+ invalid: !!_ctx.error,
284
+ readonly: _ctx.readonly,
285
+ disabled: _ctx.disabled
286
+ }, {
287
+ default: withCtx(() => [createElementVNode("div", {
288
+ ref: "fullscreenControl",
289
+ class: normalizeClass(_ctx.controlStyles)
290
+ }, null, 2 /* CLASS */)]),
291
+
292
+ _: 1 /* STABLE */
293
+ }, 8 /* PROPS */, ["invalid", "readonly", "disabled"])]),
294
+ _: 1 /* STABLE */
295
+ }, 512 /* NEED_PATCH */)], 2 /* CLASS */);
296
+ }
297
+
298
+ script.render = render;
299
+ script.__file = "src/components/or-code-v3/OrCode.vue";
300
+
301
+ export { CodeLanguage as C, script as s };
@@ -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';
@@ -18,6 +18,7 @@ export { s as OrCheckboxV3 } from '../OrCheckbox-2194e473.js';
18
18
  export { s as OrChip } from '../OrChip-857982e0.js';
19
19
  export { s as OrChips } from '../OrChips-053f3a92.js';
20
20
  export { s as OrCode, O as OrCodeLanguages } from '../OrCode-2f8cdf96.js';
21
+ export { C as CodeLanguage, s as OrCodeV3 } from '../OrCode-8ccd5dc7.js';
21
22
  export { s as OrCollapse } from '../OrCollapse-a06f22aa.js';
22
23
  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-475c0be4.js';
23
24
  export { s as OrCombinedInputV3 } from '../OrCombinedInput-e3891038.js';
@@ -137,6 +138,7 @@ import '@codemirror/lang-javascript';
137
138
  import '@codemirror/lang-markdown';
138
139
  import '@codemirror/language';
139
140
  import '@lezer/highlight';
141
+ import '../useValidationAttributes-d1abbe34.js';
140
142
  import '../px-to-rem-0b26b83e.js';
141
143
  import '../dom-f1d55b67.js';
142
144
  import 'lodash/isElement';
@@ -146,7 +148,6 @@ import '../dropdown-open-e1f90e0a.js';
146
148
  import '../OrDateTimePickerPopoverHeader-bc8e0bcf.js';
147
149
  import 'lodash/padStart';
148
150
  import '@floating-ui/dom';
149
- import '../useValidationAttributes-d1abbe34.js';
150
151
  import '../useResponsive-a02e95b7.js';
151
152
  import 'lodash/cloneDeep';
152
153
  import 'lodash/isEqual';
@@ -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,33 @@
1
+ export { C as CodeLanguage, s as OrCodeV3 } from '../../OrCode-8ccd5dc7.js';
2
+ import '@codemirror/commands';
3
+ import '@codemirror/lang-css';
4
+ import '@codemirror/lang-html';
5
+ import '@codemirror/lang-javascript';
6
+ import '@codemirror/lang-json';
7
+ import '@codemirror/lang-markdown';
8
+ import '@codemirror/state';
9
+ import '@codemirror/view';
10
+ import 'codemirror';
11
+ import 'vue-demi';
12
+ import '../../useIdAttribute-859439f0.js';
13
+ import '@vueuse/core';
14
+ import '@onereach/styles/tailwind.config';
15
+ import 'tailwindcss/resolveConfig';
16
+ import '../../useValidationAttributes-d1abbe34.js';
17
+ import '../../OrError-c01d0c29.js';
18
+ import 'vue';
19
+ import '../../OrHint-06ab89d7.js';
20
+ import '../../OrIconButton-0aaadc68.js';
21
+ import '../../OrIcon-62793572.js';
22
+ import '../../OrTooltip-3025564a.js';
23
+ import '../../usePopoverState-8a95a300.js';
24
+ import '../../OrPopover-337df396.js';
25
+ import '@floating-ui/dom';
26
+ import '../../useElevation-a50ec347.js';
27
+ import '../../useResponsive-a02e95b7.js';
28
+ import '../../OrBottomSheet-f2f3aef9.js';
29
+ import '../../OrOverlay-489fdf76.js';
30
+ import '../../OrTeleport.vue3-8099178c.js';
31
+ import '../../OrInputBox-32b37b17.js';
32
+ import '../../OrLabel-4da56db0.js';
33
+ import '../../OrModal-cabce172.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,2 @@
1
+ export declare const Code: string[];
2
+ export declare const CodeControl: string[];
@@ -18,6 +18,7 @@ export { s as OrCheckboxV3 } from './OrCheckbox-2194e473.js';
18
18
  export { s as OrChip } from './OrChip-857982e0.js';
19
19
  export { s as OrChips } from './OrChips-053f3a92.js';
20
20
  export { s as OrCode, O as OrCodeLanguages } from './OrCode-2f8cdf96.js';
21
+ export { C as CodeLanguage, s as OrCodeV3 } from './OrCode-8ccd5dc7.js';
21
22
  export { s as OrCollapse } from './OrCollapse-a06f22aa.js';
22
23
  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-475c0be4.js';
23
24
  export { s as OrCombinedInputV3 } from './OrCombinedInput-e3891038.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/ui-components",
3
- "version": "4.10.0",
3
+ "version": "4.10.1-beta.2921.0",
4
4
  "description": "Vue components library for v2/3",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/auto/index.js",
@@ -154,6 +154,5 @@
154
154
  "default": "./dist/bundled/v3/components/*/index.js"
155
155
  },
156
156
  "./package.json": "./package.json"
157
- },
158
- "gitHead": "ba154bd45bae4b281e1feffed5b6ebe0e6122fae"
157
+ }
159
158
  }
@@ -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';