@ternarytech-io/gears-ui 0.3.0 → 0.3.1

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/package.json CHANGED
@@ -1,113 +1,113 @@
1
- {
2
- "name": "@ternarytech-io/gears-ui",
3
- "version": "0.3.0",
4
- "type": "module",
5
- "description": "Gears UI: Vue 3 components on Tabler, used by the Gears Studio and the applications it builds.",
6
- "license": "MPL-2.0",
7
- "author": "Ternary Tech",
8
- "homepage": "https://github.com/TernaryTech-io/Gears.UI#readme",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/TernaryTech-io/Gears.UI.git"
12
- },
13
- "bugs": "https://github.com/TernaryTech-io/Gears.UI/issues",
14
- "keywords": [
15
- "vue",
16
- "vue3",
17
- "tabler",
18
- "components",
19
- "ui",
20
- "gears"
21
- ],
22
- "files": [
23
- "src",
24
- "README.md",
25
- "LICENSE"
26
- ],
27
- "sideEffects": [
28
- "*.css"
29
- ],
30
- "publishConfig": {
31
- "access": "public"
32
- },
33
- "exports": {
34
- ".": "./src/index.ts",
35
- "./plugins": "./src/plugins/index.ts",
36
- "./code-editor": "./src/code-editor.ts",
37
- "./styles.css": "./src/styles/gears.css",
38
- "./plugins.css": "./src/styles/plugins.css",
39
- "./components/*": "./src/components/*"
40
- },
41
- "scripts": {
42
- "dev": "vite",
43
- "build": "vue-tsc --noEmit && vite build",
44
- "typecheck": "vue-tsc --noEmit",
45
- "preview": "vite preview"
46
- },
47
- "peerDependencies": {
48
- "monaco-editor": "^0.57.0",
49
- "vue": "^3.5.0",
50
- "vue-router": "^4.6.0",
51
- "tom-select": "^2.6.0",
52
- "@melloware/coloris": "^0.25.0",
53
- "vanilla-calendar-pro": "^3.3.2",
54
- "dropzone": "^6.3.0",
55
- "imask": "^7.6.0",
56
- "nouislider": "^15.8.0",
57
- "sortablejs": "^1.15.0",
58
- "hugerte": "^1.0.0",
59
- "apexcharts": "^7.0.0"
60
- },
61
- "dependencies": {
62
- "@tabler/core": "1.7.1",
63
- "@tabler/icons-webfont": "3.49.0"
64
- },
65
- "devDependencies": {
66
- "@melloware/coloris": "0.25.0",
67
- "@types/sortablejs": "1.15.9",
68
- "@vitejs/plugin-vue": "6.0.10",
69
- "apexcharts": "7.0.0",
70
- "dropzone": "6.3.5",
71
- "hugerte": "1.0.14",
72
- "imask": "7.6.1",
73
- "monaco-editor": "0.57.0",
74
- "nouislider": "15.8.1",
75
- "sortablejs": "1.15.7",
76
- "tom-select": "2.6.2",
77
- "typescript": "5.9.3",
78
- "vanilla-calendar-pro": "3.4.0",
79
- "vite": "7.3.7",
80
- "vue": "3.5.44",
81
- "vue-router": "4.6.4",
82
- "vue-tsc": "3.3.13"
83
- },
84
- "peerDependenciesMeta": {
85
- "monaco-editor": {
86
- "optional": true
87
- },
88
- "tom-select": {
89
- "optional": true
90
- },
91
- "@melloware/coloris": {
92
- "optional": true
93
- },
94
- "vanilla-calendar-pro": {
95
- "optional": true
96
- },
97
- "dropzone": {
98
- "optional": true
99
- },
100
- "imask": {
101
- "optional": true
102
- },
103
- "nouislider": {
104
- "optional": true
105
- },
106
- "sortablejs": {
107
- "optional": true
108
- },
109
- "hugerte": {
110
- "optional": true
111
- }
112
- }
113
- }
1
+ {
2
+ "name": "@ternarytech-io/gears-ui",
3
+ "version": "0.3.1",
4
+ "type": "module",
5
+ "description": "Gears UI: Vue 3 components on Tabler, used by the Gears Studio and the applications it builds.",
6
+ "license": "MPL-2.0",
7
+ "author": "Ternary Tech",
8
+ "homepage": "https://github.com/TernaryTech-io/Gears.UI#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/TernaryTech-io/Gears.UI.git"
12
+ },
13
+ "bugs": "https://github.com/TernaryTech-io/Gears.UI/issues",
14
+ "keywords": [
15
+ "vue",
16
+ "vue3",
17
+ "tabler",
18
+ "components",
19
+ "ui",
20
+ "gears"
21
+ ],
22
+ "files": [
23
+ "src",
24
+ "README.md",
25
+ "LICENSE"
26
+ ],
27
+ "sideEffects": [
28
+ "*.css"
29
+ ],
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
33
+ "exports": {
34
+ ".": "./src/index.ts",
35
+ "./plugins": "./src/plugins/index.ts",
36
+ "./code-editor": "./src/code-editor.ts",
37
+ "./styles.css": "./src/styles/gears.css",
38
+ "./plugins.css": "./src/styles/plugins.css",
39
+ "./components/*": "./src/components/*"
40
+ },
41
+ "scripts": {
42
+ "dev": "vite",
43
+ "build": "vue-tsc --noEmit && vite build",
44
+ "typecheck": "vue-tsc --noEmit",
45
+ "preview": "vite preview"
46
+ },
47
+ "peerDependencies": {
48
+ "monaco-editor": "^0.57.0",
49
+ "vue": "^3.5.0",
50
+ "vue-router": "^4.6.0",
51
+ "tom-select": "^2.6.0",
52
+ "@melloware/coloris": "^0.25.0",
53
+ "vanilla-calendar-pro": "^3.3.2",
54
+ "dropzone": "^6.3.0",
55
+ "imask": "^7.6.0",
56
+ "nouislider": "^15.8.0",
57
+ "sortablejs": "^1.15.0",
58
+ "hugerte": "^1.0.0",
59
+ "apexcharts": "^7.0.0"
60
+ },
61
+ "dependencies": {
62
+ "@tabler/core": "1.7.1",
63
+ "@tabler/icons-webfont": "3.49.0"
64
+ },
65
+ "devDependencies": {
66
+ "@melloware/coloris": "0.25.0",
67
+ "@types/sortablejs": "1.15.9",
68
+ "@vitejs/plugin-vue": "6.0.10",
69
+ "apexcharts": "7.0.0",
70
+ "dropzone": "6.3.5",
71
+ "hugerte": "1.0.14",
72
+ "imask": "7.6.1",
73
+ "monaco-editor": "0.57.0",
74
+ "nouislider": "15.8.1",
75
+ "sortablejs": "1.15.7",
76
+ "tom-select": "2.6.2",
77
+ "typescript": "5.9.3",
78
+ "vanilla-calendar-pro": "3.4.0",
79
+ "vite": "7.3.7",
80
+ "vue": "3.5.44",
81
+ "vue-router": "4.6.4",
82
+ "vue-tsc": "3.3.13"
83
+ },
84
+ "peerDependenciesMeta": {
85
+ "monaco-editor": {
86
+ "optional": true
87
+ },
88
+ "tom-select": {
89
+ "optional": true
90
+ },
91
+ "@melloware/coloris": {
92
+ "optional": true
93
+ },
94
+ "vanilla-calendar-pro": {
95
+ "optional": true
96
+ },
97
+ "dropzone": {
98
+ "optional": true
99
+ },
100
+ "imask": {
101
+ "optional": true
102
+ },
103
+ "nouislider": {
104
+ "optional": true
105
+ },
106
+ "sortablejs": {
107
+ "optional": true
108
+ },
109
+ "hugerte": {
110
+ "optional": true
111
+ }
112
+ }
113
+ }
@@ -1,41 +1,41 @@
1
- <script setup lang="ts">
2
- // A theme's accent color: Tabler's named colors as swatches (its color input). With `custom`, a
3
- // last swatch picks any color (#rrggbb) with the browser's color picker; it shows the custom color
4
- // while one is chosen. The `custom` slot goes after the swatches, for another picker.
5
- import { computed, useId } from 'vue'
6
- import TIcon from './TIcon.vue'
7
- import { isCustomAccent, themeAccents } from '../theme'
8
- import type { ThemeAccent } from '../types'
9
-
10
- defineProps<{ custom?: boolean; disabled?: boolean; legend?: string }>()
11
-
12
- const model = defineModel<ThemeAccent | null | undefined>()
13
- const name = useId()
14
- const customColor = computed(() => isCustomAccent(model.value ?? undefined) ? model.value! : null)
15
- const label = (color: string) => color[0].toUpperCase() + color.slice(1)
16
- </script>
17
-
18
- <template>
19
- <div role="radiogroup" :aria-label="legend ?? 'Accent color'">
20
- <div v-if="legend" class="form-label">{{ legend }}</div>
21
- <div class="t-accent-swatches align-items-center">
22
- <label v-for="color in themeAccents" :key="color" class="form-colorinput" :title="label(color)">
23
- <input type="radio" :name="name" :value="color" class="form-colorinput-input" :checked="model === color" :disabled="disabled"
24
- :aria-label="label(color)" @change="model = color">
25
- <span :class="['form-colorinput-color', `bg-${color}`]" />
26
- </label>
27
- <label v-if="custom" :class="['form-colorinput t-accent-custom', { active: customColor }]" :title="customColor ? `Custom: ${customColor}` : 'Custom color'">
28
- <input type="color" class="t-accent-custom-input" :value="customColor ?? '#3673d1'" :disabled="disabled" aria-label="Custom color"
29
- @input="model = ($event.target as HTMLInputElement).value">
30
- <span class="form-colorinput-color d-flex align-items-center justify-content-center" :style="customColor ? { background: customColor } : undefined">
31
- <TIcon :name="customColor ? 'check' : 'color-picker'" :class="customColor ? 'text-white' : 'text-secondary'" />
32
- </span>
33
- </label>
34
- <label v-else-if="customColor" class="form-colorinput" :title="customColor">
35
- <input type="radio" :name="name" class="form-colorinput-input" checked :disabled="disabled" :aria-label="`Custom: ${customColor}`">
36
- <span class="form-colorinput-color" :style="{ background: customColor }" />
37
- </label>
38
- <slot name="custom" />
39
- </div>
40
- </div>
41
- </template>
1
+ <script setup lang="ts">
2
+ // A theme's accent color: Tabler's named colors as swatches (its color input). With `custom`, a
3
+ // last swatch picks any color (#rrggbb) with the browser's color picker; it shows the custom color
4
+ // while one is chosen. The `custom` slot goes after the swatches, for another picker.
5
+ import { computed, useId } from 'vue'
6
+ import TIcon from './TIcon.vue'
7
+ import { isCustomAccent, themeAccents } from '../theme'
8
+ import type { ThemeAccent } from '../types'
9
+
10
+ defineProps<{ custom?: boolean; disabled?: boolean; legend?: string }>()
11
+
12
+ const model = defineModel<ThemeAccent | null | undefined>()
13
+ const name = useId()
14
+ const customColor = computed(() => isCustomAccent(model.value ?? undefined) ? model.value! : null)
15
+ const label = (color: string) => color[0].toUpperCase() + color.slice(1)
16
+ </script>
17
+
18
+ <template>
19
+ <div role="radiogroup" :aria-label="legend ?? 'Accent color'">
20
+ <div v-if="legend" class="form-label">{{ legend }}</div>
21
+ <div class="t-accent-swatches align-items-center">
22
+ <label v-for="color in themeAccents" :key="color" class="form-colorinput" :title="label(color)">
23
+ <input type="radio" :name="name" :value="color" class="form-colorinput-input" :checked="model === color" :disabled="disabled"
24
+ :aria-label="label(color)" @change="model = color">
25
+ <span :class="['form-colorinput-color', `bg-${color}`]" />
26
+ </label>
27
+ <label v-if="custom" :class="['form-colorinput t-accent-custom', { active: customColor }]" :title="customColor ? `Custom: ${customColor}` : 'Custom color'">
28
+ <input type="color" class="t-accent-custom-input" :value="customColor ?? '#3673d1'" :disabled="disabled" aria-label="Custom color"
29
+ @input="model = ($event.target as HTMLInputElement).value">
30
+ <span class="form-colorinput-color d-flex align-items-center justify-content-center" :style="customColor ? { background: customColor } : undefined">
31
+ <TIcon :name="customColor ? 'check' : 'color-picker'" :class="customColor ? 'text-white' : 'text-secondary'" />
32
+ </span>
33
+ </label>
34
+ <label v-else-if="customColor" class="form-colorinput" :title="customColor">
35
+ <input type="radio" :name="name" class="form-colorinput-input" checked :disabled="disabled" :aria-label="`Custom: ${customColor}`">
36
+ <span class="form-colorinput-color" :style="{ background: customColor }" />
37
+ </label>
38
+ <slot name="custom" />
39
+ </div>
40
+ </div>
41
+ </template>
@@ -1,22 +1,22 @@
1
- <script setup lang="ts">
2
- // Whether an application's page sits in a box, centered on wide screens with the background
3
- // around it, or fills the width. Each tile is a sketch of the page.
4
- import TRadioGroup from './TRadioGroup.vue'
5
- import { themeContainers } from '../theme'
6
- import type { ThemeContainer } from '../types'
7
-
8
- defineProps<{ disabled?: boolean; legend?: string }>()
9
-
10
- const model = defineModel<ThemeContainer | null | undefined>()
11
- </script>
12
-
13
- <template>
14
- <TRadioGroup v-model="model" :items="themeContainers" variant="tiles" tile-width="8rem" :disabled="disabled" :legend="legend">
15
- <template #preview="{ item }">
16
- <span :class="['t-sketch t-sketch-left', { 't-sketch-boxed': item.value === 'boxed' }]">
17
- <span class="t-sketch-nav" />
18
- <span class="t-sketch-page"><span /><span /><span /></span>
19
- </span>
20
- </template>
21
- </TRadioGroup>
22
- </template>
1
+ <script setup lang="ts">
2
+ // Whether an application's page sits in a box, centered on wide screens with the background
3
+ // around it, or fills the width. Each tile is a sketch of the page.
4
+ import TRadioGroup from './TRadioGroup.vue'
5
+ import { themeContainers } from '../theme'
6
+ import type { ThemeContainer } from '../types'
7
+
8
+ defineProps<{ disabled?: boolean; legend?: string }>()
9
+
10
+ const model = defineModel<ThemeContainer | null | undefined>()
11
+ </script>
12
+
13
+ <template>
14
+ <TRadioGroup v-model="model" :items="themeContainers" variant="tiles" tile-width="8rem" :disabled="disabled" :legend="legend">
15
+ <template #preview="{ item }">
16
+ <span :class="['t-sketch t-sketch-left', { 't-sketch-boxed': item.value === 'boxed' }]">
17
+ <span class="t-sketch-nav" />
18
+ <span class="t-sketch-page"><span /><span /><span /></span>
19
+ </span>
20
+ </template>
21
+ </TRadioGroup>
22
+ </template>
@@ -1,19 +1,19 @@
1
- <script setup lang="ts">
2
- // How much room an application's content gets: padding inside cards, tables, buttons and fields,
3
- // and the gaps between them. Each tile shows rows at that spacing.
4
- import TRadioGroup from './TRadioGroup.vue'
5
- import { themeDensities } from '../theme'
6
- import type { ThemeDensity } from '../types'
7
-
8
- defineProps<{ disabled?: boolean; legend?: string }>()
9
-
10
- const model = defineModel<ThemeDensity | null | undefined>()
11
- </script>
12
-
13
- <template>
14
- <TRadioGroup v-model="model" :items="themeDensities" variant="tiles" tile-width="8rem" :disabled="disabled" :legend="legend">
15
- <template #preview="{ item }">
16
- <span :class="['t-sketch-rows', `t-sketch-${item.value}`]"><span /><span /><span /><span /></span>
17
- </template>
18
- </TRadioGroup>
19
- </template>
1
+ <script setup lang="ts">
2
+ // How much room an application's content gets: padding inside cards, tables, buttons and fields,
3
+ // and the gaps between them. Each tile shows rows at that spacing.
4
+ import TRadioGroup from './TRadioGroup.vue'
5
+ import { themeDensities } from '../theme'
6
+ import type { ThemeDensity } from '../types'
7
+
8
+ defineProps<{ disabled?: boolean; legend?: string }>()
9
+
10
+ const model = defineModel<ThemeDensity | null | undefined>()
11
+ </script>
12
+
13
+ <template>
14
+ <TRadioGroup v-model="model" :items="themeDensities" variant="tiles" tile-width="8rem" :disabled="disabled" :legend="legend">
15
+ <template #preview="{ item }">
16
+ <span :class="['t-sketch-rows', `t-sketch-${item.value}`]"><span /><span /><span /><span /></span>
17
+ </template>
18
+ </TRadioGroup>
19
+ </template>