@ditojs/ui 3.0.0 → 3.1.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@ditojs/ui",
3
- "version": "3.0.0",
3
+ "version": "3.1.1",
4
4
  "type": "module",
5
5
  "description": "Dito.js UI is a simple UI library, built with Vue.js for use in Dito.js Admin and elsewhere",
6
6
  "repository": "https://github.com/ditojs/dito/tree/main/packages/ui",
@@ -19,7 +19,9 @@
19
19
  },
20
20
  "files": [
21
21
  "src/",
22
- "dist/"
22
+ "dist/",
23
+ "!src/**/*.test.js",
24
+ "!src/**/__snapshots__/"
23
25
  ],
24
26
  "scripts": {
25
27
  "build:icons": "inline-assets src/icons/*.svg --template src/icons/template.js > src/styles/mixins/_icons.scss",
@@ -38,11 +40,11 @@
38
40
  "ie_mob >= 11"
39
41
  ],
40
42
  "dependencies": {
41
- "@ditojs/utils": "^3.0.0"
43
+ "@ditojs/utils": "^3.1.1"
42
44
  },
43
45
  "devDependencies": {
44
- "@ditojs/build": "^3.0.0",
46
+ "@ditojs/build": "^3.1.1",
45
47
  "vite": "^8.3.2"
46
48
  },
47
- "gitHead": "399f683a6ca227a03cfc0978fee9055383e6b3d8"
49
+ "gitHead": "acce85bb38d817aab18f9d5d03b3aa9dff00c3f9"
48
50
  }
@@ -1,38 +0,0 @@
1
- import { parseDate } from './date.js'
2
-
3
- describe('parseDate()', () => {
4
- const date = { day: 'numeric', month: 'long', year: 'numeric' }
5
- const time = { hour: '2-digit', minute: '2-digit', second: '2-digit' }
6
-
7
- it.each([
8
- ['May 14, 2026', new Date(2026, 4, 14)],
9
- ['14 May 2026', new Date(2026, 4, 14)],
10
- ['05/14/2026', new Date(2026, 4, 14)],
11
- ['14.05.2026', new Date(2026, 4, 14)]
12
- ])('parses date %o', (string, expected) => {
13
- expect(parseDate(string, { date, time: null })).toEqual(expected)
14
- })
15
-
16
- it.each([
17
- ['May 14, 2026, 11:30:00 AM', new Date(2026, 4, 14, 11, 30, 0)],
18
- ['May 14, 2026, 11:30:00 PM', new Date(2026, 4, 14, 23, 30, 0)],
19
- ['May 14, 2026, 12:05:00 AM', new Date(2026, 4, 14, 0, 5, 0)],
20
- ['May 14, 2026, 12:05:00 PM', new Date(2026, 4, 14, 12, 5, 0)],
21
- ['14.05.2026, 23:30:00', new Date(2026, 4, 14, 23, 30, 0)]
22
- ])('parses datetime %o', (string, expected) => {
23
- expect(parseDate(string, { date, time })).toEqual(expected)
24
- })
25
-
26
- it('parses time %o', () => {
27
- expect(parseDate('11:30:00 PM', { date: null, time })).toEqual(
28
- new Date(2000, 0, 1, 23, 30, 0)
29
- )
30
- })
31
-
32
- it.each(['', 'May', 'Foo 14, 2026', '2026-05-14', '13/45/2026'])(
33
- 'returns null for %o',
34
- string => {
35
- expect(parseDate(string, { date, time: null })).toBe(null)
36
- }
37
- )
38
- })