gooee 0.52.0 → 1.0.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.
Files changed (269) hide show
  1. package/README.md +10 -3
  2. package/package.json +6 -2
  3. package/scripts/add.js +181 -42
  4. package/src/base.css +3 -1
  5. package/src/components/Accordion/Accordion.module.css +7 -5
  6. package/src/components/Accordion/Accordion.tsx +13 -11
  7. package/src/components/Accordion/Accordion.vue +16 -15
  8. package/src/components/Accordion/AccordionItem.vue +8 -7
  9. package/src/components/Alert/Alert.module.css +9 -7
  10. package/src/components/Alert/Alert.tsx +25 -16
  11. package/src/components/Alert/Alert.vue +31 -27
  12. package/src/components/AlertDialog/AlertDialog.module.css +2 -0
  13. package/src/components/AlertDialog/AlertDialog.tsx +8 -7
  14. package/src/components/AlertDialog/AlertDialog.vue +25 -23
  15. package/src/components/AnimatedNumber/AnimatedNumber.module.css +5 -3
  16. package/src/components/AnimatedNumber/AnimatedNumber.tsx +6 -6
  17. package/src/components/AnimatedNumber/AnimatedNumber.vue +5 -5
  18. package/src/components/AspectRatio/AspectRatio.module.css +2 -0
  19. package/src/components/AspectRatio/AspectRatio.tsx +3 -3
  20. package/src/components/AspectRatio/AspectRatio.vue +5 -8
  21. package/src/components/Avatar/Avatar.module.css +10 -8
  22. package/src/components/Avatar/Avatar.tsx +4 -3
  23. package/src/components/Avatar/Avatar.vue +17 -19
  24. package/src/components/Avatar/index.ts +0 -2
  25. package/src/components/AvatarGroup/AvatarGroup.module.css +11 -9
  26. package/src/components/AvatarGroup/AvatarGroup.tsx +4 -4
  27. package/src/components/AvatarGroup/AvatarGroup.vue +13 -16
  28. package/src/components/Badge/Badge.module.css +6 -4
  29. package/src/components/Badge/Badge.tsx +3 -3
  30. package/src/components/Badge/Badge.vue +15 -14
  31. package/src/components/Breadcrumb/Breadcrumb.module.css +5 -3
  32. package/src/components/Breadcrumb/Breadcrumb.tsx +20 -12
  33. package/src/components/Breadcrumb/Breadcrumb.vue +33 -25
  34. package/src/components/Button/Button.module.css +16 -14
  35. package/src/components/Button/Button.tsx +6 -4
  36. package/src/components/Button/Button.vue +42 -33
  37. package/src/components/ButtonGroup/ButtonGroup.module.css +2 -0
  38. package/src/components/ButtonGroup/ButtonGroup.tsx +1 -1
  39. package/src/components/ButtonGroup/ButtonGroup.vue +9 -12
  40. package/src/components/Card/Card.module.css +6 -4
  41. package/src/components/Card/Card.tsx +6 -6
  42. package/src/components/Card/Card.vue +18 -21
  43. package/src/components/Center/Center.module.css +2 -0
  44. package/src/components/Center/Center.tsx +1 -1
  45. package/src/components/Center/Center.vue +18 -15
  46. package/src/components/Checkbox/Checkbox.module.css +10 -8
  47. package/src/components/Checkbox/Checkbox.tsx +15 -9
  48. package/src/components/Checkbox/Checkbox.vue +29 -31
  49. package/src/components/CheckboxGroup/CheckboxGroup.module.css +3 -1
  50. package/src/components/CheckboxGroup/CheckboxGroup.tsx +4 -4
  51. package/src/components/CheckboxGroup/CheckboxGroup.vue +33 -30
  52. package/src/components/Cluster/Cluster.module.css +2 -0
  53. package/src/components/Cluster/Cluster.tsx +1 -1
  54. package/src/components/Cluster/Cluster.vue +21 -17
  55. package/src/components/CodeBlock/CodeBlock.module.css +12 -10
  56. package/src/components/CodeBlock/CodeBlock.tsx +18 -10
  57. package/src/components/CodeBlock/CodeBlock.vue +30 -27
  58. package/src/components/CodeBlock/highlight.ts +1 -1
  59. package/src/components/Collapsible/Collapsible.module.css +7 -5
  60. package/src/components/Collapsible/Collapsible.tsx +7 -6
  61. package/src/components/Collapsible/Collapsible.vue +30 -26
  62. package/src/components/Container/Container.module.css +2 -0
  63. package/src/components/Container/Container.tsx +1 -1
  64. package/src/components/Container/Container.vue +13 -12
  65. package/src/components/CopyButton/CopyButton.module.css +20 -18
  66. package/src/components/CopyButton/CopyButton.tsx +21 -14
  67. package/src/components/CopyButton/CopyButton.vue +41 -31
  68. package/src/components/Dial/Dial.module.css +26 -11
  69. package/src/components/Dial/Dial.tsx +18 -18
  70. package/src/components/Dial/Dial.vue +57 -60
  71. package/src/components/Dialog/Dialog.module.css +4 -2
  72. package/src/components/Dialog/Dialog.tsx +22 -13
  73. package/src/components/Dialog/Dialog.vue +34 -30
  74. package/src/components/Divider/Divider.module.css +5 -3
  75. package/src/components/Divider/Divider.tsx +6 -4
  76. package/src/components/Divider/Divider.vue +13 -16
  77. package/src/components/DropdownMenu/DropdownMenu.module.css +8 -6
  78. package/src/components/DropdownMenu/DropdownMenu.tsx +12 -9
  79. package/src/components/DropdownMenu/DropdownMenu.vue +25 -28
  80. package/src/components/EmptyState/EmptyState.module.css +6 -4
  81. package/src/components/EmptyState/EmptyState.tsx +6 -6
  82. package/src/components/EmptyState/EmptyState.vue +14 -17
  83. package/src/components/Fab/Fab.module.css +19 -17
  84. package/src/components/Fab/Fab.tsx +11 -9
  85. package/src/components/Fab/Fab.vue +29 -26
  86. package/src/components/Fieldset/Fieldset.module.css +2 -0
  87. package/src/components/Fieldset/Fieldset.tsx +4 -3
  88. package/src/components/Fieldset/Fieldset.vue +4 -4
  89. package/src/components/FormField/FormField.module.css +5 -3
  90. package/src/components/FormField/FormField.tsx +7 -7
  91. package/src/components/FormField/FormField.vue +4 -4
  92. package/src/components/Grid/Grid.module.css +2 -0
  93. package/src/components/Grid/Grid.tsx +1 -1
  94. package/src/components/Grid/Grid.vue +25 -22
  95. package/src/components/HoldToConfirm/HoldToConfirm.module.css +13 -11
  96. package/src/components/HoldToConfirm/HoldToConfirm.tsx +11 -9
  97. package/src/components/HoldToConfirm/HoldToConfirm.vue +37 -32
  98. package/src/components/IconButton/IconButton.module.css +7 -5
  99. package/src/components/IconButton/IconButton.tsx +2 -1
  100. package/src/components/IconButton/IconButton.vue +15 -14
  101. package/src/components/Input/Input.module.css +12 -10
  102. package/src/components/Input/Input.tsx +9 -7
  103. package/src/components/Input/Input.vue +45 -35
  104. package/src/components/InputGroup/InputGroup.module.css +8 -6
  105. package/src/components/InputGroup/InputGroup.tsx +5 -4
  106. package/src/components/InputGroup/InputGroup.vue +41 -36
  107. package/src/components/Kbd/Kbd.module.css +9 -7
  108. package/src/components/Kbd/Kbd.tsx +1 -1
  109. package/src/components/Kbd/Kbd.vue +1 -1
  110. package/src/components/Link/Link.module.css +4 -2
  111. package/src/components/Link/Link.tsx +4 -3
  112. package/src/components/Link/Link.vue +13 -16
  113. package/src/components/LivePill/LivePill.module.css +39 -37
  114. package/src/components/LivePill/LivePill.tsx +11 -10
  115. package/src/components/LivePill/LivePill.vue +38 -40
  116. package/src/components/Meter/Meter.module.css +5 -3
  117. package/src/components/Meter/Meter.tsx +9 -8
  118. package/src/components/Meter/Meter.vue +52 -43
  119. package/src/components/MorphButton/MorphButton.module.css +11 -9
  120. package/src/components/MorphButton/MorphButton.tsx +20 -10
  121. package/src/components/MorphButton/MorphButton.vue +29 -25
  122. package/src/components/NumberInput/NumberInput.module.css +7 -5
  123. package/src/components/NumberInput/NumberInput.tsx +11 -8
  124. package/src/components/NumberInput/NumberInput.vue +69 -57
  125. package/src/components/Pagination/Pagination.module.css +147 -5
  126. package/src/components/Pagination/Pagination.tsx +216 -41
  127. package/src/components/Pagination/Pagination.vue +201 -36
  128. package/src/components/Pagination/labels.ts +38 -0
  129. package/src/components/PasswordInput/PasswordInput.module.css +10 -8
  130. package/src/components/PasswordInput/PasswordInput.tsx +15 -7
  131. package/src/components/PasswordInput/PasswordInput.vue +20 -16
  132. package/src/components/PasswordInput/index.ts +1 -1
  133. package/src/components/PickerWheel/DateWheel.vue +20 -12
  134. package/src/components/PickerWheel/PickerWheel.module.css +15 -6
  135. package/src/components/PickerWheel/PickerWheel.tsx +70 -44
  136. package/src/components/PickerWheel/PickerWheel.vue +39 -38
  137. package/src/components/PickerWheel/TimeWheel.vue +23 -21
  138. package/src/components/PickerWheel/WheelColumn.vue +7 -5
  139. package/src/components/Popover/Popover.module.css +5 -3
  140. package/src/components/Popover/Popover.tsx +17 -8
  141. package/src/components/Popover/Popover.vue +26 -25
  142. package/src/components/ProgressBar/ProgressBar.module.css +4 -2
  143. package/src/components/ProgressBar/ProgressBar.tsx +6 -5
  144. package/src/components/ProgressBar/ProgressBar.vue +28 -25
  145. package/src/components/Prose/Prose.module.css +5 -3
  146. package/src/components/Prose/Prose.tsx +1 -1
  147. package/src/components/Prose/Prose.vue +5 -8
  148. package/src/components/Radio/Radio.module.css +10 -8
  149. package/src/components/Radio/Radio.tsx +10 -8
  150. package/src/components/Radio/Radio.vue +8 -8
  151. package/src/components/Radio/RadioGroup.vue +33 -35
  152. package/src/components/Radio/radioContext.ts +12 -0
  153. package/src/components/Retime/Retime.vue +25 -22
  154. package/src/components/RulerScrubber/RulerScrubber.module.css +11 -2
  155. package/src/components/RulerScrubber/RulerScrubber.tsx +19 -18
  156. package/src/components/RulerScrubber/RulerScrubber.vue +50 -54
  157. package/src/components/ScrollArea/ScrollArea.module.css +17 -15
  158. package/src/components/ScrollArea/ScrollArea.tsx +5 -4
  159. package/src/components/ScrollArea/ScrollArea.vue +15 -17
  160. package/src/components/SearchInput/SearchInput.module.css +6 -4
  161. package/src/components/SearchInput/SearchInput.tsx +22 -10
  162. package/src/components/SearchInput/SearchInput.vue +20 -17
  163. package/src/components/SearchInput/index.ts +1 -1
  164. package/src/components/SegmentedControl/SegmentedControl.module.css +7 -5
  165. package/src/components/SegmentedControl/SegmentedControl.tsx +9 -5
  166. package/src/components/SegmentedControl/SegmentedControl.vue +25 -29
  167. package/src/components/Select/Select.module.css +19 -17
  168. package/src/components/Select/Select.tsx +31 -18
  169. package/src/components/Select/Select.vue +63 -58
  170. package/src/components/Sheet/Sheet.module.css +6 -4
  171. package/src/components/Sheet/Sheet.tsx +39 -29
  172. package/src/components/Sheet/Sheet.vue +46 -40
  173. package/src/components/Skeleton/Skeleton.module.css +4 -2
  174. package/src/components/Skeleton/Skeleton.tsx +3 -2
  175. package/src/components/Skeleton/Skeleton.vue +16 -18
  176. package/src/components/Slider/Slider.module.css +14 -12
  177. package/src/components/Slider/Slider.tsx +27 -11
  178. package/src/components/Slider/Slider.vue +47 -37
  179. package/src/components/Spinner/Spinner.module.css +2 -0
  180. package/src/components/Spinner/Spinner.tsx +3 -3
  181. package/src/components/Spinner/Spinner.vue +9 -12
  182. package/src/components/Split/Split.module.css +2 -0
  183. package/src/components/Split/Split.tsx +3 -3
  184. package/src/components/Split/Split.vue +19 -17
  185. package/src/components/SplitFlap/SplitFlap.module.css +9 -7
  186. package/src/components/SplitFlap/SplitFlap.tsx +2 -2
  187. package/src/components/SplitFlap/SplitFlap.vue +24 -21
  188. package/src/components/Stack/Stack.module.css +2 -0
  189. package/src/components/Stack/Stack.tsx +1 -1
  190. package/src/components/Stack/Stack.vue +13 -12
  191. package/src/components/SwipeDeck/SwipeDeck.module.css +13 -11
  192. package/src/components/SwipeDeck/SwipeDeck.tsx +23 -28
  193. package/src/components/SwipeDeck/SwipeDeck.vue +32 -38
  194. package/src/components/Switch/Switch.module.css +10 -8
  195. package/src/components/Switch/Switch.tsx +6 -5
  196. package/src/components/Switch/Switch.vue +22 -24
  197. package/src/components/Table/Table.module.css +24 -22
  198. package/src/components/Table/Table.tsx +27 -30
  199. package/src/components/Table/Table.vue +93 -79
  200. package/src/components/TableOfContents/TableOfContents.module.css +9 -7
  201. package/src/components/TableOfContents/TableOfContents.tsx +8 -8
  202. package/src/components/TableOfContents/TableOfContents.vue +20 -23
  203. package/src/components/Tabs/Tab.vue +3 -0
  204. package/src/components/Tabs/TabList.vue +2 -2
  205. package/src/components/Tabs/TabPanel.vue +2 -0
  206. package/src/components/Tabs/Tabs.module.css +4 -2
  207. package/src/components/Tabs/Tabs.tsx +10 -5
  208. package/src/components/Tabs/Tabs.vue +1 -1
  209. package/src/components/Tag/Tag.module.css +12 -10
  210. package/src/components/Tag/Tag.tsx +13 -15
  211. package/src/components/Tag/Tag.vue +12 -14
  212. package/src/components/Textarea/Textarea.module.css +8 -6
  213. package/src/components/Textarea/Textarea.tsx +4 -3
  214. package/src/components/Textarea/Textarea.vue +32 -34
  215. package/src/components/ThemeToggle/ThemeToggle.module.css +2 -0
  216. package/src/components/ThemeToggle/ThemeToggle.tsx +7 -7
  217. package/src/components/ThemeToggle/ThemeToggle.vue +24 -22
  218. package/src/components/Toast/Toast.module.css +17 -15
  219. package/src/components/Toast/Toast.tsx +51 -34
  220. package/src/components/Toast/Toast.vue +35 -24
  221. package/src/components/Toast/ToastItem.vue +17 -16
  222. package/src/components/Toggle/Toggle.module.css +11 -9
  223. package/src/components/Toggle/Toggle.tsx +3 -2
  224. package/src/components/Toggle/Toggle.vue +13 -15
  225. package/src/components/Tooltip/Tooltip.module.css +5 -3
  226. package/src/components/Tooltip/Tooltip.tsx +1 -0
  227. package/src/components/Tooltip/Tooltip.vue +13 -18
  228. package/src/components/VisuallyHidden/VisuallyHidden.module.css +2 -0
  229. package/src/components/VisuallyHidden/VisuallyHidden.tsx +1 -1
  230. package/src/components/VisuallyHidden/VisuallyHidden.vue +5 -8
  231. package/src/{internal → icons}/icons.module.css +4 -2
  232. package/src/{internal → icons}/icons.tsx +15 -16
  233. package/src/internal/FieldMessage.module.css +5 -3
  234. package/src/internal/FieldMessage.tsx +2 -2
  235. package/src/internal/FieldMessage.vue +2 -2
  236. package/src/internal/Roll.module.css +5 -3
  237. package/src/internal/feel.ts +12 -10
  238. package/src/internal/fling.ts +3 -3
  239. package/src/internal/liquid.ts +12 -10
  240. package/src/internal/liquidMatter.ts +1 -1
  241. package/src/internal/liquidMore.ts +7 -7
  242. package/src/internal/motion/checkbox.ts +4 -4
  243. package/src/internal/motion/fling.ts +19 -9
  244. package/src/internal/motion/holdToConfirm.ts +3 -3
  245. package/src/internal/motion/index.ts +8 -6
  246. package/src/internal/motion/liquid.ts +16 -4
  247. package/src/internal/motion/liquidMatter.ts +8 -6
  248. package/src/internal/motion/liquidMore.ts +44 -25
  249. package/src/internal/motion/livePill.ts +1 -1
  250. package/src/internal/motion/numberInput.ts +2 -2
  251. package/src/internal/motion/pickerWheel.ts +7 -4
  252. package/src/internal/motion/ruler.ts +1 -1
  253. package/src/internal/motion/scrollArea.ts +3 -3
  254. package/src/internal/motion/scrollFrame.ts +9 -7
  255. package/src/internal/motion/scrubber.ts +39 -20
  256. package/src/internal/motion/slider.ts +38 -4
  257. package/src/internal/motion/softPress.ts +10 -9
  258. package/src/internal/motion/splitFlap.ts +4 -4
  259. package/src/internal/motion/swipeDeck.ts +38 -7
  260. package/src/internal/motion/table.ts +3 -6
  261. package/src/internal/motion/themeIcon.ts +1 -1
  262. package/src/internal/motion/themeReveal.ts +1 -1
  263. package/src/internal/motion/toast.ts +3 -3
  264. package/src/internal/motion.ts +7 -8
  265. package/src/internal/scrollFrame.ts +3 -3
  266. package/src/internal/useScrub.ts +1 -15
  267. package/src/internal/vue/useScrub.ts +2 -6
  268. package/src/tokens.css +81 -421
  269. package/src/{internal/vueIcons.ts → icons/vue.ts} +5 -5
@@ -7,29 +7,26 @@ import styles from './Switch.module.css'
7
7
  // Other attributes, such as aria-label or a click listener, go to the switch button.
8
8
  defineOptions({ inheritAttrs: false })
9
9
 
10
- const props = withDefaults(
11
- defineProps<{
12
- /** Visible text next to the switch, also its accessible name. The label slot replaces it. */
13
- label?: string
14
- /** Extra text under the label, also read by screen readers. The description slot replaces it. */
15
- description?: string
16
- /** Puts the label before the switch, like a settings row. */
17
- labelPosition?: 'start' | 'end'
18
- /** Form field name. The form gets "on" while the switch is on, and nothing while it is off. */
19
- name?: string
20
- disabled?: boolean
21
- id?: string
22
- }>(),
23
- { labelPosition: 'end' },
24
- )
10
+ const { description, labelPosition = 'end', id } = defineProps<{
11
+ /** Visible text next to the switch, also its accessible name. The label slot replaces it. */
12
+ label?: string
13
+ /** Extra text under the label, also read by screen readers. The description slot replaces it. */
14
+ description?: string
15
+ /** Puts the label before the switch, like a settings row. */
16
+ labelPosition?: 'start' | 'end'
17
+ /** Form field name. The form gets "on" while the switch is on, and nothing while it is off. */
18
+ name?: string
19
+ disabled?: boolean
20
+ id?: string
21
+ }>()
25
22
 
26
- /** Whether the switch is on. Use v-model:checked, or leave it out and the switch keeps its own state. */
27
- const checked = defineModel<boolean>('checked', { default: false })
23
+ /** Whether the switch is on. Use v-model, or leave it out and the switch keeps its own state. */
24
+ const checked = defineModel<boolean>({ default: false })
28
25
  const slots = defineSlots<{ label?: () => unknown; description?: () => unknown }>()
29
26
 
30
27
  const auto = useId()
31
- const switchId = computed(() => props.id ?? auto)
32
- const hasDescription = computed(() => !!(props.description || slots.description))
28
+ const switchId = computed(() => id ?? auto)
29
+ const hasDescription = computed(() => !!(description || slots.description))
33
30
  const attrs = useAttrs()
34
31
  const describedBy = computed(() => [hasDescription.value && `${switchId.value}-desc`, attrs['aria-describedby']].filter(Boolean).join(' ') || undefined)
35
32
 
@@ -41,7 +38,7 @@ onBeforeUnmount(thumb.destroy)
41
38
  </script>
42
39
 
43
40
  <template>
44
- <div :class="[styles.root, labelPosition === 'start' && styles.start]" :data-disabled="disabled || undefined">
41
+ <div :class="[styles.root, labelPosition === 'start' && styles.start]" data-slot="switch" :data-state="checked ? 'checked' : 'unchecked'" :data-disabled="disabled || undefined">
45
42
  <button
46
43
  v-bind="$attrs"
47
44
  :id="switchId"
@@ -50,15 +47,16 @@ onBeforeUnmount(thumb.destroy)
50
47
  :aria-checked="checked"
51
48
  :aria-describedby="describedBy"
52
49
  :class="styles.track"
53
- :data-on="checked || undefined"
50
+ data-slot="switch-track"
51
+ :data-state="checked ? 'checked' : 'unchecked'"
54
52
  :disabled="disabled"
55
53
  @click="checked = !checked"
56
54
  >
57
- <span ref="thumbEl" :class="styles.thumb" aria-hidden="true" />
55
+ <span ref="thumbEl" :class="styles.thumb" data-slot="switch-thumb" aria-hidden="true" />
58
56
  </button>
59
57
  <span :class="styles.text">
60
- <label :for="switchId" :class="styles.label"><slot name="label">{{ label }}</slot></label>
61
- <span v-if="hasDescription" :id="`${switchId}-desc`" :class="styles.description"><slot name="description">{{ description }}</slot></span>
58
+ <label :for="switchId" :class="styles.label" data-slot="field-label"><slot name="label">{{ label }}</slot></label>
59
+ <span v-if="hasDescription" :id="`${switchId}-desc`" :class="styles.description" data-slot="switch-description"><slot name="description">{{ description }}</slot></span>
62
60
  </span>
63
61
  <!-- Submits like a checkbox: "on" when on, nothing when off -->
64
62
  <input v-if="name && checked" type="hidden" :name="name" value="on" />
@@ -1,3 +1,4 @@
1
+ @layer gooee.components {
1
2
  /* layout="scroll" (default): narrow screens scroll the table sideways. layout="stack": a
2
3
  container query turns rows into cards in narrow columns. */
3
4
  .root {
@@ -29,7 +30,7 @@
29
30
  overscroll-behavior-x: contain;
30
31
  }
31
32
 
32
- .scroll:focus-visible { outline: none; box-shadow: inset 0 0 0 var(--gooee-line-focus) var(--gooee-color-fg); }
33
+ .scroll:focus-visible { outline: none; box-shadow: inset 0 0 0 var(--gooee-focus-width) var(--gooee-color-fg); }
33
34
 
34
35
  .table {
35
36
  width: 100%;
@@ -82,17 +83,17 @@
82
83
  text-transform: inherit;
83
84
  cursor: pointer;
84
85
  transition:
85
- background-color var(--gooee-motion-fast) var(--gooee-ease-out),
86
- color var(--gooee-motion-fast) var(--gooee-ease-out);
86
+ background-color var(--gooee-motion-fast) var(--gooee-ease-morph),
87
+ color var(--gooee-motion-fast) var(--gooee-ease-morph);
87
88
  }
88
89
 
89
90
  .th[data-align="end"] .sortButton { flex-direction: row-reverse; }
90
91
  @media (hover: hover) {
91
92
  .sortButton:hover:not(:disabled) { background: var(--gooee-color-surface-hover); color: var(--gooee-color-fg); }
92
93
  }
93
- .sortButton[data-active] { color: var(--gooee-color-fg); }
94
+ .sortButton[data-state="active"] { color: var(--gooee-color-fg); }
94
95
  .sortButton:disabled { cursor: default; }
95
- .sortButton:focus-visible { outline: none; box-shadow: inset 0 0 0 var(--gooee-line-focus) var(--gooee-color-fg); }
96
+ .sortButton:focus-visible { outline: none; box-shadow: inset 0 0 0 var(--gooee-focus-width) var(--gooee-color-fg); }
96
97
 
97
98
  .sortIcon {
98
99
  width: var(--gooee-icon-sm);
@@ -105,8 +106,8 @@
105
106
  opacity: 0;
106
107
  transform: translateY(var(--gooee-space-1));
107
108
  transition:
108
- transform var(--gooee-motion-slow) var(--gooee-ease-spring),
109
- opacity var(--gooee-motion-base) var(--gooee-ease-out);
109
+ transform var(--gooee-motion-slow) var(--gooee-ease-morph),
110
+ opacity var(--gooee-motion-base) var(--gooee-ease-morph);
110
111
  }
111
112
 
112
113
  @media (hover: hover) {
@@ -117,7 +118,7 @@
117
118
  .sortIcon[data-dir="descending"] { transform: rotate(180deg); }
118
119
 
119
120
  .row {
120
- transition: background-color var(--gooee-motion-fast) var(--gooee-ease-out);
121
+ transition: background-color var(--gooee-motion-fast) var(--gooee-ease-morph);
121
122
  }
122
123
 
123
124
  @media (hover: hover) {
@@ -167,7 +168,7 @@
167
168
  }
168
169
 
169
170
  /* A new group's header settles in while its rows glide into place below it. */
170
- .groupRow { animation: groupIn var(--gooee-motion-slow) var(--gooee-ease-out) both; }
171
+ .groupRow { animation: groupIn var(--gooee-motion-slow) var(--gooee-ease-morph) both; }
171
172
 
172
173
  @keyframes groupIn {
173
174
  from { opacity: 0; transform: translateY(calc(var(--gooee-shift-sm) * -1)); }
@@ -189,7 +190,7 @@
189
190
  place-items: center;
190
191
  width: var(--gooee-hit-min);
191
192
  height: var(--gooee-hit-min);
192
- margin: calc((var(--gooee-hit-min) - var(--gooee-table-check)) / -2);
193
+ margin: calc((var(--gooee-hit-min) - var(--gooee-table-check, 18px)) / -2);
193
194
  }
194
195
 
195
196
  .checkInput {
@@ -203,17 +204,17 @@
203
204
  .checkBox {
204
205
  display: grid;
205
206
  place-items: center;
206
- width: var(--gooee-table-check);
207
- height: var(--gooee-table-check);
207
+ width: var(--gooee-table-check, 18px);
208
+ height: var(--gooee-table-check, 18px);
208
209
  border: var(--gooee-line-thick) solid var(--gooee-color-border-strong);
209
210
  border-radius: var(--gooee-radius-xs);
210
211
  background: var(--gooee-color-surface);
211
212
  color: var(--gooee-color-accent-fg);
212
213
  pointer-events: none;
213
214
  transition:
214
- background-color var(--gooee-motion-fast) var(--gooee-ease-out),
215
- border-color var(--gooee-motion-fast) var(--gooee-ease-out),
216
- transform var(--gooee-motion-slow) var(--gooee-ease-spring);
215
+ background-color var(--gooee-motion-fast) var(--gooee-ease-morph),
216
+ border-color var(--gooee-motion-fast) var(--gooee-ease-morph),
217
+ transform var(--gooee-motion-slow) var(--gooee-ease-morph);
217
218
  }
218
219
 
219
220
  .checkBox svg {
@@ -226,8 +227,8 @@
226
227
  stroke-linejoin: round;
227
228
  }
228
229
 
229
- .checkBox[data-state="on"],
230
- .checkBox[data-state="mixed"] {
230
+ .checkBox[data-state="checked"],
231
+ .checkBox[data-state="indeterminate"] {
231
232
  border-color: var(--gooee-color-accent);
232
233
  background: var(--gooee-color-accent);
233
234
  }
@@ -240,11 +241,11 @@
240
241
  /* Hidden just before the path starts. A zero-length dash would leave its round ends as a dot in Safari. */
241
242
  stroke-dasharray: 1 2;
242
243
  stroke-dashoffset: 1.01;
243
- transition: stroke-dashoffset var(--gooee-motion-base) var(--gooee-ease-out);
244
+ transition: stroke-dashoffset var(--gooee-motion-base) var(--gooee-ease-morph);
244
245
  }
245
246
 
246
- .checkBox[data-state="on"] .tick,
247
- .checkBox[data-state="mixed"] .dash { stroke-dashoffset: 0; }
247
+ .checkBox[data-state="checked"] .tick,
248
+ .checkBox[data-state="indeterminate"] .dash { stroke-dashoffset: 0; }
248
249
 
249
250
  .srOnly {
250
251
  position: absolute;
@@ -333,7 +334,7 @@
333
334
  }
334
335
 
335
336
  [data-layout="scroll"] .td {
336
- max-width: var(--gooee-table-cell-max);
337
+ max-width: var(--gooee-table-cell-max, 320px);
337
338
  }
338
339
 
339
340
  /* The first column stays in place while the rest scrolls, so each row keeps its name. */
@@ -374,7 +375,8 @@
374
375
  background: linear-gradient(to right, transparent, var(--gooee-color-surface));
375
376
  opacity: 0;
376
377
  pointer-events: none;
377
- transition: opacity var(--gooee-motion-fast) var(--gooee-ease-out);
378
+ transition: opacity var(--gooee-motion-fast) var(--gooee-ease-morph);
378
379
  }
379
380
 
380
381
  [data-layout="scroll"][data-more-end]::after { opacity: 1; }
382
+ }
@@ -100,9 +100,9 @@ function Check({ checked, mixed, label, disabled, onChange }: { checked: boolean
100
100
  if (ref.current) ref.current.indeterminate = Boolean(mixed)
101
101
  }, [mixed])
102
102
  return (
103
- <span className={styles.check}>
104
- <input ref={ref} type="checkbox" aria-label={label} checked={checked} disabled={disabled} onChange={(e) => onChange(e.target.checked)} className={styles.checkInput} />
105
- <span className={styles.checkBox} data-state={mixed ? 'mixed' : checked ? 'on' : 'off'} aria-hidden="true">
103
+ <span className={styles.check} data-slot="table-checkbox">
104
+ <input ref={ref} type="checkbox" data-slot="table-checkbox-input" aria-label={label} checked={checked} disabled={disabled} onChange={(e) => onChange(e.target.checked)} className={styles.checkInput} />
105
+ <span className={styles.checkBox} data-slot="table-checkbox-indicator" data-state={mixed ? 'indeterminate' : checked ? 'checked' : 'unchecked'} aria-hidden="true">
106
106
  <svg viewBox="0 0 16 16">
107
107
  <path className={styles.tick} d="M3.5 8.5l3 3 6-7" pathLength="1" />
108
108
  <path className={styles.dash} d="M4 8h8" pathLength="1" />
@@ -162,22 +162,18 @@ export function Table<T>({
162
162
  const [announce, setAnnounce] = useState('')
163
163
  const tableRef = useRef<HTMLTableElement>(null)
164
164
  const lastTops = useRef(new Map<string, number>())
165
- const lastShape = useRef('')
166
165
  const groupOrder = useRef<string[]>([])
167
166
 
168
167
  const sorted = useMemo(() => sortRows(rows, columns, sort), [rows, columns, sort])
169
168
 
170
169
  const groups = groupBy ? groupRows(rows, sorted, groupBy, groupOrder.current) : null
171
- const shape = groups ? groups.map((g) => g.key).join('|') : ''
172
170
  const order = groups ? groups.map((g) => `${g.key}:${g.rows.map(getRowId).join(',')}`).join('|') : sorted.map(getRowId).join('|')
173
171
 
174
- // FLIP: rows glide to their new place after a sort. When the groups themselves change, they snap
175
- // there with the spring, so the table visibly splits apart and closes up again.
172
+ // FLIP: rows glide to their new place after a sort or a regroup.
176
173
  useLayoutEffect(() => {
177
174
  const table = tableRef.current
178
175
  if (!table) return
179
- lastTops.current = flipRows(table, lastTops.current, shape !== lastShape.current)
180
- lastShape.current = shape
176
+ lastTops.current = flipRows(table, lastTops.current)
181
177
  }, [order])
182
178
 
183
179
  const labelOf = (c: TableColumn<T>) => c.label ?? (typeof c.header === 'string' ? c.header : c.key)
@@ -205,14 +201,14 @@ export function Table<T>({
205
201
  const rid = getRowId(row)
206
202
  const on = selectedSet.has(rid)
207
203
  return (
208
- <tr key={rid} role="row" data-row-id={rid} className={styles.row} data-selected={on || undefined} style={{ ['--i' as string]: Math.min(ri, 12) }}>
204
+ <tr key={rid} role="row" data-row-id={rid} className={styles.row} data-slot="table-row" data-selected={on || undefined} style={{ ['--i' as string]: Math.min(ri, 12) }}>
209
205
  {selectable && (
210
- <td role="cell" className={styles.checkCell}>
206
+ <td role="cell" className={styles.checkCell} data-slot="table-cell">
211
207
  <Check checked={on} label={labels.selectRow(nameOf(row))} onChange={(v) => setSelected(v ? [...selected, rid] : selected.filter((s) => s !== rid))} />
212
208
  </td>
213
209
  )}
214
210
  {columns.map((c) => (
215
- <td key={c.key} role="cell" className={styles.td} data-align={c.align ?? 'start'} data-label={labelOf(c)}>
211
+ <td key={c.key} role="cell" className={styles.td} data-slot="table-cell" data-align={c.align ?? 'start'} data-label={labelOf(c)}>
216
212
  {/* One wrapper, so the card layout always gets a label and a value */}
217
213
  <span>{c.cell ? c.cell(row) : String(read(row, c.key) ?? '')}</span>
218
214
  </td>
@@ -222,17 +218,17 @@ export function Table<T>({
222
218
  }
223
219
 
224
220
  return (
225
- <div className={cx(styles.root, className)} data-layout={layout} data-more-start={more.start || undefined} data-more-end={more.end || undefined}>
226
- <div ref={scrollRef} onScroll={measure} onFocus={reveal} className={styles.scroll} style={{ maxHeight }} tabIndex={scrollable ? 0 : undefined} role={scrollable ? 'region' : undefined} aria-labelledby={scrollable ? `${id}-cap` : undefined}>
221
+ <div className={cx(styles.root, className)} data-slot="table" data-layout={layout} data-more-start={more.start || undefined} data-more-end={more.end || undefined}>
222
+ <div ref={scrollRef} onScroll={measure} onFocus={reveal} className={styles.scroll} data-slot="table-container" style={{ maxHeight }} tabIndex={scrollable ? 0 : undefined} role={scrollable ? 'region' : undefined} aria-labelledby={scrollable ? `${id}-cap` : undefined}>
227
223
  {/* Explicit roles keep table semantics when rows restyle as cards (layout="stack") */}
228
- <table ref={tableRef} role="table" className={styles.table} aria-labelledby={`${id}-cap`} aria-busy={loading || undefined}>
229
- <caption id={`${id}-cap`} className={cx(styles.caption, hideCaption && styles.srOnly)}>
224
+ <table ref={tableRef} role="table" className={styles.table} data-slot="table-element" aria-labelledby={`${id}-cap`} aria-busy={loading || undefined}>
225
+ <caption id={`${id}-cap`} className={cx(styles.caption, hideCaption && styles.srOnly)} data-slot="table-caption">
230
226
  {caption}
231
227
  </caption>
232
- <thead role="rowgroup" className={styles.head}>
228
+ <thead role="rowgroup" className={styles.head} data-slot="table-header">
233
229
  <tr role="row">
234
230
  {selectable && (
235
- <th role="columnheader" scope="col" className={styles.checkCell}>
231
+ <th role="columnheader" scope="col" className={styles.checkCell} data-slot="table-head">
236
232
  <Check
237
233
  checked={allOn}
238
234
  mixed={someOn}
@@ -252,14 +248,15 @@ export function Table<T>({
252
248
  scope="col"
253
249
  aria-sort={c.sortable ? (dir ?? 'none') : undefined}
254
250
  className={styles.th}
251
+ data-slot="table-head"
255
252
  data-align={c.align ?? 'start'}
256
253
  data-sortable={c.sortable || undefined}
257
254
  style={{ width: c.width }}
258
255
  >
259
256
  {c.sortable ? (
260
- <button type="button" className={styles.sortButton} disabled={loading} data-active={active || undefined} onClick={() => toggleSort(c.key)}>
257
+ <button type="button" className={styles.sortButton} data-slot="table-sort" disabled={loading} data-state={active ? 'active' : 'inactive'} onClick={() => toggleSort(c.key)}>
261
258
  <span>{c.header}</span>
262
- <svg viewBox="0 0 16 16" className={styles.sortIcon} data-dir={dir} aria-hidden="true">
259
+ <svg viewBox="0 0 16 16" className={styles.sortIcon} data-slot="table-sort-icon" data-dir={dir} aria-hidden="true">
263
260
  <path d="M8 12.5v-9M4.5 7L8 3.5 11.5 7" />
264
261
  </svg>
265
262
  </button>
@@ -272,12 +269,12 @@ export function Table<T>({
272
269
  </tr>
273
270
  </thead>
274
271
  {loading ? (
275
- <tbody role="rowgroup">
272
+ <tbody role="rowgroup" data-slot="table-body">
276
273
  {Array.from({ length: loadingRows }, (_, r) => (
277
- <tr key={r} aria-hidden="true" className={cx(styles.row, styles.loadingRow)}>
278
- {selectable && <td className={styles.checkCell} />}
274
+ <tr key={r} aria-hidden="true" className={cx(styles.row, styles.loadingRow)} data-slot="table-row">
275
+ {selectable && <td className={styles.checkCell} data-slot="table-cell" />}
279
276
  {columns.map((c, i) => (
280
- <td key={c.key} className={styles.td} data-align={c.align ?? 'start'} data-label={labelOf(c)}>
277
+ <td key={c.key} className={styles.td} data-slot="table-cell" data-align={c.align ?? 'start'} data-label={labelOf(c)}>
281
278
  <Skeleton shape="text" width={`${[72, 56, 84][(r + i) % 3]}%`} />
282
279
  </td>
283
280
  ))}
@@ -286,22 +283,22 @@ export function Table<T>({
286
283
  </tbody>
287
284
  ) : groups && groups.length > 0 ? (
288
285
  groups.map((g) => (
289
- <tbody key={g.key} role="rowgroup" className={styles.group}>
290
- <tr role="row" data-row-id={`group:${g.key}`} className={styles.groupRow}>
291
- <th role="rowheader" scope="rowgroup" colSpan={colCount} className={styles.groupHead}>
286
+ <tbody key={g.key} role="rowgroup" className={styles.group} data-slot="table-body">
287
+ <tr role="row" data-row-id={`group:${g.key}`} className={styles.groupRow} data-slot="table-group-row">
288
+ <th role="rowheader" scope="rowgroup" colSpan={colCount} className={styles.groupHead} data-slot="table-group-head">
292
289
  <span>{g.key}</span>{' '}
293
- <span className={styles.groupCount}>{labels.groupCount(g.rows.length)}</span>
290
+ <span className={styles.groupCount} data-slot="table-group-count">{labels.groupCount(g.rows.length)}</span>
294
291
  </th>
295
292
  </tr>
296
293
  {g.rows.map(renderRow)}
297
294
  </tbody>
298
295
  ))
299
296
  ) : (
300
- <tbody role="rowgroup">
297
+ <tbody role="rowgroup" data-slot="table-body">
301
298
  {sorted.map(renderRow)}
302
299
  {sorted.length === 0 && (
303
300
  <tr role="row">
304
- <td role="cell" colSpan={colCount} className={styles.empty}>
301
+ <td role="cell" colSpan={colCount} className={styles.empty} data-slot="table-empty">
305
302
  {emptyText}
306
303
  </td>
307
304
  </tr>