@moubing/bing-ui 0.3.1 → 0.5.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 (36) hide show
  1. package/README.md +51 -10
  2. package/dist/bing-ui.css +1 -1
  3. package/dist/bing-ui.es.js +7741 -6898
  4. package/dist/bing-ui.umd.js +42 -42
  5. package/dist/components/BingAppSwitcherTransition/BingAppSwitcherTransition.vue.d.ts +1 -1
  6. package/dist/components/BingCarouselTransition/BingCarouselTransition.vue.d.ts +1 -1
  7. package/dist/components/BingCodeBlock/BingCodeBlock.types.d.ts +5 -1
  8. package/dist/components/BingCodeBlock/BingCodeBlock.vue.d.ts +2 -1
  9. package/dist/components/BingCodeBlock/index.d.ts +1 -1
  10. package/dist/components/BingDatePicker/BingDatePicker.types.d.ts +2 -0
  11. package/dist/components/BingDatePicker/BingDatePicker.vue.d.ts +1 -0
  12. package/dist/components/BingDeckTransition/BingDeckTransition.vue.d.ts +1 -1
  13. package/dist/components/BingDialog/BingDialog.types.d.ts +2 -0
  14. package/dist/components/BingDialog/BingDialog.vue.d.ts +4 -3
  15. package/dist/components/BingFilePreview/BingFilePreview.types.d.ts +2 -0
  16. package/dist/components/BingFilePreview/BingFilePreview.vue.d.ts +1 -0
  17. package/dist/components/BingScrollbar/BingScrollbar.types.d.ts +6 -0
  18. package/dist/components/BingScrollbar/BingScrollbar.vue.d.ts +2 -0
  19. package/dist/components/BingScrollbar/index.d.ts +1 -1
  20. package/dist/components/BingSelect/BingSelect.types.d.ts +3 -0
  21. package/dist/components/BingSelect/BingSelect.vue.d.ts +1 -0
  22. package/dist/components/BingSelect/index.d.ts +1 -1
  23. package/dist/components/BingSortableList/BingSortableList.vue.d.ts +2 -2
  24. package/dist/components/BingTable/BingTable.types.d.ts +2 -0
  25. package/dist/components/BingTable/BingTable.vue.d.ts +9 -8
  26. package/dist/components/BingTable/BingTableHeaderCell.vue.d.ts +20 -0
  27. package/dist/components/BingTabs/BingTabs.types.d.ts +2 -0
  28. package/dist/components/BingTabs/BingTabs.vue.d.ts +2 -1
  29. package/dist/components/BingToast/BingToast.types.d.ts +2 -0
  30. package/dist/components/BingToast/BingToast.vue.d.ts +1 -0
  31. package/dist/components/BingTreeSelect/BingTreeSelect.types.d.ts +3 -0
  32. package/dist/components/BingTreeSelect/BingTreeSelect.vue.d.ts +1 -0
  33. package/dist/components/BingTreeSelect/index.d.ts +1 -1
  34. package/dist/motion/index.d.ts +1 -0
  35. package/dist/motion/smoothScroll.d.ts +45 -0
  36. package/package.json +2 -2
package/README.md CHANGED
@@ -23,22 +23,63 @@ pnpm dev
23
23
  ## Scripts
24
24
 
25
25
  ```powershell
26
- pnpm test:run
27
- pnpm test:browser -- --run
26
+ pnpm test:run
27
+ pnpm test:browser
28
28
  pnpm test:visual
29
29
  pnpm build
30
30
  pnpm storybook
31
- pnpm build-storybook
32
- ```
33
-
34
- ## Package Entry
31
+ pnpm build-storybook
32
+ ```
33
+
34
+ Browser-mode tests always run headlessly. To reuse an installed Chrome when Playwright's bundled Chromium is unavailable, set `BING_UI_BROWSER_CHANNEL=chrome` for the test command.
35
+
36
+ ## Package Entry
35
37
 
36
38
  ```ts
37
- import { BingButton } from '@moubing/bing-ui'
39
+ import { BingButton } from '@moubing/bing-ui'
38
40
  import '@moubing/bing-ui/style.css'
39
- ```
40
-
41
- ## Project Layout
41
+ ```
42
+
43
+ ## Themes
44
+
45
+ The bundled stylesheet includes `light`, `dark`, and `system` themes. Light remains the
46
+ default when no theme attribute is present. The light theme uses the library's signature
47
+ pink interaction accent, while dark mode shifts the semantic accent toward night purple;
48
+ the original pink palette remains available for brand and decorative details.
49
+
50
+ Set the theme on the document element so components teleported to `body` inherit the
51
+ same tokens as their triggers:
52
+
53
+ ```ts
54
+ document.documentElement.dataset.bingTheme = 'dark'
55
+
56
+ // Follow the operating-system preference.
57
+ document.documentElement.dataset.bingTheme = 'system'
58
+ ```
59
+
60
+ Apply a persisted theme before mounting Vue to avoid a light-to-dark flash during startup.
61
+ Applications can override any semantic token after importing the library stylesheet:
62
+
63
+ ```css
64
+ html[data-bing-theme='dark'] {
65
+ --bing-accent-rgb: 251 113 133;
66
+ --bing-accent-strong-rgb: 254 205 211;
67
+ --bing-accent-solid-rgb: 253 164 175;
68
+ --bing-accent: #fb7185;
69
+ --bing-accent-strong: #fecdd3;
70
+ --bing-accent-solid: #fda4af;
71
+ --bing-focus: rgb(var(--bing-accent-rgb) / 0.62);
72
+ }
73
+ ```
74
+
75
+ The first theme release intentionally uses the document element as its scope. This keeps
76
+ regular components and overlays teleported to `body` on the same theme.
77
+
78
+ `BingCodeBlock` uses `theme="auto"` by default, mapping light mode to `vitesse-light`
79
+ and dark mode to the higher-contrast `github-dark` palette. Pass an explicit Shiki theme
80
+ name when a code sample must remain fixed independently of the application theme.
81
+
82
+ ## Project Layout
42
83
 
43
84
  ```txt
44
85
  src/