@greendrake/ui 0.1.0 → 0.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greendrake/ui",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Vue 3 component library: form controls, modals, search, tabs, toasts, layout",
5
5
  "license": "MIT",
6
6
  "author": "Eugene Greendrake <eugene@greendrake.nz>",
@@ -33,9 +33,9 @@
33
33
  },
34
34
  "prettier": "@greendrake/dev-config/prettier",
35
35
  "dependencies": {
36
- "@greendrake/domains": "0.1.0",
37
- "@greendrake/scss-kit": "0.1.0",
38
- "@greendrake/util": "0.1.0",
36
+ "@greendrake/domains": "0.3.0",
37
+ "@greendrake/scss-kit": "0.3.0",
38
+ "@greendrake/util": "0.3.0",
39
39
  "vue-tippy": "^6.7.1"
40
40
  },
41
41
  "peerDependencies": {
@@ -43,7 +43,7 @@
43
43
  "vue-router": "^4.6.4"
44
44
  },
45
45
  "devDependencies": {
46
- "@greendrake/dev-config": "0.1.0",
46
+ "@greendrake/dev-config": "0.3.0",
47
47
  "typescript": "6.0.3",
48
48
  "vue": "^3.5.34",
49
49
  "vue-router": "^4.6.4",
package/src/BottomNav.vue CHANGED
@@ -67,6 +67,9 @@ const emit = defineEmits<{ select: [id: string] }>()
67
67
  border-top: 1px solid var(--border-color-light);
68
68
  &__tab {
69
69
  flex: 1 1 0;
70
+ // Holds the tab to its share of the bar however long its label, which
71
+ // the label's own clipping below depends on.
72
+ min-width: 0;
70
73
  display: flex;
71
74
  flex-direction: column;
72
75
  align-items: center;
@@ -116,6 +119,13 @@ const emit = defineEmits<{ select: [id: string] }>()
116
119
  &__label {
117
120
  font-size: var(--font-xs);
118
121
  line-height: 1;
122
+ // One line, always: a label that wrapped would lift its icon off the
123
+ // line the other tabs' icons sit on. One too long for its cell is cut
124
+ // short instead — visibly only; its accessible name stays whole.
125
+ max-width: 100%;
126
+ overflow: hidden;
127
+ white-space: nowrap;
128
+ text-overflow: ellipsis;
119
129
  // Follow the tab's own colour (muted when inactive, accent when active).
120
130
  // Without this the theme's global `a span` link tint paints every label
121
131
  // violet, so the active/inactive distinction collapses to just the icon.
@@ -28,7 +28,7 @@ const ensureDecimals = (n: string, precision: number): string => {
28
28
  </script>
29
29
  <script setup lang="ts">
30
30
  import { ref, watch, onMounted } from 'vue'
31
- import { hasFinePointer } from '@greendrake/util'
31
+ import { hasFinePointer } from '@greendrake/util/browser'
32
32
 
33
33
  const props = withDefaults(
34
34
  defineProps<{
package/src/Password.vue CHANGED
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, ref, onMounted, nextTick } from 'vue'
3
- import { hasFinePointer } from '@greendrake/util'
3
+ import { hasFinePointer } from '@greendrake/util/browser'
4
4
  import FixAndroidTyping from './FixAndroidTyping'
5
5
 
6
6
  const showPassword = ref(false)
package/src/SelectBox.vue CHANGED
@@ -10,7 +10,7 @@ export interface SelectBoxOption<T extends string | number = string | number> {
10
10
  </script>
11
11
  <script setup lang="ts" generic="T extends string | number">
12
12
  import { computed, ref, watch, nextTick, onUnmounted } from 'vue'
13
- import { hasFinePointer } from '@greendrake/util'
13
+ import { hasFinePointer } from '@greendrake/util/browser'
14
14
  import { messages } from './messages'
15
15
 
16
16
  // Single-select dropdown: string|number values, optional clear button,
package/src/TextField.vue CHANGED
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, ref, watch, onMounted, inject, type Component } from 'vue'
3
- import { hasFinePointer } from '@greendrake/util'
3
+ import { hasFinePointer } from '@greendrake/util/browser'
4
4
  import FieldTip from './FieldTip'
5
5
  import FixAndroidTyping from './FixAndroidTyping'
6
6
  import { validationScopeKey } from './validationScope'
package/src/modalStack.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  // engines with partial inert support, with first/last Tab wrapping), initial
11
11
  // focus moves into the modal, and closing restores focus to the invoker.
12
12
  // Centralised here — not per-modal — so only the top-most modal ever traps.
13
- import { hasFinePointer } from '@greendrake/util'
13
+ import { hasFinePointer } from '@greendrake/util/browser'
14
14
 
15
15
  type CloseHandler = () => void
16
16