sprint-asia-custom-component 0.1.29 → 0.1.30

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,7 +1,7 @@
1
1
  {
2
2
  "name": "sprint-asia-custom-component",
3
3
  "main": "dist/index.js",
4
- "version": "0.1.29",
4
+ "version": "0.1.30",
5
5
  "private": false,
6
6
  "dependencies": {
7
7
  "@headlessui/react": "^1.7.18",
@@ -6,7 +6,7 @@ const FilterDropdown = ({
6
6
  {
7
7
  menu:"Type",
8
8
  submenu:[{
9
- name:"Type 1",
9
+ option:"Type 1",
10
10
  value : "type1"
11
11
  }],
12
12
  type:"checkbox"
@@ -14,7 +14,7 @@ const FilterDropdown = ({
14
14
  {
15
15
  menu:"Status",
16
16
  submenu:[{
17
- name : "Status 1",
17
+ option : "Status 1",
18
18
  value : "status1"
19
19
  }],
20
20
  type:"radiobutton"
@@ -56,9 +56,9 @@ const FilterDropdown = ({
56
56
  }, [dataValueFilterCheckbox, dataValueFilterStatus])
57
57
 
58
58
  const handleClickSubmenuCheckbox = (submenu) => {
59
- const updatedOptionsName = dataFilterCheckbox.includes(submenu.name)
60
- ? dataFilterCheckbox.filter((selected) => selected !== submenu.name)
61
- : [...dataFilterCheckbox, submenu.name];
59
+ const updatedOptionsName = dataFilterCheckbox.includes(submenu.option)
60
+ ? dataFilterCheckbox.filter((selected) => selected !== submenu.option)
61
+ : [...dataFilterCheckbox, submenu.option];
62
62
 
63
63
  setDataFilterCheckbox(updatedOptionsName);
64
64
 
@@ -70,12 +70,12 @@ const FilterDropdown = ({
70
70
  }
71
71
 
72
72
  const handleClickSubmenuRadioButton = (submenu) => {
73
- if (submenu.name == dataFilterStatus[0] && submenu.value == dataValueFilterStatus[0]) {
73
+ if (submenu.option == dataFilterStatus[0] && submenu.value == dataValueFilterStatus[0]) {
74
74
  setDataFilterStatus([])
75
75
  setDataValueFilterStatus([])
76
76
  }
77
77
  else {
78
- setDataFilterStatus([submenu.name]);
78
+ setDataFilterStatus([submenu.option]);
79
79
  setDataValueFilterStatus([submenu.value]);
80
80
  }
81
81
  }
@@ -172,11 +172,11 @@ const FilterDropdown = ({
172
172
  <input
173
173
  type='checkbox'
174
174
  className='mr-2'
175
- checked={dataFilterCheckbox.includes(submenu.name)}
175
+ checked={dataFilterCheckbox.includes(submenu.option)}
176
176
  onChange={() => handleClickSubmenuCheckbox(submenu)}
177
177
  />
178
178
  <p className={`text-sm ${dataFilterCheckbox.includes(submenu) ? 'text-primary500' : 'text-black'}`}>
179
- {submenu.name}
179
+ {submenu.option}
180
180
  </p>
181
181
  </div>
182
182
  }
@@ -186,11 +186,11 @@ const FilterDropdown = ({
186
186
  <input
187
187
  type='radio'
188
188
  className='mr-2'
189
- checked={dataFilterStatus.includes(submenu.name)}
189
+ checked={dataFilterStatus.includes(submenu.option)}
190
190
  onChange={() => handleClickSubmenuRadioButton(submenu)}
191
191
  />
192
192
  <p className={`text-sm ${dataFilterStatus.includes(submenu) ? 'text-primary500' : 'text-black'}`}>
193
- {submenu.name}
193
+ {submenu.option}
194
194
  </p>
195
195
  </div>
196
196
  }
@@ -4,11 +4,11 @@ import { PiMagnifyingGlass, PiCaretDown, PiCaretUp } from 'react-icons/pi';
4
4
  const SearchDropdown = ({
5
5
  options = [
6
6
  {
7
- name : "Name 1",
7
+ option : "Name 1",
8
8
  value : "Value 1"
9
9
  },
10
10
  {
11
- name : "Name 2",
11
+ option : "Name 2",
12
12
  value : "Value 2"
13
13
  },
14
14
  ],
@@ -38,7 +38,7 @@ const SearchDropdown = ({
38
38
  <div className='flex items-center h-full'>
39
39
  <div className={`${filterSearch ? "border-black" : "border-neutral50"} relative cursor-pointer border-t border-b border-l rounded-tl-md rounded-bl-md`} onClick={() => setIsOpen(!isOpen)}>
40
40
  <div className='flex items-center bg-white rounded-tl-md rounded-bl-md'>
41
- <p className="flex items-center w-full py-2.5 text-left pl-4 pr-4 bg-white rounded-md font-bold text-sm text-neutral300">{filterDropdown.name}</p>
41
+ <p className="flex items-center w-full py-2.5 text-left pl-4 pr-4 bg-white rounded-md font-bold text-sm text-neutral300">{filterDropdown.option}</p>
42
42
  {
43
43
  isOpen ? <PiCaretUp /> : <PiCaretDown />
44
44
  }
@@ -61,7 +61,7 @@ const SearchDropdown = ({
61
61
  onClick={() => handleClickOption(option)}
62
62
  >
63
63
  <div className='flex justify-between'>
64
- <p className='text-sm text-black'>{option.name}</p>
64
+ <p className='text-sm text-black'>{option.option}</p>
65
65
  </div>
66
66
  </div>
67
67
  ))
package/src/index.js CHANGED
@@ -1,71 +1,71 @@
1
- // import './index.css';
1
+ import './index.css';
2
2
 
3
- // import { BrowserRouter as Router } from 'react-router-dom';
3
+ import { BrowserRouter as Router } from 'react-router-dom';
4
4
 
5
- // import React from 'react';
6
- // import ReactDOM from 'react-dom/client';
7
- // import App from './App';
5
+ import React from 'react';
6
+ import ReactDOM from 'react-dom/client';
7
+ import App from './App';
8
8
 
9
- // const root = ReactDOM.createRoot(document.getElementById('root'));
10
- // root.render(
11
- // <React.StrictMode>
12
- // <Router> {/* Wrap your App component with Router */}
13
- // <App />
14
- // </Router>
15
- // </React.StrictMode>
16
- // );
9
+ const root = ReactDOM.createRoot(document.getElementById('root'));
10
+ root.render(
11
+ <React.StrictMode>
12
+ <Router> {/* Wrap your App component with Router */}
13
+ <App />
14
+ </Router>
15
+ </React.StrictMode>
16
+ );
17
17
 
18
18
 
19
- import './index.css';
20
- import Alert from './components/alert'
21
- import DangerButton from './components/button/dangerbutton'
22
- import OutlineButton from './components/button/outlinebutton'
23
- import PrimaryButton from './components/button/primarybutton'
24
- import CardInternalProduct from './components/card';
25
- import Chip from './components/chip'
26
- import CustomDatePicker from './components/datepicker';
27
- import Description from './components/description';
28
- import DropdownCard from './components/dropdown/dropdownCard';
29
- import DropdownChip from './components/dropdown/dropdownChip';
30
- import DropdownText from './components/dropdown/dropdownText';
31
- import DropzoneUploadFile from './components/dropzone/uploadfile';
32
- import DropzoneUploadPhoto from './components/dropzone/uploadphoto';
33
- import EmptyData from './components/emptystate/table/emptydata';
34
- import NotFound from './components/emptystate/table/notfound';
35
- import ExportToExcel from './components/export/excel';
36
- import FilterCheckbox from './components/filter/filterCheckbox';
37
- import FilterText from './components/filter/filterText';
38
- import Menu from './components/menu';
39
- import ModalLoading from './components/modal/modalLoading';
40
- import ModalResult from './components/modal/modalResult';
41
- import ModalState from './components/modal/modalState';
42
- import Notification from './components/notification';
43
- import SearchInput from './components/searchinput';
44
- import Stepper from './components/stepper';
45
- import Switch from './components/switch';
46
- import ChipBar from './components/tabLayout/chipBar';
47
- import TabBar from './components/tabLayout/tabBar';
48
- import BillerList from './components/table/listTable/biller';
49
- import BillerProductList from './components/table/listTable/product/billerproduct';
50
- import InternalProductList from './components/table/listTable/product/internalproduct';
51
- import ReportList from './components/table/listTable/report/businessadmin';
52
- import ReportListClient from './components/table/listTable/report/clientadmin';
53
- import Pagination from './components/table/pagination';
54
- import TextInput from './components/textinput';
55
- import HeaderTable from './components/table/headerTable';
56
- import BillingList from './components/table/listTable/billing';
57
- import ModalBilling from './components/modal/modalBilling';
58
- import LimitList from './components/table/listTable/limit';
59
- import ModalLimit from './components/modal/modalLimit';
60
- import VerticalStepBar from './components/verticalstepbar';
61
- import DepositList from './components/table/listTable/deposit';
62
- import ModalDeposit from './components/modal/modalDeposit';
63
- import CellModelOne from './components/table/listTable/cellmodelone';
64
- import SearchDropdown from './components/searchdropdown';
65
- import FilterDropdown from './components/filter/filterDropdown';
66
- import Footer from './components/footer';
19
+ // import './index.css';
20
+ // import Alert from './components/alert'
21
+ // import DangerButton from './components/button/dangerbutton'
22
+ // import OutlineButton from './components/button/outlinebutton'
23
+ // import PrimaryButton from './components/button/primarybutton'
24
+ // import CardInternalProduct from './components/card';
25
+ // import Chip from './components/chip'
26
+ // import CustomDatePicker from './components/datepicker';
27
+ // import Description from './components/description';
28
+ // import DropdownCard from './components/dropdown/dropdownCard';
29
+ // import DropdownChip from './components/dropdown/dropdownChip';
30
+ // import DropdownText from './components/dropdown/dropdownText';
31
+ // import DropzoneUploadFile from './components/dropzone/uploadfile';
32
+ // import DropzoneUploadPhoto from './components/dropzone/uploadphoto';
33
+ // import EmptyData from './components/emptystate/table/emptydata';
34
+ // import NotFound from './components/emptystate/table/notfound';
35
+ // import ExportToExcel from './components/export/excel';
36
+ // import FilterCheckbox from './components/filter/filterCheckbox';
37
+ // import FilterText from './components/filter/filterText';
38
+ // import Menu from './components/menu';
39
+ // import ModalLoading from './components/modal/modalLoading';
40
+ // import ModalResult from './components/modal/modalResult';
41
+ // import ModalState from './components/modal/modalState';
42
+ // import Notification from './components/notification';
43
+ // import SearchInput from './components/searchinput';
44
+ // import Stepper from './components/stepper';
45
+ // import Switch from './components/switch';
46
+ // import ChipBar from './components/tabLayout/chipBar';
47
+ // import TabBar from './components/tabLayout/tabBar';
48
+ // import BillerList from './components/table/listTable/biller';
49
+ // import BillerProductList from './components/table/listTable/product/billerproduct';
50
+ // import InternalProductList from './components/table/listTable/product/internalproduct';
51
+ // import ReportList from './components/table/listTable/report/businessadmin';
52
+ // import ReportListClient from './components/table/listTable/report/clientadmin';
53
+ // import Pagination from './components/table/pagination';
54
+ // import TextInput from './components/textinput';
55
+ // import HeaderTable from './components/table/headerTable';
56
+ // import BillingList from './components/table/listTable/billing';
57
+ // import ModalBilling from './components/modal/modalBilling';
58
+ // import LimitList from './components/table/listTable/limit';
59
+ // import ModalLimit from './components/modal/modalLimit';
60
+ // import VerticalStepBar from './components/verticalstepbar';
61
+ // import DepositList from './components/table/listTable/deposit';
62
+ // import ModalDeposit from './components/modal/modalDeposit';
63
+ // import CellModelOne from './components/table/listTable/cellmodelone';
64
+ // import SearchDropdown from './components/searchdropdown';
65
+ // import FilterDropdown from './components/filter/filterDropdown';
66
+ // import Footer from './components/footer';
67
67
 
68
68
 
69
- export {Footer, CellModelOne, SearchDropdown, FilterDropdown, HeaderTable, TextInput, Pagination, ReportList, ReportListClient, InternalProductList, BillerProductList, BillerList, TabBar, ChipBar, Switch, Stepper,
70
- SearchInput, Notification, ModalState, ModalResult, ModalLoading, Menu, FilterText, FilterCheckbox, ExportToExcel, NotFound, EmptyData, DropzoneUploadPhoto, DropzoneUploadFile, DropdownText, DropdownChip, DropdownCard, Description, CustomDatePicker, Chip, CardInternalProduct, PrimaryButton, OutlineButton,
71
- DangerButton, Alert, BillingList, ModalBilling, LimitList, ModalLimit, VerticalStepBar, DepositList, ModalDeposit}
69
+ // export {Footer, CellModelOne, SearchDropdown, FilterDropdown, HeaderTable, TextInput, Pagination, ReportList, ReportListClient, InternalProductList, BillerProductList, BillerList, TabBar, ChipBar, Switch, Stepper,
70
+ // SearchInput, Notification, ModalState, ModalResult, ModalLoading, Menu, FilterText, FilterCheckbox, ExportToExcel, NotFound, EmptyData, DropzoneUploadPhoto, DropzoneUploadFile, DropdownText, DropdownChip, DropdownCard, Description, CustomDatePicker, Chip, CardInternalProduct, PrimaryButton, OutlineButton,
71
+ // DangerButton, Alert, BillingList, ModalBilling, LimitList, ModalLimit, VerticalStepBar, DepositList, ModalDeposit}
@@ -723,7 +723,7 @@ const Templates = () => {
723
723
 
724
724
  const [searchFilter, setSearchFilter] = useState()
725
725
  const [filterDropdown, setFilterDropdown] = useState({
726
- name : "duar",
726
+ option : "duar",
727
727
  value : "dfdsf"
728
728
  })
729
729
 
@@ -964,11 +964,11 @@ const Templates = () => {
964
964
  menu:"Type",
965
965
  submenu:[
966
966
  {
967
- name:"Type 1",
967
+ option:"Type 1",
968
968
  value : "type1"
969
969
  },
970
970
  {
971
- name:"Type 2",
971
+ option:"Type 2",
972
972
  value : "type2"
973
973
  },
974
974
  ],
@@ -978,11 +978,11 @@ const Templates = () => {
978
978
  menu:"Status",
979
979
  submenu:[
980
980
  {
981
- name : "Status 1",
981
+ option : "Status 1",
982
982
  value : "status1"
983
983
  },
984
984
  {
985
- name : "Status 2",
985
+ option : "Status 2",
986
986
  value : "status2"
987
987
  },
988
988
  ],
@@ -991,9 +991,6 @@ const Templates = () => {
991
991
  ]}
992
992
  setDataFilterResult={setDataFilterResult}
993
993
  />
994
- {
995
- console.log("woeee ini", dataFilterResult)
996
- }
997
994
 
998
995
  <div className='m-9'></div>
999
996
  <p className='text-black font-bold text-2xl text-center py-2'>Menu</p>
@@ -1065,11 +1062,11 @@ const Templates = () => {
1065
1062
  <SearchDropdown
1066
1063
  options={[
1067
1064
  {
1068
- name: "Name 1",
1065
+ option: "Name 1",
1069
1066
  value : "Value 1"
1070
1067
  },
1071
1068
  {
1072
- name: "Name 2",
1069
+ option: "Name 2",
1073
1070
  value : "Value 2"
1074
1071
  },
1075
1072
  ]}