@abcagency/hc-ui-components 1.1.1 → 1.2.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.
- package/.editorconfig +12 -0
- package/.eslintrc +144 -0
- package/.prettierignore +3 -0
- package/dist/_virtual/_rollupPluginBabelHelpers.js +516 -0
- package/dist/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
- package/dist/apis/hcApi.js +189 -0
- package/dist/apis/hcApi.js.map +1 -0
- package/dist/clientToken.js +10 -0
- package/dist/clientToken.js.map +1 -0
- package/dist/components/HireControlMap.js +129 -0
- package/dist/components/HireControlMap.js.map +1 -0
- package/dist/components/modules/accordions/MapAccordionItem.js +76 -0
- package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -0
- package/dist/components/modules/accordions/default.js +108 -0
- package/dist/components/modules/accordions/default.js.map +1 -0
- package/dist/components/modules/accordions/filterItem.js +50 -0
- package/dist/components/modules/accordions/filterItem.js.map +1 -0
- package/dist/components/modules/accordions/filters.js +46 -0
- package/dist/components/modules/accordions/filters.js.map +1 -0
- package/dist/components/modules/buttons/button-group-apply.js +84 -0
- package/dist/components/modules/buttons/button-group-apply.js.map +1 -0
- package/dist/components/modules/buttons/commute-pill.js +18 -0
- package/dist/components/modules/buttons/commute-pill.js.map +1 -0
- package/dist/components/modules/buttons/default.js +145 -0
- package/dist/components/modules/buttons/default.js.map +1 -0
- package/dist/components/modules/buttons/items-pill.js +23 -0
- package/dist/components/modules/buttons/items-pill.js.map +1 -0
- package/dist/components/modules/buttons/pill-wrapper.js +20 -0
- package/dist/components/modules/buttons/pill-wrapper.js.map +1 -0
- package/dist/components/modules/buttons/show-all-button.js +39 -0
- package/dist/components/modules/buttons/show-all-button.js.map +1 -0
- package/dist/components/modules/cards/default.js +102 -0
- package/dist/components/modules/cards/default.js.map +1 -0
- package/dist/components/modules/cards/filter.js +38 -0
- package/dist/components/modules/cards/filter.js.map +1 -0
- package/dist/components/modules/dialogs/apply-dialog.js +46 -0
- package/dist/components/modules/dialogs/apply-dialog.js.map +1 -0
- package/dist/components/modules/filter/commute.js +184 -0
- package/dist/components/modules/filter/commute.js.map +1 -0
- package/dist/components/modules/filter/index.js +79 -0
- package/dist/components/modules/filter/index.js.map +1 -0
- package/dist/components/modules/filter/item.js +71 -0
- package/dist/components/modules/filter/item.js.map +1 -0
- package/dist/components/modules/filter/location.js +68 -0
- package/dist/components/modules/filter/location.js.map +1 -0
- package/dist/components/modules/filter/points-of-interest.js +38 -0
- package/dist/components/modules/filter/points-of-interest.js.map +1 -0
- package/dist/components/modules/filter/radio-item.js +46 -0
- package/dist/components/modules/filter/radio-item.js.map +1 -0
- package/dist/components/modules/filter/search.js +83 -0
- package/dist/components/modules/filter/search.js.map +1 -0
- package/dist/components/modules/filter/sort.js +93 -0
- package/dist/components/modules/filter/sort.js.map +1 -0
- package/dist/components/modules/grid.js +39 -0
- package/dist/components/modules/grid.js.map +1 -0
- package/dist/components/modules/icon.js +23 -0
- package/dist/components/modules/icon.js.map +1 -0
- package/dist/components/modules/jobListing/listing-details.js +69 -0
- package/dist/components/modules/jobListing/listing-details.js.map +1 -0
- package/dist/components/modules/maps/info-window-card.js +14 -0
- package/dist/components/modules/maps/info-window-card.js.map +1 -0
- package/dist/components/modules/maps/info-window-content.js +39 -0
- package/dist/components/modules/maps/info-window-content.js.map +1 -0
- package/dist/components/modules/maps/list/field-mapper.js +88 -0
- package/dist/components/modules/maps/list/field-mapper.js.map +1 -0
- package/dist/components/modules/maps/list/header-item.js +59 -0
- package/dist/components/modules/maps/list/header-item.js.map +1 -0
- package/dist/components/modules/maps/list/header.js +37 -0
- package/dist/components/modules/maps/list/header.js.map +1 -0
- package/dist/components/modules/maps/list/index.js +93 -0
- package/dist/components/modules/maps/list/index.js.map +1 -0
- package/dist/components/modules/maps/list/item-expand-card/index.js +16 -0
- package/dist/components/modules/maps/list/item-expand-card/index.js.map +1 -0
- package/dist/components/modules/maps/list/item-expand-card/recruiter-contact-nav.js +38 -0
- package/dist/components/modules/maps/list/item-expand-card/recruiter-contact-nav.js.map +1 -0
- package/dist/components/modules/maps/list/item-expand-card/recruiter-details.js +40 -0
- package/dist/components/modules/maps/list/item-expand-card/recruiter-details.js.map +1 -0
- package/dist/components/modules/maps/list/item-expand-card/recruiter-headshot.js +20 -0
- package/dist/components/modules/maps/list/item-expand-card/recruiter-headshot.js.map +1 -0
- package/dist/components/modules/maps/list/list-item/index.js +98 -0
- package/dist/components/modules/maps/list/list-item/index.js.map +1 -0
- package/dist/components/modules/maps/map-list.js +57 -0
- package/dist/components/modules/maps/map-list.js.map +1 -0
- package/dist/components/modules/maps/map-marker.js +85 -0
- package/dist/components/modules/maps/map-marker.js.map +1 -0
- package/dist/components/modules/maps/map.js +201 -0
- package/dist/components/modules/maps/map.js.map +1 -0
- package/dist/components/modules/maps/place-marker.js +37 -0
- package/dist/components/modules/maps/place-marker.js.map +1 -0
- package/dist/components/modules/maps/tabs.js +84 -0
- package/dist/components/modules/maps/tabs.js.map +1 -0
- package/dist/constants/placeTypes.js +11 -0
- package/dist/constants/placeTypes.js.map +1 -0
- package/dist/contexts/mapContext.js +133 -0
- package/dist/contexts/mapContext.js.map +1 -0
- package/dist/contexts/mapListContext.js +278 -0
- package/dist/contexts/mapListContext.js.map +1 -0
- package/dist/contexts/placesContext.js +152 -0
- package/dist/contexts/placesContext.js.map +1 -0
- package/dist/hooks/useList.js +119 -0
- package/dist/hooks/useList.js.map +1 -0
- package/dist/index.js +2 -4536
- package/dist/index.js.map +1 -0
- package/dist/services/_virtual/_rollupPluginBabelHelpers.js +372 -0
- package/dist/services/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
- package/dist/services/apis/hcApi.js +189 -0
- package/dist/services/apis/hcApi.js.map +1 -0
- package/dist/services/clientToken.js +7 -0
- package/dist/services/clientToken.js.map +1 -0
- package/dist/services/configService.js +33 -0
- package/dist/services/configService.js.map +1 -0
- package/dist/services/googlePlacesNearbyService.js +61 -0
- package/dist/services/googlePlacesNearbyService.js.map +1 -0
- package/dist/services/listingAggregatorService.js +56 -0
- package/dist/services/listingAggregatorService.js.map +1 -0
- package/dist/services/listingEntityService.js +36 -0
- package/dist/services/listingEntityService.js.map +1 -0
- package/dist/services/listingService.js +60 -112
- package/dist/services/listingService.js.map +1 -0
- package/dist/services/recruiterService.js +36 -0
- package/dist/services/recruiterService.js.map +1 -0
- package/dist/services/styles/index.css +3 -0
- package/dist/styles/index.css +3 -0
- package/dist/util/filterUtil.js +213 -0
- package/dist/util/filterUtil.js.map +1 -0
- package/dist/util/loading.js +16 -0
- package/dist/util/loading.js.map +1 -0
- package/dist/util/localStorageUtil.js +32 -0
- package/dist/util/localStorageUtil.js.map +1 -0
- package/dist/util/mapIconUtil.js +73 -0
- package/dist/util/mapIconUtil.js.map +1 -0
- package/dist/util/mapUtil.js +76 -0
- package/dist/util/mapUtil.js.map +1 -0
- package/dist/util/sortUtil.js +33 -0
- package/dist/util/sortUtil.js.map +1 -0
- package/dist/util/stringUtils.js +9 -0
- package/dist/util/stringUtils.js.map +1 -0
- package/jsconfig.json +7 -0
- package/package.json +51 -38
- package/postcss.config.js +13 -15
- package/{src/tailwind/preset.default.js → preset.default.js} +15 -15
- package/rollup.config.mjs +87 -0
- package/src/apis/hcApi.js +93 -87
- package/src/clientToken.js +9 -9
- package/src/components/HireControlMap.js +120 -0
- package/src/components/modules/accordions/MapAccordionItem.js +72 -69
- package/src/components/modules/accordions/default.js +171 -173
- package/src/components/modules/accordions/filterItem.js +53 -53
- package/src/components/modules/accordions/filters.js +47 -44
- package/src/components/modules/buttons/button-group-apply.js +113 -85
- package/src/components/modules/buttons/commute-pill.js +22 -21
- package/src/components/modules/buttons/default.js +196 -196
- package/src/components/modules/buttons/items-pill.js +32 -31
- package/src/components/modules/buttons/pill-wrapper.js +27 -26
- package/src/components/modules/buttons/show-all-button.js +20 -20
- package/src/components/modules/cards/default.js +167 -168
- package/src/components/modules/cards/filter.js +56 -55
- package/src/components/modules/dialogs/apply-dialog.js +48 -47
- package/src/components/modules/filter/commute.js +148 -151
- package/src/components/modules/filter/index.js +87 -86
- package/src/components/modules/filter/item.js +76 -77
- package/src/components/modules/filter/location.js +71 -69
- package/src/components/modules/filter/points-of-interest.js +44 -43
- package/src/components/modules/filter/radio-item.js +53 -51
- package/src/components/modules/filter/search.js +92 -91
- package/src/components/modules/filter/sort.js +83 -83
- package/src/components/modules/grid.js +55 -56
- package/src/components/modules/icon.js +33 -33
- package/src/components/modules/jobListing/listing-details.js +94 -88
- package/src/components/modules/maps/info-window-card.js +17 -17
- package/src/components/modules/maps/info-window-content.js +58 -60
- package/src/components/modules/maps/list/field-mapper.js +112 -111
- package/src/components/modules/maps/list/header-item.js +91 -90
- package/src/components/modules/maps/list/header.js +47 -46
- package/src/components/modules/maps/list/index.js +107 -104
- package/src/components/modules/maps/list/item-expand-card/index.js +22 -21
- package/src/components/modules/maps/list/item-expand-card/recruiter-contact-nav.js +50 -48
- package/src/components/modules/maps/list/item-expand-card/recruiter-details.js +68 -67
- package/src/components/modules/maps/list/item-expand-card/recruiter-headshot.js +22 -22
- package/src/components/modules/maps/list/list-item/index.js +134 -133
- package/src/components/modules/maps/map-list.js +74 -73
- package/src/components/modules/maps/map-marker.js +86 -84
- package/src/components/modules/maps/map.js +229 -226
- package/src/components/modules/maps/place-marker.js +1 -1
- package/src/components/modules/maps/tabs.js +81 -79
- package/src/constants/placeTypes.js +8 -8
- package/src/contexts/mapContext.js +20 -19
- package/src/contexts/mapListContext.js +20 -15
- package/src/contexts/placesContext.js +4 -0
- package/src/hooks/useList.js +12 -10
- package/src/index.js +3 -103
- package/src/services/configService.js +16 -16
- package/src/services/googlePlacesNearbyService.js +33 -33
- package/src/services/listingAggregatorService.js +5 -4
- package/src/services/listingEntityService.js +2 -1
- package/src/services/listingService.js +27 -28
- package/src/services/recruiterService.js +17 -17
- package/src/styles/{globals.css → index.css} +23 -23
- package/src/util/arrayUtil.js +3 -3
- package/src/util/fieldMapper.js +22 -19
- package/src/util/filterUtil.js +19 -19
- package/src/util/loading.js +17 -17
- package/src/util/localStorageUtil.js +26 -26
- package/src/util/mapIconUtil.js +3 -3
- package/src/util/sortUtil.js +32 -32
- package/src/util/stringUtils.js +6 -6
- package/{src/tailwind/tailwind.config.js → tailwind.config.js} +126 -127
- package/dist/globals.css +0 -3
- package/dist/output.css +0 -784
- package/dist/services/globals.css +0 -3
- package/rollup.config.js +0 -68
- package/src/components/layout/footer.js +0 -34
- package/src/components/layout/header.js +0 -23
- package/src/components/layout/layout.js +0 -36
- package/src/components/modules/animations/slidein.js +0 -41
- package/src/components/modules/navigation/nav-link.js +0 -65
- package/src/components/modules/navigation/navbar.js +0 -106
- package/src/components/modules/navigation/skip-link.js +0 -21
- package/src/components/modules/navigation/social.js +0 -29
- package/src/components/modules/sections/default.js +0 -59
- package/src/components/modules/sections/sectionContext.js +0 -4
- package/src/hooks/useClickOutside.js +0 -16
- package/src/hooks/useEventListener.js +0 -25
- package/src/hooks/useEventTracker.js +0 -19
- package/src/hooks/useRefScrollProgress.js +0 -24
- package/src/hooks/useScript.js +0 -63
- package/src/hooks/useScrollDirection.js +0 -39
- package/src/hooks/useSectionTracker.js +0 -95
- package/src/hooks/useUserAgent.js +0 -43
- package/src/hooks/useWindowSize.js +0 -28
- package/src/index.css +0 -25
- package/src/styles/fonts.js +0 -0
- package/src/util/page-head.js +0 -62
- package/src/util/provider.js +0 -12
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { objectSpread2 as _objectSpread2 } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React, { memo } from 'react';
|
|
3
|
+
import Accordion from './default.js';
|
|
4
|
+
import FilterItem from '../filter/item.js';
|
|
5
|
+
import { ButtonItemsPill } from '../buttons/items-pill.js';
|
|
6
|
+
|
|
7
|
+
var AccordionFilterItem = /*#__PURE__*/memo(function (_ref) {
|
|
8
|
+
var filter = _ref.filter,
|
|
9
|
+
setDefaultValue = _ref.setDefaultValue,
|
|
10
|
+
setSelectedFilters = _ref.setSelectedFilters,
|
|
11
|
+
selectedFilters = _ref.selectedFilters;
|
|
12
|
+
var fieldKey = filter.id;
|
|
13
|
+
var activeItemsCount = selectedFilters != null && selectedFilters[fieldKey] ? Object.keys(selectedFilters[fieldKey]).length : 0;
|
|
14
|
+
var handleClearFilters = function handleClearFilters() {
|
|
15
|
+
setSelectedFilters(function (prevFilters) {
|
|
16
|
+
var updatedFilters = _objectSpread2({}, prevFilters);
|
|
17
|
+
delete updatedFilters[fieldKey];
|
|
18
|
+
return updatedFilters;
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
return /*#__PURE__*/React.createElement(Accordion.Item, {
|
|
22
|
+
key: filter.id,
|
|
23
|
+
id: filter.id
|
|
24
|
+
}, /*#__PURE__*/React.createElement(Accordion.Trigger.HasHeader, {
|
|
25
|
+
onClick: function onClick() {
|
|
26
|
+
return setDefaultValue(filter.id);
|
|
27
|
+
},
|
|
28
|
+
className: "hc-stretched-link hc-text-left",
|
|
29
|
+
iconClassName: "hc-order-last",
|
|
30
|
+
headerClassName: "hc-relative hc-py-2 hc-rounded hc-border hc-border-uiAccent/20 hc-bg-white hc-text-sm hc-transition data-[state=open]:hc-border-b-transparent data-[state=open]:hc-rounded-b-none",
|
|
31
|
+
header: activeItemsCount > 0 && /*#__PURE__*/React.createElement(ButtonItemsPill, {
|
|
32
|
+
activeItemsCount: activeItemsCount,
|
|
33
|
+
onClick: handleClearFilters
|
|
34
|
+
})
|
|
35
|
+
}, filter.title), /*#__PURE__*/React.createElement(Accordion.Content, {
|
|
36
|
+
bodyClassName: "hc-px-2 hc-py-1 hc-bg-white hc-rounded-b hc-border hc-border-uiAccent/20 hc-border-t-0 hc-max-h-[20vh] md:hc-max-h-[25vh] hc-overflow-auto"
|
|
37
|
+
}, filter.items.sort().map(function (item) {
|
|
38
|
+
return /*#__PURE__*/React.createElement(FilterItem, {
|
|
39
|
+
key: item.name,
|
|
40
|
+
item: item,
|
|
41
|
+
field: filter.id,
|
|
42
|
+
selectedFilters: selectedFilters,
|
|
43
|
+
setSelectedFilters: setSelectedFilters
|
|
44
|
+
});
|
|
45
|
+
})));
|
|
46
|
+
});
|
|
47
|
+
AccordionFilterItem.displayName = 'AccordionItem';
|
|
48
|
+
|
|
49
|
+
export { AccordionFilterItem as default };
|
|
50
|
+
//# sourceMappingURL=filterItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterItem.js","sources":["../../../../src/components/modules/accordions/filterItem.js"],"sourcesContent":["import React, { memo } from 'react';\n\nimport Accordion from '~/components/modules/accordions/default';\nimport FilterItem from '~/components/modules/filter/item';\nimport ItemsPill from '~/components/modules/buttons/items-pill';\n\nconst AccordionFilterItem = memo(({ filter, setDefaultValue, setSelectedFilters, selectedFilters }) => {\n\tconst fieldKey = filter.id;\n\tconst activeItemsCount = selectedFilters != null && selectedFilters[fieldKey]\n\t\t? Object.keys(selectedFilters[fieldKey]).length\n\t\t: 0;\n\n\tconst handleClearFilters = () => {\n\t\tsetSelectedFilters(prevFilters => {\n\t\t\tconst updatedFilters = { ...prevFilters };\n\t\t\tdelete updatedFilters[fieldKey];\n\t\t\treturn updatedFilters;\n\t\t});\n\t};\n\treturn (\n\t\t<Accordion.Item key={filter.id} id={filter.id}>\n\t\t\t<Accordion.Trigger.HasHeader\n\t\t\t\tonClick={() => setDefaultValue(filter.id)}\n\t\t\t\tclassName=\"hc-stretched-link hc-text-left\"\n\t\t\t\ticonClassName=\"hc-order-last\"\n\t\t\t\theaderClassName=\"hc-relative hc-py-2 hc-rounded hc-border hc-border-uiAccent/20 hc-bg-white hc-text-sm hc-transition data-[state=open]:hc-border-b-transparent data-[state=open]:hc-rounded-b-none\"\n\t\t\t\theader={\n\t\t\t\t\tactiveItemsCount > 0 && (\n\t\t\t\t\t\t<ItemsPill\n\t\t\t\t\t\t\tactiveItemsCount={activeItemsCount}\n\t\t\t\t\t\t\tonClick={handleClearFilters}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{filter.title}\n\t\t\t</Accordion.Trigger.HasHeader>\n\t\t\t<Accordion.Content bodyClassName=\"hc-px-2 hc-py-1 hc-bg-white hc-rounded-b hc-border hc-border-uiAccent/20 hc-border-t-0 hc-max-h-[20vh] md:hc-max-h-[25vh] hc-overflow-auto\">\n\t\t\t\t{filter.items.sort().map(item => (\n\t\t\t\t\t<FilterItem\n\t\t\t\t\t\tkey={item.name}\n\t\t\t\t\t\titem={item}\n\t\t\t\t\t\tfield={filter.id}\n\t\t\t\t\t\tselectedFilters={selectedFilters}\n\t\t\t\t\t\tsetSelectedFilters={setSelectedFilters}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</Accordion.Content>\n\t\t</Accordion.Item>\n\t);\n});\nAccordionFilterItem.displayName = 'AccordionItem';\nexport default AccordionFilterItem;\n"],"names":["AccordionFilterItem","memo","_ref","filter","setDefaultValue","setSelectedFilters","selectedFilters","fieldKey","id","activeItemsCount","Object","keys","length","handleClearFilters","prevFilters","updatedFilters","_objectSpread","React","createElement","Accordion","Item","key","Trigger","HasHeader","onClick","className","iconClassName","headerClassName","header","ItemsPill","title","Content","bodyClassName","items","sort","map","item","FilterItem","name","field","displayName"],"mappings":";;;;;;AAMA,IAAMA,mBAAmB,gBAAGC,IAAI,CAAC,UAAAC,IAAA,EAAsE;AAAA,EAAA,IAAnEC,MAAM,GAAAD,IAAA,CAANC,MAAM;IAAEC,eAAe,GAAAF,IAAA,CAAfE,eAAe;IAAEC,kBAAkB,GAAAH,IAAA,CAAlBG,kBAAkB;IAAEC,eAAe,GAAAJ,IAAA,CAAfI,eAAe,CAAA;AAC/F,EAAA,IAAMC,QAAQ,GAAGJ,MAAM,CAACK,EAAE,CAAA;EAC1B,IAAMC,gBAAgB,GAAGH,eAAe,IAAI,IAAI,IAAIA,eAAe,CAACC,QAAQ,CAAC,GAC1EG,MAAM,CAACC,IAAI,CAACL,eAAe,CAACC,QAAQ,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,GAAG,EAAEe,IAAI,CAACE,IAAK;AACfF,MAAAA,IAAI,EAAEA,IAAK;MACXG,KAAK,EAAEpC,MAAM,CAACK,EAAG;AACjBF,MAAAA,eAAe,EAAEA,eAAgB;AACjCD,MAAAA,kBAAkB,EAAEA,kBAAAA;AAAmB,KACvC,CAAC,CAAA;GACF,CACiB,CACJ,CAAC,CAAA;AAEnB,CAAC,EAAC;AACFL,mBAAmB,CAACwC,WAAW,GAAG,eAAe;;;;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Accordion from './default.js';
|
|
3
|
+
import AccordionFilterItem from './filterItem.js';
|
|
4
|
+
import CardFilter from '../cards/filter.js';
|
|
5
|
+
import { useMapList } from '../../../contexts/mapListContext.js';
|
|
6
|
+
import Loading from '../../../util/loading.js';
|
|
7
|
+
|
|
8
|
+
var AccordionFilters = function AccordionFilters(_ref) {
|
|
9
|
+
var className = _ref.className,
|
|
10
|
+
defaultValue = _ref.defaultValue,
|
|
11
|
+
setDefaultValue = _ref.setDefaultValue,
|
|
12
|
+
setLocation = _ref.setLocation,
|
|
13
|
+
setSelectedListItem = _ref.setSelectedListItem;
|
|
14
|
+
var _useMapList = useMapList(),
|
|
15
|
+
filterOptions = _useMapList.filterOptions,
|
|
16
|
+
selectedFilters = _useMapList.selectedFilters,
|
|
17
|
+
_setSelectedFilters = _useMapList.setSelectedFilters;
|
|
18
|
+
_useMapList.favorites;
|
|
19
|
+
_useMapList.filterByFavorites;
|
|
20
|
+
_useMapList.setFilterByFavorites;
|
|
21
|
+
return /*#__PURE__*/React.createElement(CardFilter, {
|
|
22
|
+
className: className !== null && className !== void 0 ? className : ""
|
|
23
|
+
}, /*#__PURE__*/React.createElement(CardFilter.Title, {
|
|
24
|
+
icon: "fa-solid:sliders-h"
|
|
25
|
+
}, /*#__PURE__*/React.createElement("span", null, "Filter ", /*#__PURE__*/React.createElement("span", {
|
|
26
|
+
className: "md:hc-hidden lg:hc-inline"
|
|
27
|
+
}, "your search"))), /*#__PURE__*/React.createElement(Accordion, {
|
|
28
|
+
defaultValue: defaultValue,
|
|
29
|
+
className: "hc-space-y-4"
|
|
30
|
+
}, !(filterOptions !== null && filterOptions !== void 0 && filterOptions.filters) && /*#__PURE__*/React.createElement(Accordion.Item, null, /*#__PURE__*/React.createElement(Loading, null)), (filterOptions === null || filterOptions === void 0 ? void 0 : filterOptions.filters) && (filterOptions === null || filterOptions === void 0 ? void 0 : filterOptions.filters.map(function (filter) {
|
|
31
|
+
return /*#__PURE__*/React.createElement(AccordionFilterItem, {
|
|
32
|
+
key: filter.id,
|
|
33
|
+
filter: filter,
|
|
34
|
+
setDefaultValue: setDefaultValue,
|
|
35
|
+
selectedFilters: selectedFilters,
|
|
36
|
+
setSelectedFilters: function setSelectedFilters(prevFilters) {
|
|
37
|
+
_setSelectedFilters(prevFilters);
|
|
38
|
+
setLocation(null);
|
|
39
|
+
setSelectedListItem(null);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}))));
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { AccordionFilters as default };
|
|
46
|
+
//# sourceMappingURL=filters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filters.js","sources":["../../../../src/components/modules/accordions/filters.js"],"sourcesContent":["import React from 'react'\nimport Accordion from '~/components/modules/accordions/default';\nimport AccordionFilterItem from '~/components/modules/accordions/filterItem';\nimport FilterCard from '~/components/modules/cards/filter';\n\nimport { useMapList } from '~/contexts/mapListContext';\n\nimport Loading from '~/util/loading';\n\nconst AccordionFilters = ({\n\tclassName,\n\tdefaultValue,\n\tsetDefaultValue,\n\tsetLocation,\n\tsetSelectedListItem\n}) => {\n\tconst { filterOptions, selectedFilters, setSelectedFilters, favorites, filterByFavorites, setFilterByFavorites } = useMapList();\n\n\treturn (\n\t\t<FilterCard className={className ?? \"\"}>\n\t\t\t<FilterCard.Title icon=\"fa-solid:sliders-h\">\n\t\t\t\t<span>\n\t\t\t\t\tFilter <span className=\"md:hc-hidden lg:hc-inline\">your search</span>\n\t\t\t\t</span>\n\t\t\t</FilterCard.Title>\n\n\t\t\t<Accordion defaultValue={defaultValue} className=\"hc-space-y-4\" >\n\t\t\t\t{!filterOptions?.filters && (\n\t\t\t\t\t<Accordion.Item>\n\t\t\t\t\t\t<Loading />\n\t\t\t\t\t</Accordion.Item>\n\t\t\t\t)}\n\t\t\t\t{filterOptions?.filters && filterOptions?.filters.map(filter => (\n\t\t\t\t\t<AccordionFilterItem\n\t\t\t\t\t\tkey={filter.id}\n\t\t\t\t\t\tfilter={filter}\n\t\t\t\t\t\tsetDefaultValue={setDefaultValue}\n\t\t\t\t\t\tselectedFilters={selectedFilters}\n\t\t\t\t\t\tsetSelectedFilters={prevFilters => { setSelectedFilters(prevFilters); setLocation(null); setSelectedListItem(null); }}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</Accordion>\n\t\t</FilterCard>\n\t);\n};\n\nexport default AccordionFilters;\n"],"names":["AccordionFilters","_ref","className","defaultValue","setDefaultValue","setLocation","setSelectedListItem","_useMapList","useMapList","filterOptions","selectedFilters","setSelectedFilters","favorites","filterByFavorites","setFilterByFavorites","React","createElement","FilterCard","Title","icon","Accordion","filters","Item","Loading","map","filter","AccordionFilterItem","key","id","prevFilters"],"mappings":";;;;;;;AASA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,EAMhB;AAAA,EAAA,IALLC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,YAAY,GAAAF,IAAA,CAAZE,YAAY;IACZC,eAAe,GAAAH,IAAA,CAAfG,eAAe;IACfC,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IACXC,mBAAmB,GAAAL,IAAA,CAAnBK,mBAAmB,CAAA;AAEnB,EAAA,IAAAC,WAAA,GAAmHC,UAAU,EAAE,CAAA;IAAvHC,aAAa,GAAAF,WAAA,CAAbE,aAAa,CAAA;IAAEC,eAAe,GAAA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AEF,MAAM,CAACG,EAAG;AACfH,MAAAA,MAAM,EAAEA,MAAO;AACfrB,MAAAA,eAAe,EAAEA,eAAgB;AACjCM,MAAAA,eAAe,EAAEA,eAAgB;AACjCC,MAAAA,kBAAkB,EAAE,SAAAA,kBAAAkB,CAAAA,WAAW,EAAI;QAAElB,mBAAkB,CAACkB,WAAW,CAAC,CAAA;QAAExB,WAAW,CAAC,IAAI,CAAC,CAAA;QAAEC,mBAAmB,CAAC,IAAI,CAAC,CAAA;AAAE,OAAA;AAAE,KACtH,CAAC,CAAA;GACF,CAAC,CACQ,CACA,CAAC,CAAA;AAEf;;;;"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { taggedTemplateLiteral as _taggedTemplateLiteral } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
4
|
+
import Button from './default.js';
|
|
5
|
+
import ApplyDialog from '../dialogs/apply-dialog.js';
|
|
6
|
+
|
|
7
|
+
var _templateObject;
|
|
8
|
+
var ButtonGroupApply = function ButtonGroupApply(_ref) {
|
|
9
|
+
var applyUrl = _ref.applyUrl,
|
|
10
|
+
useDetailsPostMessage = _ref.useDetailsPostMessage,
|
|
11
|
+
navigateToDetails = _ref.navigateToDetails,
|
|
12
|
+
navigateToEasyApply = _ref.navigateToEasyApply,
|
|
13
|
+
Link = _ref.Link,
|
|
14
|
+
_ref$applyText = _ref.applyText,
|
|
15
|
+
applyText = _ref$applyText === void 0 ? 'Apply Now' : _ref$applyText,
|
|
16
|
+
detailsUrl = _ref.detailsUrl,
|
|
17
|
+
_ref$detailsText = _ref.detailsText,
|
|
18
|
+
detailsText = _ref$detailsText === void 0 ? 'View Details' : _ref$detailsText,
|
|
19
|
+
className = _ref.className,
|
|
20
|
+
_ref$buttonSize = _ref.buttonSize,
|
|
21
|
+
buttonSize = _ref$buttonSize === void 0 ? 'default' : _ref$buttonSize,
|
|
22
|
+
_ref$applyButtonVaria = _ref.applyButtonVariant,
|
|
23
|
+
applyButtonVariant = _ref$applyButtonVaria === void 0 ? 'primary' : _ref$applyButtonVaria,
|
|
24
|
+
_ref$detailsButtonVar = _ref.detailsButtonVariant,
|
|
25
|
+
detailsButtonVariant = _ref$detailsButtonVar === void 0 ? 'outline' : _ref$detailsButtonVar,
|
|
26
|
+
_ref$includeDialog = _ref.includeDialog,
|
|
27
|
+
includeDialog = _ref$includeDialog === void 0 ? false : _ref$includeDialog,
|
|
28
|
+
internalApplyLink = _ref.internalApplyLink,
|
|
29
|
+
itemId = _ref.itemId,
|
|
30
|
+
item = _ref.item,
|
|
31
|
+
companyName = _ref.companyName;
|
|
32
|
+
var applyButton = function applyButton() {
|
|
33
|
+
return /*#__PURE__*/React.createElement(Button.Anchor, {
|
|
34
|
+
variant: applyButtonVariant,
|
|
35
|
+
size: buttonSize
|
|
36
|
+
}, applyText);
|
|
37
|
+
};
|
|
38
|
+
return /*#__PURE__*/React.createElement("nav", {
|
|
39
|
+
className: twMerge(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\t\thc-flex hc-flex-row hc-justify-between hc-gap-2 hc-w-full\n\t\t\t\t", "\n\t\t\t"])), className !== null && className !== void 0 ? className : '')
|
|
40
|
+
}, Link && /*#__PURE__*/React.createElement(Button.Link, {
|
|
41
|
+
Link: Link,
|
|
42
|
+
href: "/careers/".concat(item.id),
|
|
43
|
+
variant: detailsButtonVariant,
|
|
44
|
+
size: buttonSize
|
|
45
|
+
}, detailsText), navigateToDetails && /*#__PURE__*/React.createElement(Button.Anchor, {
|
|
46
|
+
href: "/careers/".concat(item.id),
|
|
47
|
+
onClick: function onClick(e) {
|
|
48
|
+
e.preventDefault();
|
|
49
|
+
navigateToDetails(item);
|
|
50
|
+
},
|
|
51
|
+
variant: detailsButtonVariant,
|
|
52
|
+
size: buttonSize
|
|
53
|
+
}, detailsText), detailsUrl && useDetailsPostMessage !== true && navigateToDetails === null && /*#__PURE__*/React.createElement(Button.Anchor, {
|
|
54
|
+
href: detailsUrl,
|
|
55
|
+
variant: detailsButtonVariant,
|
|
56
|
+
size: buttonSize
|
|
57
|
+
}, detailsText), useDetailsPostMessage === true && navigateToDetails === null && /*#__PURE__*/React.createElement(Button.Btn, {
|
|
58
|
+
onClick: function onClick() {
|
|
59
|
+
window.parent.postMessage({
|
|
60
|
+
itemId: itemId,
|
|
61
|
+
type: 'LISTING_ID'
|
|
62
|
+
}, '*');
|
|
63
|
+
},
|
|
64
|
+
variant: detailsButtonVariant,
|
|
65
|
+
size: buttonSize
|
|
66
|
+
}, detailsText), applyUrl && !includeDialog && navigateToEasyApply == null && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button.Anchor, {
|
|
67
|
+
href: applyUrl,
|
|
68
|
+
variant: applyButtonVariant,
|
|
69
|
+
size: buttonSize
|
|
70
|
+
}, applyText)), applyUrl && !includeDialog && navigateToEasyApply != null && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button.Btn, {
|
|
71
|
+
onClick: function onClick() {
|
|
72
|
+
navigateToEasyApply(item);
|
|
73
|
+
},
|
|
74
|
+
variant: applyButtonVariant,
|
|
75
|
+
size: buttonSize
|
|
76
|
+
}, applyText)), applyUrl && includeDialog && /*#__PURE__*/React.createElement(ApplyDialog, {
|
|
77
|
+
applyUrl: applyUrl,
|
|
78
|
+
internalApplyLink: internalApplyLink,
|
|
79
|
+
companyName: companyName
|
|
80
|
+
}, applyButton()));
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export { ButtonGroupApply as default };
|
|
84
|
+
//# sourceMappingURL=button-group-apply.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-group-apply.js","sources":["../../../../src/components/modules/buttons/button-group-apply.js"],"sourcesContent":["import React from 'react'\nimport { twMerge } from 'tailwind-merge';\n\nimport Button from '~/components/modules/buttons/default';\nimport ApplyDialog from '../dialogs/apply-dialog';\n\nconst ButtonGroupApply = ({\n\tapplyUrl,\n\tuseDetailsPostMessage,\n\tnavigateToDetails,\n\tnavigateToEasyApply,\n\tLink,\n\tapplyText = 'Apply Now',\n\tdetailsUrl,\n\tdetailsText = 'View Details',\n\tclassName,\n\tbuttonSize = 'default',\n\tapplyButtonVariant = 'primary',\n\tdetailsButtonVariant = 'outline',\n\tincludeDialog = false,\n\tinternalApplyLink,\n\titemId,\n\titem,\n\tcompanyName\n}) => {\n\tconst applyButton = () => {\n\t\treturn <Button.Anchor\n\t\t\tvariant={applyButtonVariant}\n\t\t\tsize={buttonSize}\n\t\t>\n\t\t\t{applyText}\n\t\t</Button.Anchor>;;\n\t};\n\n\treturn (\n\t\t<nav\n\t\t\tclassName={twMerge`\n\t\t\t\thc-flex hc-flex-row hc-justify-between hc-gap-2 hc-w-full\n\t\t\t\t${className ?? ''}\n\t\t\t`}\n\t\t>\n\t\t\t{Link &&\n\t\t\t\t<Button.Link\n\t\t\t\t\tLink={Link}\n\t\t\t\t\thref={`/careers/${item.id}`}\n\t\t\t\t\tvariant={detailsButtonVariant}\n\t\t\t\t\tsize={buttonSize}\n\t\t\t\t>\n\t\t\t\t\t{detailsText}\n\t\t\t\t</Button.Link>\n\t\t\t}\n\t\t\t{navigateToDetails &&\n\t\t\t\t<Button.Anchor\n\t\t\t\t\thref={`/careers/${item.id}`}\n\t\t\t\t\tonClick={e => {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tnavigateToDetails(item);\n\t\t\t\t\t}}\n\t\t\t\t\tvariant={detailsButtonVariant}\n\t\t\t\t\tsize={buttonSize}\n\t\t\t\t>\n\t\t\t\t\t{detailsText}\n\t\t\t\t</Button.Anchor>\n\t\t\t}\n\t\t\t{detailsUrl && useDetailsPostMessage !== true && navigateToDetails === null &&\n\t\t\t\t<Button.Anchor\n\t\t\t\t\thref={detailsUrl}\n\t\t\t\t\tvariant={detailsButtonVariant}\n\t\t\t\t\tsize={buttonSize}\n\t\t\t\t>\n\t\t\t\t\t{detailsText}\n\t\t\t\t</Button.Anchor>\n\t\t\t}\n\t\t\t{useDetailsPostMessage === true && navigateToDetails === null &&\n\t\t\t\t<Button.Btn\n\t\t\t\t\tonClick={() => { window.parent.postMessage({ itemId: itemId, type: 'LISTING_ID' }, '*'); }}\n\t\t\t\t\tvariant={detailsButtonVariant}\n\t\t\t\t\tsize={buttonSize}\n\t\t\t\t>\n\t\t\t\t\t{detailsText}\n\t\t\t\t</Button.Btn>}\n\t\t\t{applyUrl && !includeDialog && navigateToEasyApply == null &&\n\t\t\t\t<>\n\t\t\t\t\t<Button.Anchor\n\t\t\t\t\t\thref={applyUrl}\n\t\t\t\t\t\tvariant={applyButtonVariant}\n\t\t\t\t\t\tsize={buttonSize}\n\t\t\t\t\t>\n\t\t\t\t\t\t{applyText}\n\t\t\t\t\t</Button.Anchor>\n\t\t\t\t</>\n\t\t\t}\n\t\t\t{applyUrl && !includeDialog && navigateToEasyApply != null &&\n\t\t\t\t<>\n\t\t\t\t\t<Button.Btn\n\t\t\t\t\t\tonClick={() => { navigateToEasyApply(item) }}\n\t\t\t\t\t\tvariant={applyButtonVariant}\n\t\t\t\t\t\tsize={buttonSize}\n\t\t\t\t\t>\n\t\t\t\t\t\t{applyText}\n\t\t\t\t\t</Button.Btn>\n\t\t\t\t</>\n\t\t\t}\n\t\t\t{applyUrl && includeDialog &&\n\t\t\t\t<ApplyDialog applyUrl={applyUrl} internalApplyLink={internalApplyLink} companyName={companyName}>\n\t\t\t\t\t{applyButton()}\n\t\t\t\t</ApplyDialog>\n\t\t\t}\n\t\t</nav>\n\t);\n};\n\nexport default ButtonGroupApply;\n"],"names":["ButtonGroupApply","_ref","applyUrl","useDetailsPostMessage","navigateToDetails","navigateToEasyApply","Link","_ref$applyText","applyText","detailsUrl","_ref$detailsText","detailsText","className","_ref$buttonSize","buttonSize","_ref$applyButtonVaria","applyButtonVariant","_ref$detailsButtonVar","detailsButtonVariant","_ref$includeDialog","includeDialog","internalApplyLink","itemId","item","companyName","applyButton","React","createElement","Button","Anchor","variant","size","twMerge","_templateObject","_taggedTemplateLiteral","href","concat","id","onClick","e","preventDefault","Btn","window","parent","postMessage","type","Fragment","ApplyDialog"],"mappings":";;;;;;;AAMA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,EAkBhB;AAAA,EAAA,IAjBLC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,qBAAqB,GAAAF,IAAA,CAArBE,qBAAqB;IACrBC,iBAAiB,GAAAH,IAAA,CAAjBG,iBAAiB;IACjBC,mBAAmB,GAAAJ,IAAA,CAAnBI,mBAAmB;IACnBC,IAAI,GAAAL,IAAA,CAAJK,IAAI;IAAAC,cAAA,GAAAN,IAAA,CACJO,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,WAAW,GAAAA,cAAA;IACvBE,UAAU,GAAAR,IAAA,CAAVQ,UAAU;IAAAC,gBAAA,GAAAT,IAAA,CACVU,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,cAAc,GAAAA,gBAAA;IAC5BE,SAAS,GAAAX,IAAA,CAATW,SAAS;IAAAC,eAAA,GAAAZ,IAAA,CACTa,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,eAAA;IAAAE,qBAAA,GAAAd,IAAA,CACtBe,kBAAkB;AAAlBA,IAAAA,kBAAkB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,qBAAA;IAAAE,qBAAA,GAAAhB,IAAA,CAC9BiB,oBAAoB;AAApBA,IAAAA,oBAAoB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,qBAAA;IAAAE,kBAAA,GAAAlB,IAAA,CAChCmB,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,kB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AA,CAAAoB,QAAA,EAAA,IAAA,eACCpB,KAAA,CAAAC,aAAA,CAACC,MAAM,CAACa,GAAG,EAAA;IACVH,OAAO,EAAE,SAAAA,OAAAA,GAAM;MAAEjC,mBAAmB,CAACkB,IAAI,CAAC,CAAA;KAAG;AAC7CO,IAAAA,OAAO,EAAEd,kBAAmB;AAC5Be,IAAAA,IAAI,EAAEjB,UAAAA;AAAW,GAAA,EAEhBN,SACU,CACX,CAAC,EAEHN,QAAQ,IAAIkB,aAAa,iBACzBM,KAAA,CAAAC,aAAA,CAACoB,WAAW,EAAA;AAAC7C,IAAAA,QAAQ,EAAEA,QAAS;AAACmB,IAAAA,iBAAiB,EAAEA,iBAAkB;AAACG,IAAAA,WAAW,EAAEA,WAAAA;AAAY,GAAA,EAC9FC,WAAW,EACA,CAEV,CAAC,CAAA;AAER;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import IconContained from '../icon.js';
|
|
3
|
+
import { PillWrapper } from './pill-wrapper.js';
|
|
4
|
+
|
|
5
|
+
var CommutePill = function CommutePill(_ref) {
|
|
6
|
+
var travelTime = _ref.travelTime;
|
|
7
|
+
if (!travelTime) return;
|
|
8
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
9
|
+
className: "pt-2"
|
|
10
|
+
}, /*#__PURE__*/React.createElement(PillWrapper, null, /*#__PURE__*/React.createElement(IconContained, {
|
|
11
|
+
icon: "ri:pin-distance-fill",
|
|
12
|
+
size: "hc-size-5",
|
|
13
|
+
className: "hc-text-uiAccent/30"
|
|
14
|
+
}), "commute time = ", travelTime));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { CommutePill as default };
|
|
18
|
+
//# sourceMappingURL=commute-pill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commute-pill.js","sources":["../../../../src/components/modules/buttons/commute-pill.js"],"sourcesContent":["import React from 'react';\n\nimport Icon from '~/components/modules/icon';\nimport PillWrapper from '~/components/modules/buttons/pill-wrapper';\n\nconst CommutePill = ({ travelTime }) => {\n\tif (!travelTime) return;\n\treturn (\n\t\t<div className=\"pt-2\">\n\t\t\t<PillWrapper >\n\t\t\t\t<Icon\n\t\t\t\t\ticon=\"ri:pin-distance-fill\"\n\t\t\t\t\tsize=\"hc-size-5\"\n\t\t\t\t\tclassName=\"hc-text-uiAccent/30\"\n\t\t\t\t/>\n\t\t\t\tcommute time = {travelTime}\n\t\t\t</PillWrapper>\n\t\t</div>\n\t);\n};\n\nexport default CommutePill;\n"],"names":["CommutePill","_ref","travelTime","React","createElement","className","PillWrapper","Icon","icon","size"],"mappings":";;;;AAKA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAAuB;AAAA,EAAA,IAAjBC,UAAU,GAAAD,IAAA,CAAVC,UAAU,CAAA;EAChC,IAAI,CAACA,UAAU,EAAE,OAAA;EACjB,oBACCC,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,MAAA;GACdF,eAAAA,KAAA,CAAAC,aAAA,CAACE,WAAW,qBACXH,KAAA,CAAAC,aAAA,CAACG,aAAI,EAAA;AACJC,IAAAA,IAAI,EAAC,sBAAsB;AAC3BC,IAAAA,IAAI,EAAC,WAAW;AAChBJ,IAAAA,SAAS,EAAC,qBAAA;AAAqB,GAC/B,CAAC,EAAA,iBACa,EAACH,UACJ,CACT,CAAC,CAAA;AAER;;;;"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
import { Link } from 'react-router-dom';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import IconContained from '../icon.js';
|
|
6
|
+
|
|
7
|
+
var _excluded = ["children", "href", "className", "size", "variant", "isBlock", "hasUnderline", "target"],
|
|
8
|
+
_excluded2 = ["children", "Link", "href", "className", "activeClassName", "partiallyActive", "size", "variant", "isBlock", "hasUnderline"],
|
|
9
|
+
_excluded3 = ["children", "href", "className", "size", "variant", "isBlock", "hasUnderline"],
|
|
10
|
+
_excluded4 = ["children", "type", "className", "size", "variant", "isBlock", "hasUnderline"];
|
|
11
|
+
var linkDefaultClasses = "hc-normal-case hc-text-inherit !hc-font-[inherit] hc-[font-weight:inherit] !hc-p-0 hc-rounded-none";
|
|
12
|
+
var underlineClasses = "!underline decoration-1 underline-offset-2 hover:!no-underline focus:!no-underline";
|
|
13
|
+
var ButtonVariant = {
|
|
14
|
+
none: '',
|
|
15
|
+
primary: 'hc-bg-primary hc-border hc-border-primary hc-text-white hover:hc-bg-opacity-70 focus:hc-bg-opacity-70',
|
|
16
|
+
secondary: 'hc-bg-secondary hc-border hc-border-secondary hc-text-white hover:hc-bg-opacity-70 focus:hc-bg-opacity-70',
|
|
17
|
+
outline: 'hc-bg-transparent hc-border hc-border-primary hc-text-primary hover:hc-bg-primaryDark hover:hc-border-primaryDark hover:hc-text-white focus:hc-bg-primaryDark focus:hc-border-primaryDark focus:hc-text-white',
|
|
18
|
+
link: "".concat(linkDefaultClasses, " hc-text-primary hover:hc-text-uiText focus:hc-text-uiText"),
|
|
19
|
+
icon: 'hc-opacity-100 hover:hc-opacity-70 focus:hc-opacity-70'
|
|
20
|
+
};
|
|
21
|
+
var ButtonSize = {
|
|
22
|
+
none: '',
|
|
23
|
+
"default": 'hc-py-2 hc-px-6 hc-text-base',
|
|
24
|
+
sq: 'hc-p-2.5',
|
|
25
|
+
sqsm: 'hc-p-1',
|
|
26
|
+
xs: 'hc-py-1.5 hc-px-3 hc-text-xs',
|
|
27
|
+
sm: 'hc-py-1.5 hc-px-4 hc-text-sm',
|
|
28
|
+
lg: 'hc-py-4 hc-px-10 hc-text-lg'
|
|
29
|
+
};
|
|
30
|
+
var ButtonDefaults = {
|
|
31
|
+
style: 'hc-group hc-font-medium hc-uppercase hc-text-center hc-rounded hc-transition',
|
|
32
|
+
size: ButtonSize["default"],
|
|
33
|
+
variant: ButtonVariant.primary,
|
|
34
|
+
block: 'hc-block hc-w-full'
|
|
35
|
+
};
|
|
36
|
+
var linkVariants = function linkVariants(variant) {
|
|
37
|
+
return variant === 'link';
|
|
38
|
+
};
|
|
39
|
+
var buttonClasses = function buttonClasses(variant, size, isBlock, hasUnderline, className) {
|
|
40
|
+
return twMerge(isBlock ? ButtonDefaults.block : linkVariants(variant) ? 'hc-inline' : 'hc-inline-block', ButtonDefaults.style, variant ? ButtonVariant[variant] : ButtonDefaults.variant, size ? ButtonSize[size] : ButtonDefaults.size, hasUnderline ? underlineClasses : '', className !== null && className !== void 0 ? className : '');
|
|
41
|
+
};
|
|
42
|
+
var Button = function Button(_ref) {
|
|
43
|
+
var children = _ref.children;
|
|
44
|
+
return {
|
|
45
|
+
children: children
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
var Anchor = function Anchor(_ref2) {
|
|
49
|
+
var children = _ref2.children,
|
|
50
|
+
href = _ref2.href,
|
|
51
|
+
className = _ref2.className,
|
|
52
|
+
size = _ref2.size,
|
|
53
|
+
variant = _ref2.variant,
|
|
54
|
+
isBlock = _ref2.isBlock,
|
|
55
|
+
hasUnderline = _ref2.hasUnderline,
|
|
56
|
+
_ref2$target = _ref2.target,
|
|
57
|
+
target = _ref2$target === void 0 ? '_blank' : _ref2$target,
|
|
58
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
59
|
+
return /*#__PURE__*/React.createElement("a", _extends({
|
|
60
|
+
href: href,
|
|
61
|
+
target: target,
|
|
62
|
+
className: buttonClasses(variant, size, isBlock, hasUnderline, className),
|
|
63
|
+
onClick: href === '#' ? function (e) {
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
} : null
|
|
66
|
+
}, rest), children);
|
|
67
|
+
};
|
|
68
|
+
var AnchorLink = function AnchorLink(_ref3) {
|
|
69
|
+
var children = _ref3.children,
|
|
70
|
+
Link = _ref3.Link,
|
|
71
|
+
href = _ref3.href,
|
|
72
|
+
className = _ref3.className;
|
|
73
|
+
_ref3.activeClassName;
|
|
74
|
+
_ref3.partiallyActive;
|
|
75
|
+
var size = _ref3.size,
|
|
76
|
+
variant = _ref3.variant,
|
|
77
|
+
isBlock = _ref3.isBlock,
|
|
78
|
+
hasUnderline = _ref3.hasUnderline,
|
|
79
|
+
rest = _objectWithoutProperties(_ref3, _excluded2);
|
|
80
|
+
return /*#__PURE__*/React.createElement(Link, _extends({
|
|
81
|
+
href: href,
|
|
82
|
+
className: "\n\t\t\t\t".concat(buttonClasses(variant, size, isBlock, hasUnderline, className), "\n\t\t\t")
|
|
83
|
+
}, rest), children);
|
|
84
|
+
};
|
|
85
|
+
var ScrollAnchor = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
86
|
+
var children = props.children,
|
|
87
|
+
href = props.href,
|
|
88
|
+
className = props.className,
|
|
89
|
+
size = props.size,
|
|
90
|
+
variant = props.variant,
|
|
91
|
+
isBlock = props.isBlock,
|
|
92
|
+
hasUnderline = props.hasUnderline,
|
|
93
|
+
rest = _objectWithoutProperties(props, _excluded3);
|
|
94
|
+
return /*#__PURE__*/React.createElement(Link, _extends({
|
|
95
|
+
ref: ref,
|
|
96
|
+
href: "#".concat(href),
|
|
97
|
+
scroll: false,
|
|
98
|
+
className: buttonClasses(variant, size, isBlock, hasUnderline, className)
|
|
99
|
+
}, rest), children);
|
|
100
|
+
});
|
|
101
|
+
var Btn = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
102
|
+
var children = props.children,
|
|
103
|
+
_props$type = props.type,
|
|
104
|
+
type = _props$type === void 0 ? 'button' : _props$type,
|
|
105
|
+
className = props.className,
|
|
106
|
+
size = props.size,
|
|
107
|
+
variant = props.variant,
|
|
108
|
+
isBlock = props.isBlock,
|
|
109
|
+
hasUnderline = props.hasUnderline,
|
|
110
|
+
rest = _objectWithoutProperties(props, _excluded4);
|
|
111
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
|
112
|
+
ref: ref,
|
|
113
|
+
type: type,
|
|
114
|
+
className: buttonClasses(variant, size, isBlock, hasUnderline, className)
|
|
115
|
+
}, rest), children);
|
|
116
|
+
});
|
|
117
|
+
var ButtonBody = function ButtonBody(_ref4) {
|
|
118
|
+
var children = _ref4.children,
|
|
119
|
+
className = _ref4.className;
|
|
120
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
121
|
+
className: twMerge('hc-inline-flex hc-w-full hc-items-center hc-justify-between hc-gap-1.5', className !== null && className !== void 0 ? className : '')
|
|
122
|
+
}, children);
|
|
123
|
+
};
|
|
124
|
+
var ButtonIcon = function ButtonIcon(_ref5) {
|
|
125
|
+
var icon = _ref5.icon,
|
|
126
|
+
_ref5$size = _ref5.size,
|
|
127
|
+
size = _ref5$size === void 0 ? 'hc-size-4' : _ref5$size,
|
|
128
|
+
className = _ref5.className;
|
|
129
|
+
return /*#__PURE__*/React.createElement(IconContained, {
|
|
130
|
+
icon: icon,
|
|
131
|
+
size: size,
|
|
132
|
+
className: className !== null && className !== void 0 ? className : ''
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
Button.Anchor = Anchor;
|
|
136
|
+
Button.Link = AnchorLink;
|
|
137
|
+
Button.Scroll = ScrollAnchor;
|
|
138
|
+
Button.Btn = Btn;
|
|
139
|
+
Button.Body = ButtonBody;
|
|
140
|
+
Button.Icon = ButtonIcon;
|
|
141
|
+
Btn.displayName = 'Button:Button';
|
|
142
|
+
ScrollAnchor.displayName = 'Button:ScrollAnchor';
|
|
143
|
+
|
|
144
|
+
export { Anchor, AnchorLink, Btn, ButtonBody, ButtonIcon, ScrollAnchor, Button as default };
|
|
145
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.js","sources":["../../../../src/components/modules/buttons/default.js"],"sourcesContent":["import React from 'react'\nimport { forwardRef } from 'react';\nimport { Link } from 'react-router-dom';\nimport { twMerge } from 'tailwind-merge';\n\nimport Icon from '~/components/modules/icon';\n\nconst linkDefaultClasses = \"hc-normal-case hc-text-inherit !hc-font-[inherit] hc-[font-weight:inherit] !hc-p-0 hc-rounded-none\";\nconst underlineClasses = \"!underline decoration-1 underline-offset-2 hover:!no-underline focus:!no-underline\";\n\nconst ButtonVariant = {\n\tnone: '',\n\tprimary: 'hc-bg-primary hc-border hc-border-primary hc-text-white hover:hc-bg-opacity-70 focus:hc-bg-opacity-70',\n\tsecondary: 'hc-bg-secondary hc-border hc-border-secondary hc-text-white hover:hc-bg-opacity-70 focus:hc-bg-opacity-70',\n\toutline: 'hc-bg-transparent hc-border hc-border-primary hc-text-primary hover:hc-bg-primaryDark hover:hc-border-primaryDark hover:hc-text-white focus:hc-bg-primaryDark focus:hc-border-primaryDark focus:hc-text-white',\n\tlink: `${linkDefaultClasses} hc-text-primary hover:hc-text-uiText focus:hc-text-uiText`,\n\ticon: 'hc-opacity-100 hover:hc-opacity-70 focus:hc-opacity-70'\n};\n\nconst ButtonSize = {\n\tnone: '',\n\tdefault: 'hc-py-2 hc-px-6 hc-text-base',\n\tsq: 'hc-p-2.5',\n\tsqsm: 'hc-p-1',\n\txs: 'hc-py-1.5 hc-px-3 hc-text-xs',\n\tsm: 'hc-py-1.5 hc-px-4 hc-text-sm',\n\tlg: 'hc-py-4 hc-px-10 hc-text-lg'\n};\n\nconst ButtonDefaults = {\n\tstyle: 'hc-group hc-font-medium hc-uppercase hc-text-center hc-rounded hc-transition',\n\tsize: ButtonSize.default,\n\tvariant: ButtonVariant.primary,\n\tblock: 'hc-block hc-w-full'\n};\n\nconst linkVariants = variant => variant === 'link';\n\nconst buttonClasses = (variant, size, isBlock, hasUnderline, className) => twMerge(\n\tisBlock ? ButtonDefaults.block : linkVariants(variant) ? 'hc-inline' : 'hc-inline-block',\n\tButtonDefaults.style,\n\tvariant ? ButtonVariant[variant] : ButtonDefaults.variant,\n\tsize ? ButtonSize[size] : ButtonDefaults.size,\n\thasUnderline ? underlineClasses : '',\n\tclassName ?? ''\n);\n\nconst Button = ({\n\tchildren\n}) => {\n\treturn (\n\t\t{ children }\n\t);\n};\n\nexport const Anchor = ({\n\tchildren,\n\thref,\n\tclassName,\n\tsize,\n\tvariant,\n\tisBlock,\n\thasUnderline,\n\ttarget = '_blank',\n\t...rest\n}) => {\n\treturn (\n\t\t<a\n\t\t\thref={href}\n\t\t\ttarget={target}\n\t\t\tclassName={buttonClasses(variant, size, isBlock, hasUnderline, className)}\n\t\t\tonClick={href === '#' ? e => {\n\t\t\t\te.preventDefault();\n\t\t\t} : null}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</a>\n\t);\n};\n\nexport const AnchorLink = ({\n\tchildren,\n\tLink,\n\thref,\n\tclassName,\n\tactiveClassName,\n\tpartiallyActive = false,\n\tsize,\n\tvariant,\n\tisBlock,\n\thasUnderline,\n\t...rest\n}) => {\n\treturn (\n\t\t<Link\n\t\t\thref={href}\n\t\t\tclassName={`\n\t\t\t\t${buttonClasses(variant, size, isBlock, hasUnderline, className)}\n\t\t\t`}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</Link>\n\t);\n};\n\nexport const ScrollAnchor = forwardRef((props, ref) => {\n\tconst {\n\t\tchildren,\n\t\thref,\n\t\tclassName,\n\t\tsize,\n\t\tvariant,\n\t\tisBlock,\n\t\thasUnderline,\n\t\t...rest\n\t} = props;\n\n\treturn (\n\t\t<Link\n\t\t\tref={ref}\n\t\t\thref={`#${href}`}\n\t\t\tscroll={false}\n\t\t\tclassName={buttonClasses(variant, size, isBlock, hasUnderline, className)}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</Link>\n\t);\n});\n\nexport const Btn = forwardRef((props, ref) => {\n\tconst {\n\t\tchildren,\n\t\ttype = 'button',\n\t\tclassName,\n\t\tsize,\n\t\tvariant,\n\t\tisBlock,\n\t\thasUnderline,\n\t\t...rest\n\t} = props;\n\treturn (\n\t\t<button\n\t\t\tref={ref}\n\t\t\ttype={type}\n\t\t\tclassName={buttonClasses(variant, size, isBlock, hasUnderline, className)}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</button>\n\t);\n});\n\nexport const ButtonBody = ({\n\tchildren,\n\tclassName\n}) => {\n\treturn (\n\t\t<span\n\t\t\tclassName={twMerge(\n\t\t\t\t'hc-inline-flex hc-w-full hc-items-center hc-justify-between hc-gap-1.5',\n\t\t\t\tclassName ?? ''\n\t\t\t)}\n\t\t>\n\t\t\t{children}\n\t\t</span>\n\t);\n};\n\nexport const ButtonIcon = ({\n\ticon,\n\tsize = 'hc-size-4',\n\tclassName\n}) => {\n\treturn (\n\t\t<Icon\n\n\t\t\ticon={icon}\n\t\t\tsize={size}\n\t\t\tclassName={className ?? ''}\n\t\t/>\n\t);\n};\n\nButton.Anchor = Anchor;\nButton.Link = AnchorLink;\nButton.Scroll = ScrollAnchor;\nButton.Btn = Btn;\nButton.Body = ButtonBody;\nButton.Icon = ButtonIcon;\n\nBtn.displayName = 'Button:Button';\nScrollAnchor.displayName = 'Button:ScrollAnchor';\nexport default Button;\n"],"names":["linkDefaultClasses","underlineClasses","ButtonVariant","none","primary","secondary","outline","link","concat","icon","ButtonSize","sq","sqsm","xs","sm","lg","ButtonDefaults","style","size","variant","block","linkVariants","buttonClasses","isBlock","hasUnderline","className","twMerge","Button","_ref","children","Anchor","_ref2","href","_ref2$target","target","rest","_objectWithoutProperties","_excluded","React","createElement","_extends","onClick","e","preventDefault","AnchorLink","_ref3","Link","activeClassName","partiallyActive","_excluded2","ScrollAnchor","forwardRef","props","ref","_excluded3","scroll","Btn","_props$type","type","_excluded4","ButtonBody","_ref4","ButtonIcon","_ref5","_ref5$size","Icon","Scroll","Body","displayName"],"mappings":";;;;;;;;;;AAOA,IAAMA,kBAAkB,GAAG,oGAAoG,CAAA;AAC/H,IAAMC,gBAAgB,GAAG,oFAAoF,CAAA;AAE7G,IAAMC,aAAa,GAAG;AACrBC,EAAAA,IAAI,EAAE,EAAE;AAC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M,CAACwC,IAAI,GAAGP,UAAU,CAAA;AACxBjC,MAAM,CAACsC,IAAI,GAAGH,UAAU,CAAA;AAExBN,GAAG,CAACY,WAAW,GAAG,eAAe,CAAA;AACjClB,YAAY,CAACkB,WAAW,GAAG,qBAAqB;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
import Button from './default.js';
|
|
4
|
+
|
|
5
|
+
var _excluded = ["className", "activeItemsCount"];
|
|
6
|
+
var ButtonItemsPill = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
7
|
+
_ref.className;
|
|
8
|
+
var activeItemsCount = _ref.activeItemsCount,
|
|
9
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
10
|
+
return /*#__PURE__*/React.createElement(Button.Btn, _extends({
|
|
11
|
+
ref: ref,
|
|
12
|
+
size: "none",
|
|
13
|
+
variant: "none",
|
|
14
|
+
className: "hc-relative hc-z-[2] hc-group hc-inline-flex hc-items-center hc-gap-px hc-ml-auto hc-mr-1.5 hc-pl-1.5 hc-pr-1 hc-py-0.5 hc-rounded hc-bg-primary/10 hc-text-xs hc-font-bold hc-text-primary hc-ring-1 hc-ring-inset hc-ring-primary/20"
|
|
15
|
+
}, props), activeItemsCount > 9 ? '9+' : activeItemsCount, /*#__PURE__*/React.createElement(Button.Icon, {
|
|
16
|
+
icon: "uil:times",
|
|
17
|
+
size: "hc-size-3.5"
|
|
18
|
+
}));
|
|
19
|
+
});
|
|
20
|
+
ButtonItemsPill.displayName = 'ButtonItemsPill';
|
|
21
|
+
|
|
22
|
+
export { ButtonItemsPill, ButtonItemsPill as default };
|
|
23
|
+
//# sourceMappingURL=items-pill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"items-pill.js","sources":["../../../../src/components/modules/buttons/items-pill.js"],"sourcesContent":["import React from 'react'\nimport { forwardRef } from 'react';\n\nimport Button from '~/components/modules/buttons/default';\n\nexport const ButtonItemsPill = forwardRef((\n\t{\n\t\tclassName,\n\t\tactiveItemsCount,\n\t\t...props\n\t},\n\tref\n) => {\n\treturn (\n\t\t<Button.Btn\n\t\t\tref={ref}\n\t\t\tsize=\"none\"\n\t\t\tvariant=\"none\"\n\t\t\tclassName=\"hc-relative hc-z-[2] hc-group hc-inline-flex hc-items-center hc-gap-px hc-ml-auto hc-mr-1.5 hc-pl-1.5 hc-pr-1 hc-py-0.5 hc-rounded hc-bg-primary/10 hc-text-xs hc-font-bold hc-text-primary hc-ring-1 hc-ring-inset hc-ring-primary/20\"\n\t\t\t{...props}\n\t\t>\n\t\t\t{activeItemsCount > 9 ? '9+' : activeItemsCount}\n\t\t\t<Button.Icon\n\t\t\t\ticon=\"uil:times\"\n\t\t\t\tsize=\"hc-size-3.5\"\n\t\t\t/>\n\t\t</Button.Btn>\n\t);\n});\n\nButtonItemsPill.displayName = 'ButtonItemsPill';\nexport default ButtonItemsPill;\n"],"names":["ButtonItemsPill","forwardRef","_ref","ref","className","activeItemsCount","props","_objectWithoutProperties","_excluded","React","createElement","Button","Btn","_extends","size","variant","Icon","icon","displayName"],"mappings":";;;;;AAKO,IAAMA,eAAe,gBAAGC,UAAU,CAAC,UAAAC,IAAA,EAMzCC,GAAG,EACC;AAAA,EALMD,IAAA,CAATE,SAAS,CAAA;QACTC,gBAAgB,GAAAH,IAAA,CAAhBG,gBAAgB,CAAA;AACbC,IAAAA,KAAK,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA,EAAA;EAIT,oBACCC,KAAA,CAAAC,aAAA,CAACC,MAAM,CAACC,GAAG,EAAAC,QAAA,CAAA;AACVV,IAAAA,GAAG,EAAEA,GAAI;AACTW,IAAAA,IAAI,EAAC,MAAM;AACXC,IAAAA,OAAO,EAAC,MAAM;AACdX,IAAAA,SAAS,EAAC,wOAAA;AAAwO,GAAA,EAC9OE,KAAK,CAERD,EAAAA,gBAAgB,GAAG,CAAC,GAAG,IAAI,GAAGA,gBAAgB,eAC/CI,KAAA,CAAAC,aAAA,CAACC,MAAM,CAACK,IAAI,EAAA;AACXC,IAAAA,IAAI,EAAC,WAAW;AAChBH,IAAAA,IAAI,EAAC,aAAA;AAAa,GAClB,CACU,CAAC,CAAA;AAEf,CAAC,EAAC;AAEFd,eAAe,CAACkB,WAAW,GAAG,iBAAiB;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
import Button from './default.js';
|
|
4
|
+
|
|
5
|
+
var _excluded = ["className", "children"];
|
|
6
|
+
var PillWrapper = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
7
|
+
var className = _ref.className,
|
|
8
|
+
children = _ref.children,
|
|
9
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
10
|
+
return /*#__PURE__*/React.createElement(Button.Btn, _extends({
|
|
11
|
+
ref: ref,
|
|
12
|
+
size: "none",
|
|
13
|
+
variant: "none",
|
|
14
|
+
className: "hc-relative hc-group hc-inline-flex hc-items-center hc-gap-px hc-ml-auto hc-mr-1.5 hc-pl-1.5 hc-pr-1 hc-py-0.5 hc-rounded hc-bg-primary/10 hc-text-xs hc-font-bold hc-text-primary hc-ring-1 hc-ring-inset hc-ring-primary/20 ".concat(className)
|
|
15
|
+
}, props), children);
|
|
16
|
+
});
|
|
17
|
+
PillWrapper.displayName = 'PillWrapper';
|
|
18
|
+
|
|
19
|
+
export { PillWrapper, PillWrapper as default };
|
|
20
|
+
//# sourceMappingURL=pill-wrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pill-wrapper.js","sources":["../../../../src/components/modules/buttons/pill-wrapper.js"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport Button from '~/components/modules/buttons/default';\n\nexport const PillWrapper = forwardRef((\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\t...props\n\t},\n\tref\n) => {\n\treturn (\n\t\t<Button.Btn\n\t\t\tref={ref}\n\t\t\tsize=\"none\"\n\t\t\tvariant=\"none\"\n\t\t\tclassName={`hc-relative hc-group hc-inline-flex hc-items-center hc-gap-px hc-ml-auto hc-mr-1.5 hc-pl-1.5 hc-pr-1 hc-py-0.5 hc-rounded hc-bg-primary/10 hc-text-xs hc-font-bold hc-text-primary hc-ring-1 hc-ring-inset hc-ring-primary/20 ${className}`}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</Button.Btn>\n\t);\n});\n\nPillWrapper.displayName = 'PillWrapper';\nexport default PillWrapper;\n"],"names":["PillWrapper","forwardRef","_ref","ref","className","children","props","_objectWithoutProperties","_excluded","React","createElement","Button","Btn","_extends","size","variant","concat","displayName"],"mappings":";;;;;AAIO,IAAMA,WAAW,gBAAGC,UAAU,CAAC,UAAAC,IAAA,EAMrCC,GAAG,EACC;AAAA,EAAA,IALHC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;AACLC,IAAAA,KAAK,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA,CAAA,CAAA;EAIT,oBACCC,KAAA,CAAAC,aAAA,CAACC,MAAM,CAACC,GAAG,EAAAC,QAAA,CAAA;AACVV,IAAAA,GAAG,EAAEA,GAAI;AACTW,IAAAA,IAAI,EAAC,MAAM;AACXC,IAAAA,OAAO,EAAC,MAAM;IACdX,SAAS,EAAA,gOAAA,CAAAY,MAAA,CAAmOZ,SAAS,CAAA;GACjPE,EAAAA,KAAK,CAERD,EAAAA,QACU,CAAC,CAAA;AAEf,CAAC,EAAC;AAEFL,WAAW,CAACiB,WAAW,GAAG,aAAa;;;;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
var ShowAllButton = function ShowAllButton(_ref) {
|
|
4
|
+
var mapInteracted = _ref.mapInteracted,
|
|
5
|
+
markerConfigs = _ref.markerConfigs,
|
|
6
|
+
setMapInteracted = _ref.setMapInteracted,
|
|
7
|
+
fitBounds = _ref.fitBounds,
|
|
8
|
+
mapRef = _ref.mapRef,
|
|
9
|
+
pinIconUrl = _ref.pinIconUrl,
|
|
10
|
+
setSelectedFilters = _ref.setSelectedFilters,
|
|
11
|
+
setQuery = _ref.setQuery,
|
|
12
|
+
listingCount = _ref.listingCount;
|
|
13
|
+
if (!mapInteracted || !markerConfigs) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
17
|
+
style: {
|
|
18
|
+
fontFamily: 'Roboto, Arial, sans-serif',
|
|
19
|
+
fontSize: '14px',
|
|
20
|
+
fontWeight: '500'
|
|
21
|
+
},
|
|
22
|
+
className: "hc-absolute hc-bottom-10 hc-left-2.5 hc-z-10 hc-flex hc-items-center hc-justify-center hc-pl-2 hc-pb-1 hc-pt-1.5 hc-pr-3 hc-bg-white hc-text-black hc-border-none hc-rounded-full hc-shadow hc-cursor-pointer hc-text-sm hc-font-medium",
|
|
23
|
+
onClick: function onClick() {
|
|
24
|
+
setMapInteracted(false);
|
|
25
|
+
fitBounds(mapRef.current, true);
|
|
26
|
+
if (listingCount < 2) {
|
|
27
|
+
setSelectedFilters({});
|
|
28
|
+
setQuery(null);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
32
|
+
src: pinIconUrl,
|
|
33
|
+
alt: "Pin Icon",
|
|
34
|
+
className: "hc-size-5"
|
|
35
|
+
}), "Show All");
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { ShowAllButton as default };
|
|
39
|
+
//# sourceMappingURL=show-all-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show-all-button.js","sources":["../../../../src/components/modules/buttons/show-all-button.js"],"sourcesContent":["import React from 'react';\n\nconst ShowAllButton = ({ mapInteracted, markerConfigs, setMapInteracted, fitBounds, mapRef, pinIconUrl, setSelectedFilters, setQuery, listingCount }) => {\n\tif (!mapInteracted || !markerConfigs) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<button\n\t\t\tstyle={{ fontFamily: 'Roboto, Arial, sans-serif', fontSize: '14px', fontWeight: '500' }}\n\t\t\tclassName=\"hc-absolute hc-bottom-10 hc-left-2.5 hc-z-10 hc-flex hc-items-center hc-justify-center hc-pl-2 hc-pb-1 hc-pt-1.5 hc-pr-3 hc-bg-white hc-text-black hc-border-none hc-rounded-full hc-shadow hc-cursor-pointer hc-text-sm hc-font-medium\"\n\t\t\tonClick={() => { setMapInteracted(false); fitBounds(mapRef.current, true); if (listingCount < 2) { setSelectedFilters({}); setQuery(null); }; }}\n\t\t>\n\t\t\t<img src={pinIconUrl} alt=\"Pin Icon\" className=\"hc-size-5\" />\n\t\t\tShow All\n\t\t</button>\n\t);\n};\n\nexport default ShowAllButton;\n"],"names":["ShowAllButton","_ref","mapInteracted","markerConfigs","setMapInteracted","fitBounds","mapRef","pinIconUrl","setSelectedFilters","setQuery","listingCount","React","createElement","style","fontFamily","fontSize","fontWeight","className","onClick","current","src","alt"],"mappings":";;AAEA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAAsI;AAAA,EAAA,IAAhIC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IAAEC,aAAa,GAAAF,IAAA,CAAbE,aAAa;IAAEC,gBAAgB,GAAAH,IAAA,CAAhBG,gBAAgB;IAAEC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IAAEC,MAAM,GAAAL,IAAA,CAANK,MAAM;IAAEC,UAAU,GAAAN,IAAA,CAAVM,UAAU;IAAEC,kBAAkB,GAAAP,IAAA,CAAlBO,kBAAkB;IAAEC,QAAQ,GAAAR,IAAA,CAARQ,QAAQ;IAAEC,YAAY,GAAAT,IAAA,CAAZS,YAAY,CAAA;AACjJ,EAAA,IAAI,CAACR,aAAa,IAAI,CAACC,aAAa,EAAE;AACrC,IAAA,OAAO,IAAI,CAAA;AACZ,GAAA;EAEA,oBACCQ,KAAA,CAAAC,aAAA,CAAA,QAAA,EAAA;AACCC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,UAAU,EAAE,2BAA2B;AAAEC,MAAAA,QAAQ,EAAE,MAAM;AAAEC,MAAAA,UAAU,EAAE,KAAA;KAAQ;AACxFC,IAAAA,SAAS,EAAC,yOAAyO;IACnPC,OAAO,EAAE,SAAAA,OAAAA,GAAM;MAAEd,gBAAgB,CAAC,KAAK,CAAC,CAAA;AAAEC,MAAAA,SAAS,CAACC,MAAM,CAACa,OAAO,EAAE,IAAI,CAAC,CAAA;MAAE,IAAIT,YAAY,GAAG,CAAC,EAAE;QAAEF,kBAAkB,CAAC,EAAE,CAAC,CAAA;QAAEC,QAAQ,CAAC,IAAI,CAAC,CAAA;AAAE,OAAA;AAAG,KAAA;GAE9IE,eAAAA,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKQ,IAAAA,GAAG,EAAEb,UAAW;AAACc,IAAAA,GAAG,EAAC,UAAU;AAACJ,IAAAA,SAAS,EAAC,WAAA;GAAa,CAAC,YAEtD,CAAC,CAAA;AAEX;;;;"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
import { Link } from 'react-router-dom';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
|
|
6
|
+
var _excluded = ["as", "className", "hasShadow", "image", "body", "children", "footer"],
|
|
7
|
+
_excluded2 = ["as", "href", "className", "hasShadow", "image", "body", "children", "footer"],
|
|
8
|
+
_excluded3 = ["image", "alt", "className", "imageClassName"],
|
|
9
|
+
_excluded4 = ["as", "children", "className"];
|
|
10
|
+
var cardClasses = function cardClasses(className, hasShadow) {
|
|
11
|
+
return twMerge('hc-relative hc-flex hc-flex-wrap hc-flex-col hc-bg-clip-border hc-break-words hc-bg-white hc-border hc-border-gray-100', hasShadow ? 'hc-shadow-lg' : '', className !== null && className !== void 0 ? className : '');
|
|
12
|
+
};
|
|
13
|
+
var Card = function Card(_ref) {
|
|
14
|
+
var children = _ref.children;
|
|
15
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
16
|
+
};
|
|
17
|
+
var CardDefault = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
18
|
+
var _ref2$as = _ref2.as,
|
|
19
|
+
as = _ref2$as === void 0 ? 'div' : _ref2$as,
|
|
20
|
+
className = _ref2.className,
|
|
21
|
+
_ref2$hasShadow = _ref2.hasShadow,
|
|
22
|
+
hasShadow = _ref2$hasShadow === void 0 ? false : _ref2$hasShadow,
|
|
23
|
+
image = _ref2.image,
|
|
24
|
+
body = _ref2.body,
|
|
25
|
+
children = _ref2.children,
|
|
26
|
+
footer = _ref2.footer,
|
|
27
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
28
|
+
var Container = as;
|
|
29
|
+
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
30
|
+
ref: ref,
|
|
31
|
+
className: cardClasses(className, hasShadow)
|
|
32
|
+
}, rest), image, children, body, footer);
|
|
33
|
+
});
|
|
34
|
+
var CardLink = function CardLink(_ref3) {
|
|
35
|
+
var _ref3$as = _ref3.as,
|
|
36
|
+
as = _ref3$as === void 0 ? 'link' : _ref3$as,
|
|
37
|
+
href = _ref3.href,
|
|
38
|
+
className = _ref3.className,
|
|
39
|
+
_ref3$hasShadow = _ref3.hasShadow,
|
|
40
|
+
hasShadow = _ref3$hasShadow === void 0 ? false : _ref3$hasShadow,
|
|
41
|
+
image = _ref3.image,
|
|
42
|
+
body = _ref3.body,
|
|
43
|
+
children = _ref3.children,
|
|
44
|
+
footer = _ref3.footer,
|
|
45
|
+
rest = _objectWithoutProperties(_ref3, _excluded2);
|
|
46
|
+
var Container = as === 'link' ? Link : as;
|
|
47
|
+
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
48
|
+
to: href,
|
|
49
|
+
className: twMerge(cardClasses(className, hasShadow), 'hc-group hc-transition hover:hc-shadow-xl hover:hc-border-indigo-300 focus:hc-shadow-xl focus:hc-border-indigo-300')
|
|
50
|
+
}, rest), image && image, children, body && body, footer && footer);
|
|
51
|
+
};
|
|
52
|
+
var CardImage = function CardImage(_ref4) {
|
|
53
|
+
var image = _ref4.image,
|
|
54
|
+
alt = _ref4.alt,
|
|
55
|
+
className = _ref4.className,
|
|
56
|
+
imageClassName = _ref4.imageClassName,
|
|
57
|
+
rest = _objectWithoutProperties(_ref4, _excluded3);
|
|
58
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
59
|
+
className: twMerge('hc-w-full', className !== null && className !== void 0 ? className : '')
|
|
60
|
+
}, /*#__PURE__*/React.createElement("img", _extends({
|
|
61
|
+
src: typeof image === 'string' ? image : image.src,
|
|
62
|
+
width: image.width ? image.width : null,
|
|
63
|
+
height: image.height ? image.height : null,
|
|
64
|
+
alt: alt !== null && alt !== void 0 ? alt : '',
|
|
65
|
+
className: twMerge('hc-w-full hc-h-auto', imageClassName !== null && imageClassName !== void 0 ? imageClassName : '')
|
|
66
|
+
}, rest)));
|
|
67
|
+
};
|
|
68
|
+
var CardBody = function CardBody(_ref5) {
|
|
69
|
+
var children = _ref5.children,
|
|
70
|
+
className = _ref5.className;
|
|
71
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
className: twMerge('hc-flex-auto hc-p-4 md:hc-px-6 lg:hc-px-8', className !== null && className !== void 0 ? className : '')
|
|
73
|
+
}, children);
|
|
74
|
+
};
|
|
75
|
+
var CardTitle = function CardTitle(_ref6) {
|
|
76
|
+
var _ref6$as = _ref6.as,
|
|
77
|
+
as = _ref6$as === void 0 ? 'h3' : _ref6$as,
|
|
78
|
+
children = _ref6.children,
|
|
79
|
+
className = _ref6.className,
|
|
80
|
+
rest = _objectWithoutProperties(_ref6, _excluded4);
|
|
81
|
+
var Title = as;
|
|
82
|
+
return /*#__PURE__*/React.createElement(Title, _extends({
|
|
83
|
+
className: twMerge('hc-text-2xl hc-font-bold', className !== null && className !== void 0 ? className : '')
|
|
84
|
+
}, rest), children);
|
|
85
|
+
};
|
|
86
|
+
var CardFooter = function CardFooter(_ref7) {
|
|
87
|
+
var children = _ref7.children,
|
|
88
|
+
className = _ref7.className;
|
|
89
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
90
|
+
className: twMerge('hc-py-2 hc-px-4 md:hc-px-6 lg:hc-px-8 hc-bg-gray-100', className !== null && className !== void 0 ? className : '')
|
|
91
|
+
}, children);
|
|
92
|
+
};
|
|
93
|
+
Card.Default = CardDefault;
|
|
94
|
+
Card.Link = CardLink;
|
|
95
|
+
Card.Image = CardImage;
|
|
96
|
+
Card.Body = CardBody;
|
|
97
|
+
Card.Title = CardTitle;
|
|
98
|
+
Card.Footer = CardFooter;
|
|
99
|
+
CardDefault.displayName = 'Card:Default';
|
|
100
|
+
|
|
101
|
+
export { CardBody, CardDefault, CardFooter, CardImage, CardTitle, Card as default };
|
|
102
|
+
//# sourceMappingURL=default.js.map
|