period-ui 0.6.3 → 0.7.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 (27) hide show
  1. package/README.md +30 -0
  2. package/dist/components/atoms/date-picker/components/calendar-input.d.ts.map +1 -1
  3. package/dist/components/atoms/date-picker/components/calendar-input.js +2 -2
  4. package/dist/components/atoms/date-picker/components/calendar-input.js.map +1 -1
  5. package/dist/components/atoms/date-picker/components/calendar.d.ts +4 -2
  6. package/dist/components/atoms/date-picker/components/calendar.d.ts.map +1 -1
  7. package/dist/components/atoms/date-picker/components/calendar.js +4 -3
  8. package/dist/components/atoms/date-picker/components/calendar.js.map +1 -1
  9. package/dist/components/atoms/date-picker/date-picker-types.d.ts +4 -0
  10. package/dist/components/atoms/date-picker/date-picker-types.d.ts.map +1 -1
  11. package/dist/components/atoms/date-picker/date-picker-types.js +6 -1
  12. package/dist/components/atoms/date-picker/date-picker-types.js.map +1 -1
  13. package/dist/components/atoms/date-picker/date-picker.d.ts.map +1 -1
  14. package/dist/components/atoms/date-picker/date-picker.js +2 -2
  15. package/dist/components/atoms/date-picker/date-picker.js.map +1 -1
  16. package/dist/components/atoms/date-picker/use-date-picker.d.ts +3 -0
  17. package/dist/components/atoms/date-picker/use-date-picker.d.ts.map +1 -1
  18. package/dist/components/atoms/date-picker/use-date-picker.js +21 -2
  19. package/dist/components/atoms/date-picker/use-date-picker.js.map +1 -1
  20. package/dist/index.css +3 -7
  21. package/dist/index.css.map +1 -1
  22. package/dist/index.mjs +5620 -5574
  23. package/dist/utils/use-focus-on-open.js +1 -1
  24. package/dist/utils/use-focus-on-open.js.map +1 -1
  25. package/package.json +9 -3
  26. package/tailwind.preset.cjs +60 -0
  27. package/tailwind.preset.d.cts +5 -0
@@ -8,7 +8,7 @@ function useFocusOnOpen(ref, isOpen) {
8
8
  return;
9
9
  }
10
10
  if (isOpen) {
11
- ref.current.focus();
11
+ ref.current.focus({ preventScroll: true });
12
12
  const { selectionStart, selectionEnd, value } = ref.current;
13
13
  if (selectionStart === 0 && selectionEnd === 0) {
14
14
  const length = value.length;
@@ -1 +1 @@
1
- {"version":3,"file":"use-focus-on-open.js","sourceRoot":"","sources":["../../src/utils/use-focus-on-open.ts"],"names":[],"mappings":";;AAKA,wCAoBC;AAzBD,iCAA6C;AAK7C,SAAgB,cAAc,CAAC,GAAgC,EAAE,MAAe;IAC9E,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO;QACT,CAAC;QAED,IAAI,MAAM,EAAE,CAAC;YACX,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YAEpB,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC;YAC5D,IAAI,cAAc,KAAK,CAAC,IAAI,YAAY,KAAK,CAAC,EAAE,CAAC;gBAC/C,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;gBAC5B,GAAG,CAAC,OAAO,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAChD,CAAC;YAED,OAAO;QACT,CAAC;QAED,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;AACpB,CAAC"}
1
+ {"version":3,"file":"use-focus-on-open.js","sourceRoot":"","sources":["../../src/utils/use-focus-on-open.ts"],"names":[],"mappings":";;AAKA,wCAoBC;AAzBD,iCAA6C;AAK7C,SAAgB,cAAc,CAAC,GAAgC,EAAE,MAAe;IAC9E,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO;QACT,CAAC;QAED,IAAI,MAAM,EAAE,CAAC;YACX,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;YAE3C,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC;YAC5D,IAAI,cAAc,KAAK,CAAC,IAAI,YAAY,KAAK,CAAC,EAAE,CAAC;gBAC/C,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;gBAC5B,GAAG,CAAC,OAAO,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAChD,CAAC;YAED,OAAO;QACT,CAAC;QAED,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;AACpB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "period-ui",
3
- "version": "0.6.3",
3
+ "version": "0.7.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -9,9 +9,11 @@
9
9
  "sideEffects": false,
10
10
  "files": [
11
11
  "dist",
12
+ "dist/fonts",
13
+ "tailwind.preset.cjs",
14
+ "tailwind.preset.d.cts",
12
15
  "README.md",
13
- "LICENSE",
14
- "dist/fonts"
16
+ "LICENSE"
15
17
  ],
16
18
  "scripts": {
17
19
  "build": "vite build && tsc -p tsconfig.build.json && tsc-alias && yarn build:css",
@@ -103,6 +105,10 @@
103
105
  "style": "./dist/index.css",
104
106
  "import": "./dist/index.mjs",
105
107
  "require": "./dist/index.js"
108
+ },
109
+ "./tailwind-preset": {
110
+ "types": "./tailwind.preset.d.cts",
111
+ "default": "./tailwind.preset.cjs"
106
112
  }
107
113
  },
108
114
  "packageManager": "yarn@4.18.0+sha512.fcb8716fe7cd0eece141ffc18b92193a9df9204c1ba83189c288835223fc0bbe64af473bab0d5e9927a7daeb5caf2bb07eb2787cc9338ca040ea125f2a1f2f7e"
@@ -0,0 +1,60 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = {
3
+ theme: {
4
+ extend: {
5
+ fontFamily: {
6
+ sans: ['Geist', 'sans-serif'],
7
+ },
8
+ colors: {
9
+ white: '#FFFFFF',
10
+ gray: {
11
+ '01': '#292929',
12
+ '02': '#737373',
13
+ '03': '#B3B3B3',
14
+ '04': '#E3E3E3',
15
+ '05': '#F4F4F5',
16
+ '06': '#FAFBFC',
17
+ },
18
+ blue: {
19
+ '00': '#002CD3',
20
+ '01': '#0066FF',
21
+ '02': '#3385FF',
22
+ '03': '#B3D1FF',
23
+ '04': '#E6F0FF',
24
+ },
25
+ green: {
26
+ '00': '#1F4D00',
27
+ '01': '#338000',
28
+ '02': '#47B300',
29
+ '03': '#B5E198',
30
+ '04': '#F0FFE6',
31
+ },
32
+ yellow: {
33
+ '01': '#995C00',
34
+ '02': '#F5BC21',
35
+ '03': '#F7DD96',
36
+ '04': '#FFF9E5',
37
+ },
38
+ red: {
39
+ '00': '#800D00',
40
+ '01': '#CC1400',
41
+ '02': '#FF4733',
42
+ '03': '#FFD1CC',
43
+ '04': '#FFE8E6',
44
+ },
45
+ purple: {
46
+ '01': '#971CD3',
47
+ '02': '#AA34E5',
48
+ '04': '#F6E8FC',
49
+ },
50
+ },
51
+ boxShadow: {
52
+ 'white-two': '0px 1px 4px 0px rgba(0, 0, 0, 0.24)',
53
+ 'white-tree': '0px 2px 6px 0px rgba(0, 0, 0, 0.16)',
54
+ 'blue-two': '0px 1px 4px 0px rgba(0, 0, 0, 0.52)',
55
+ 'red-two': '0px 1px 4px 0px rgba(0, 0, 0, 0.44)',
56
+ 'black-tree': '0px 1px 4px 0px rgba(0, 0, 0, 0.4)',
57
+ },
58
+ },
59
+ },
60
+ };
@@ -0,0 +1,5 @@
1
+ import type { Config } from 'tailwindcss';
2
+
3
+ declare const preset: Pick<Config, 'theme'>;
4
+
5
+ export = preset;