@antscorp/antsomi-ui 1.2.1 → 1.2.2-beta.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 (25) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/types/components/atoms/Checkbox/Checkbox.d.ts +1 -0
  3. package/dist/types/components/atoms/Checkbox/Checkbox.stories.d.ts +15 -0
  4. package/dist/types/components/atoms/Checkbox/__tests__/Checkbox.test.d.ts +1 -0
  5. package/dist/types/components/atoms/Checkbox/index.d.ts +1 -0
  6. package/dist/types/components/atoms/Input/__tests__/Input.test.d.ts +1 -0
  7. package/dist/types/components/atoms/InputNumber/InputNumber.d.ts +1 -2
  8. package/dist/types/components/atoms/InputNumber/InputNumber.stories.d.ts +16 -0
  9. package/dist/types/components/atoms/InputNumber/__tests__/InputNumber.test.d.ts +1 -0
  10. package/dist/types/components/atoms/index.d.ts +1 -0
  11. package/dist/types/components/index.d.ts +1 -0
  12. package/dist/types/components/molecules/DatePicker/components/AdvancedPicker/AdvancedPicker.d.ts +5 -1
  13. package/dist/types/components/molecules/DatePicker/components/AdvancedPicker/styled.d.ts +1 -0
  14. package/dist/types/components/molecules/DatePicker/components/AdvancedPicker/types.d.ts +3 -0
  15. package/dist/types/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.d.ts +7 -1
  16. package/dist/types/components/molecules/DatePicker/components/AdvancedRangePicker/AdvancedRangePicker.stories.d.ts +2 -0
  17. package/dist/types/components/molecules/DatePicker/components/AdvancedRangePicker/types.d.ts +4 -1
  18. package/dist/types/components/organism/Table/Table.d.ts +1 -0
  19. package/dist/types/components/organism/Table/index.d.ts +1 -0
  20. package/dist/types/components/organism/index.d.ts +1 -0
  21. package/dist/types/constants/index.d.ts +1 -0
  22. package/dist/types/constants/theme.d.ts +12 -0
  23. package/package.json +2 -1
  24. package/CHANGELOG.md +0 -64
  25. package/dist/package.json +0 -110
@@ -0,0 +1 @@
1
+ export { Checkbox } from 'antd';
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
+ import { Checkbox } from './Checkbox';
4
+ declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("antd/es/checkbox").CheckboxProps & React.RefAttributes<HTMLInputElement>> & {
5
+ Group: React.MemoExoticComponent<React.ForwardRefExoticComponent<import("antd/es/checkbox").CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>>;
6
+ }>;
7
+ export default _default;
8
+ export declare const Default: ComponentStory<React.ForwardRefExoticComponent<import("antd/es/checkbox").CheckboxProps & React.RefAttributes<HTMLInputElement>> & {
9
+ Group: React.MemoExoticComponent<React.ForwardRefExoticComponent<import("antd/es/checkbox").CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>>;
10
+ }>;
11
+ export declare const Basic: ComponentStory<typeof Checkbox>;
12
+ export declare const ControlledCheckbox: ComponentStory<typeof Checkbox>;
13
+ export declare const CheckAll: ComponentStory<typeof Checkbox>;
14
+ export declare const Disabled: ComponentStory<typeof Checkbox>;
15
+ export declare const CheckboxGroup: ComponentStory<typeof Checkbox>;
@@ -0,0 +1 @@
1
+ export { Checkbox } from './Checkbox';
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { InputNumberProps as AntdInputNumberProps } from 'antd';
3
- interface InputNumberProps extends AntdInputNumberProps {
3
+ export interface InputNumberProps extends AntdInputNumberProps {
4
4
  showHandler?: boolean;
5
5
  }
6
6
  export declare const InputNumber: React.FC<InputNumberProps>;
7
- export {};
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
+ declare const _default: ComponentMeta<React.FC<import("./InputNumber").InputNumberProps>>;
4
+ export default _default;
5
+ export declare const Default: ComponentStory<React.FC<import("./InputNumber").InputNumberProps>>;
6
+ export declare const BasicUsage: ComponentStory<any>;
7
+ export declare const PrePostTab: ComponentStory<any>;
8
+ export declare const HighPrecisionDecimals: ComponentStory<any>;
9
+ export declare const KeyBoard: ComponentStory<any>;
10
+ export declare const OutOfRange: ComponentStory<any>;
11
+ export declare const Status: ComponentStory<any>;
12
+ export declare const Sizes: ComponentStory<any>;
13
+ export declare const Disabled: ComponentStory<any>;
14
+ export declare const Formatter: ComponentStory<any>;
15
+ export declare const Borderless: ComponentStory<any>;
16
+ export declare const Prefix: ComponentStory<any>;
@@ -7,3 +7,4 @@ export { Space } from './Space';
7
7
  export { Tag } from './Tag';
8
8
  export { Tooltip } from './Tooltip';
9
9
  export { Typography } from './Typography';
10
+ export { Checkbox } from './Checkbox';
@@ -1,3 +1,4 @@
1
1
  export * from './atoms';
2
2
  export * from './molecules';
3
3
  export * from './common';
4
+ export * from './organism';
@@ -1,8 +1,11 @@
1
1
  import React from 'react';
2
- import { TAdvancedType, TOperatorKey, TOption } from './types';
2
+ import { TAdvancedType, TCalculationType, TOperatorKey, TOption, TShowCalculationTypeCondition } from './types';
3
3
  export interface AdvancedPickerProps {
4
4
  label?: string;
5
+ disabled?: boolean;
5
6
  dateTypeKeysShow?: string[];
7
+ showCalculationTypeCondition?: TShowCalculationTypeCondition;
8
+ calculationTypeKeysShow?: TCalculationType[];
6
9
  defaultDateTypeKey?: string;
7
10
  valueType?: string;
8
11
  option?: TOption;
@@ -15,6 +18,7 @@ export interface AdvancedPickerProps {
15
18
  disableAfterDate?: string;
16
19
  disableBeforeDate?: string;
17
20
  errorMessage?: string;
21
+ showTime?: boolean;
18
22
  onUpdatedNewDate?: (newDate: any) => void;
19
23
  onApply?: ({ date, option }: {
20
24
  date: string;
@@ -4,3 +4,4 @@ export declare const DropdownFooter: import("styled-components").StyledComponent
4
4
  export declare const DatePickerHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
5
5
  export declare const DatePickerCustomInput: import("styled-components").StyledComponent<"input", any, {}, never>;
6
6
  export declare const DatePickerFooter: import("styled-components").StyledComponent<"div", any, {}, never>;
7
+ export declare const CalendarIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -4,6 +4,9 @@ export type TOption = {
4
4
  calculationDate: TCalculationDate;
5
5
  value: number;
6
6
  };
7
+ export type TShowCalculationTypeCondition = {
8
+ dateType: Partial<Record<TDateType, TCalculationType[]>>;
9
+ };
7
10
  export type TDateType = 'today' | 'first_day_of_week_mon_sun' | 'first_day_of_week_sun_sat' | 'first_day_of_month' | 'first_day_of_quarter' | 'first_day_of_year' | 'last_day_of_week_mon_sun' | 'last_day_of_week_sun_sat' | 'last_day_of_month' | 'last_day_of_quarter' | 'last_day_of_year' | 'fixed';
8
11
  export type TCalculationType = 'minus' | 'plus' | '';
9
12
  export type TCalculationDate = 'seconds' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'quarters' | 'years' | '';
@@ -1,9 +1,15 @@
1
1
  import React from 'react';
2
- import { TOnChangePayload, TTimeRange } from './types';
2
+ import { TShowCalculationTypeCondition } from '../AdvancedPicker/types';
3
+ import { TDateConfig, TOnChangePayload, TTimeRange } from './types';
3
4
  export interface AdvancedRangePickerProps {
5
+ disabled?: boolean;
6
+ showCalculationTypeCondition?: TShowCalculationTypeCondition;
7
+ startDateConfig?: TDateConfig;
8
+ endDateConfig?: TDateConfig;
4
9
  timeRange: TTimeRange;
5
10
  errorMessage?: string;
6
11
  showLabel?: boolean;
12
+ showTime?: boolean;
7
13
  onChange?: ({ timeRange, mode }: TOnChangePayload) => void;
8
14
  }
9
15
  export declare const AdvancedRangePicker: React.FC<AdvancedRangePickerProps>;
@@ -5,3 +5,5 @@ declare const _default: ComponentMeta<React.FC<import("./AdvancedRangePicker").A
5
5
  export default _default;
6
6
  export declare const Template: ComponentStory<typeof AdvancedRangePicker>;
7
7
  export declare const Basic: ComponentStory<typeof AdvancedRangePicker>;
8
+ export declare const HideTimeLabel: ComponentStory<typeof AdvancedRangePicker>;
9
+ export declare const ShowCalculationTypeCondition: ComponentStory<typeof AdvancedRangePicker>;
@@ -1,4 +1,4 @@
1
- import { TOption } from '../AdvancedPicker/types';
1
+ import { TCalculationType, TOption } from '../AdvancedPicker/types';
2
2
  export type TOnChangeMode = 'system' | 'user';
3
3
  export type TTimeRange = {
4
4
  startDate: TOption & {
@@ -12,3 +12,6 @@ export type TOnChangePayload = {
12
12
  timeRange: TTimeRange;
13
13
  mode: 'system' | 'user';
14
14
  };
15
+ export type TDateConfig = {
16
+ calculationTypeKeysShow?: TCalculationType[];
17
+ };
@@ -0,0 +1 @@
1
+ export { Table } from 'antd';
@@ -0,0 +1 @@
1
+ export { Table } from './Table';
@@ -0,0 +1 @@
1
+ export { Table } from './Table';
@@ -0,0 +1 @@
1
+ export { THEME } from './theme';
@@ -0,0 +1,12 @@
1
+ import { ThemeConfig } from 'antd';
2
+ type TTheme = {
3
+ token?: ThemeConfig['token'] & {
4
+ [key: string]: any;
5
+ };
6
+ components?: ThemeConfig['components'];
7
+ algorithm?: ThemeConfig['algorithm'];
8
+ hashed?: ThemeConfig['hashed'];
9
+ inherit?: ThemeConfig['inherit'];
10
+ };
11
+ export declare const THEME: TTheme;
12
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.2.1",
3
+ "version": "1.2.2-beta.0",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -19,6 +19,7 @@
19
19
  "serve-storybook": "serve storybook-static",
20
20
  "version": "auto-changelog -p && git add CHANGELOG.md",
21
21
  "test": "jest",
22
+ "test:changed": "jest --onlyChanged",
22
23
  "test:watch": "jest --watch",
23
24
  "test:coverage": "jest --coverage"
24
25
  },
package/CHANGELOG.md DELETED
@@ -1,64 +0,0 @@
1
- ### Changelog
2
-
3
- All notable changes to this project will be documented in this file. Dates are displayed in UTC.
4
-
5
- Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
-
7
- #### [v1.2.1](https://github.com/irisnikita/antsomi-ui/compare/v1.2.0...v1.2.1)
8
-
9
- - docs(InputNumber.stories.tsx): add storybook doc for InputNumber component [`c034a27`](https://github.com/irisnikita/antsomi-ui/commit/c034a2747b01fdef33f4e672716391ee1ae8ca3e)
10
-
11
- #### [v1.2.0](https://github.com/irisnikita/antsomi-ui/compare/v1.2.0-beta.0...v1.2.0)
12
-
13
- > 14 April 2023
14
-
15
- #### [v1.2.0-beta.0](https://github.com/irisnikita/antsomi-ui/compare/v1.1.11...v1.2.0-beta.0)
16
-
17
- > 14 April 2023
18
-
19
- - chore(jestTest): config jest test for react component [`f84b44d`](https://github.com/irisnikita/antsomi-ui/commit/f84b44d595c8b6d2b023fe473ec31cb71cfedc9d)
20
- - chore(locales): add translate config for project [`7332eba`](https://github.com/irisnikita/antsomi-ui/commit/7332eba57f8841b57bfdd1dc93653ff30e8a9fca)
21
-
22
- #### [v1.1.11](https://github.com/irisnikita/antsomi-ui/compare/v1.1.10...v1.1.11)
23
-
24
- > 9 April 2023
25
-
26
- - feat(DatePickerAdvanced): add new DatePickerAdvanced component [`2966953`](https://github.com/irisnikita/antsomi-ui/commit/2966953a8b37978784f00759ffc637b74bddd402)
27
- - style(GlobalStyle): change global style for date picker when hover [`4a31019`](https://github.com/irisnikita/antsomi-ui/commit/4a3101984c322d292824f71e8a85f2a6ec37eb00)
28
- - feat(DatePicker.tsx): create DatePicker, AdvancePicker, AdvancedRangePicker component [`e62c8fa`](https://github.com/irisnikita/antsomi-ui/commit/e62c8fa7c88a32949f40b988e263d9d76d0d5a93)
29
-
30
- #### [v1.1.10](https://github.com/irisnikita/antsomi-ui/compare/v1.1.9...v1.1.10)
31
-
32
- > 31 March 2023
33
-
34
- - chore: update package version to 1.1.10-beta.6 [`722e80c`](https://github.com/irisnikita/antsomi-ui/commit/722e80cf61fab78aba82c6252a8cb9dc731c8f7c)
35
-
36
- #### [v1.1.9](https://github.com/irisnikita/antsomi-ui/compare/v1.1.6...v1.1.9)
37
-
38
- > 29 March 2023
39
-
40
- #### [v1.1.6](https://github.com/irisnikita/antsomi-ui/compare/v1.1.5...v1.1.6)
41
-
42
- > 28 March 2023
43
-
44
- - chore(Divider.stories.tsx): update links text in Vertical story of Divider component [`e3c3a78`](https://github.com/irisnikita/antsomi-ui/commit/e3c3a78ba368e711f981ab4bf5e2b996b0c7c4f9)
45
-
46
- #### [v1.1.5](https://github.com/irisnikita/antsomi-ui/compare/v1.1.4...v1.1.5)
47
-
48
- > 28 March 2023
49
-
50
- - chore(Divider.stories.tsx): update links in Vertical story to have unique text [`ad7d462`](https://github.com/irisnikita/antsomi-ui/commit/ad7d46246d3d5078d8963321875503f9bcc55c62)
51
-
52
- #### [v1.1.4](https://github.com/irisnikita/antsomi-ui/compare/v1.1.3...v1.1.4)
53
-
54
- > 28 March 2023
55
-
56
- - feat(Divider): add text to Vertical story [`d9288eb`](https://github.com/irisnikita/antsomi-ui/commit/d9288ebd1ea4221fcc74f0d7036981321afa1fa1)
57
-
58
- #### v1.1.3
59
-
60
- > 28 March 2023
61
-
62
- - Create CHANGELOG.md [`5210493`](https://github.com/irisnikita/antsomi-ui/commit/5210493564763454f79b6cee9b7f7eb8f7049189)
63
- - Init antosmi UI [`175bcd4`](https://github.com/irisnikita/antsomi-ui/commit/175bcd4b05dacb70bfa4c463c0ae53591e344673)
64
- - chore(package): add and config commitlint [`a56d6c8`](https://github.com/irisnikita/antsomi-ui/commit/a56d6c80205dcb7d8a4b30f5e44f2daac832fedf)
package/dist/package.json DELETED
@@ -1,110 +0,0 @@
1
- {
2
- "name": "@antscorp/antsomi-ui",
3
- "version": "1.1.10-beta.27",
4
- "description": "An enterprise-class UI design language and React UI library.",
5
- "main": "index.js",
6
- "module": "index.js",
7
- "types": "types",
8
- "sideEffects": false,
9
- "scripts": {
10
- "dev": "vite",
11
- "build": "rollup -c",
12
- "eslint": "eslint --ext js,ts,tsx",
13
- "lint": "yarn run eslint src",
14
- "lint:fix": "yarn run eslint src --fix",
15
- "prepare": "husky install",
16
- "storybook": "start-storybook -p 6006 -s public",
17
- "build-storybook": "build-storybook",
18
- "serve-storybook": "serve storybook-static",
19
- "version": "auto-changelog -p && git add CHANGELOG.md"
20
- },
21
- "husky": {
22
- "hooks": {
23
- "pre-commit": "lint-staged"
24
- }
25
- },
26
- "lint-staged": {
27
- "*.{ts,tsx,js,jsx}": [
28
- "yarn lint:fix"
29
- ]
30
- },
31
- "author": "",
32
- "license": "MIT",
33
- "dependencies": {
34
- "dayjs": "^1.11.7",
35
- "react-day-picker": "^8.6.0"
36
- },
37
- "devDependencies": {
38
- "@ant-design/cssinjs": "^1.6.2",
39
- "@antscorp/eslint-config-antsomi": "1.0.4",
40
- "@antscorp/icons": "^0.26.47",
41
- "@babel/core": "^7.21.3",
42
- "@babel/preset-env": "^7.20.2",
43
- "@babel/preset-react": "^7.18.6",
44
- "@commitlint/cli": "^17.5.0",
45
- "@commitlint/config-conventional": "^17.4.4",
46
- "@emotion/react": "^11.10.6",
47
- "@rollup/plugin-commonjs": "^24.0.1",
48
- "@rollup/plugin-image": "^3.0.2",
49
- "@rollup/plugin-node-resolve": "^15.0.1",
50
- "@rollup/plugin-typescript": "^11.0.0",
51
- "@storybook/addon-actions": "^6.5.16",
52
- "@storybook/addon-essentials": "^6.5.16",
53
- "@storybook/addon-interactions": "^6.5.16",
54
- "@storybook/addon-links": "^6.5.16",
55
- "@storybook/addon-postcss": "^2.0.0",
56
- "@storybook/builder-webpack5": "^6.5.16",
57
- "@storybook/manager-webpack5": "^6.5.16",
58
- "@storybook/react": "^6.5.16",
59
- "@storybook/testing-library": "^0.0.13",
60
- "@types/jest": "^29.2.5",
61
- "@types/node": "^18.15.10",
62
- "@types/react": "^18.0.29",
63
- "@types/react-dom": "^18.0.11",
64
- "@types/styled-components": "^5.1.26",
65
- "@typescript-eslint/eslint-plugin": "^5.55.0",
66
- "@typescript-eslint/parser": "^5.55.0",
67
- "@vitejs/plugin-react": "^3.1.0",
68
- "antd": "^5.3.2",
69
- "auto-changelog": "^2.4.0",
70
- "babel-loader": "^8.3.0",
71
- "clsx": "^1.2.1",
72
- "css-loader": "^6.7.3",
73
- "date-fns": "^2.29.3",
74
- "eslint": "^8.36.0",
75
- "eslint-config-airbnb": "^19.0.4",
76
- "eslint-config-airbnb-typescript": "^17.0.0",
77
- "eslint-plugin-import": "^2.27.5",
78
- "eslint-plugin-jsx-a11y": "^6.7.1",
79
- "eslint-plugin-react": "^7.32.2",
80
- "eslint-plugin-react-hooks": "^4.6.0",
81
- "eslint-plugin-storybook": "^0.6.11",
82
- "husky": "^8.0.3",
83
- "lint-staged": "^13.2.0",
84
- "postcss": "^8.4.21",
85
- "postcss-loader": "^7.1.0",
86
- "prettier": "^2.8.7",
87
- "react": "17.0.2",
88
- "react-dom": "17.0.2",
89
- "rollup": "^3.20.0",
90
- "rollup-plugin-dts": "^5.3.0",
91
- "rollup-plugin-peer-deps-external": "^2.2.4",
92
- "rollup-plugin-postcss": "^4.0.2",
93
- "rollup-plugin-terser": "^7.0.2",
94
- "rollup-plugin-typescript-paths": "^1.4.0",
95
- "sass": "^1.60.0",
96
- "sass-loader": "^13.2.1",
97
- "style-loader": "^3.3.2",
98
- "styled-components": "^5.3.9",
99
- "ts-loader": "^9.4.2",
100
- "tsconfig-paths-webpack-plugin": "^4.0.1",
101
- "tslib": "^2.5.0",
102
- "typescript": "^4.9.4",
103
- "vite": "^4.2.1",
104
- "webpack": "^5.75.0"
105
- },
106
- "peerDependencies": {
107
- "react": ">=16.9.0",
108
- "react-dom": ">=16.9.0"
109
- }
110
- }