npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

buk-search-widget

v2.0.79

Published

The Hotel Room Search Widget is a TypeScript widget that enables users to search for hotel rooms on [buktrips.com](https://buktrips.com) by location, check-in and check-out dates, and occupancy details. This document provides information on how to use the

Downloads

408

Readme

BUK Hotel Room Search Widget

The Hotel Room Search Widget is a TypeScript widget that enables users to search for hotel rooms on buktrips.com by location, check-in and check-out dates, and occupancy details. This document provides information on how to use the widget, customize it, and the license.

Installation

You can install the widget as an npm package:

npm i buk-search-widget

Alternatively, you can include the widget in your HTML file via a CDN:

<script src="https://unpkg.com/buk-search-widget/dist/index.js"></script>

Usage

To use the widget, you need to create an HTML form with the following fields:

  • buk-location: A text input field for the location.
  • buk-checkin: A date input field for the check-in date.
  • buk-checkout: A date input field for the check-out date.
  • buk-occupancy: A container element for the occupancy details. This element should have a data-widget="occupancy" attribute.
  • buk-search: A submit button for searching the hotel rooms.

Here's an example HTML form:

    <div class="buk-search-container">
      <form id="buk-search-form">
        <div class="buk-form-group">
          <label for="buk-location">Location</label>
          <input
            type="text"
            id="buk-location"
            name="buk-location"
            placeholder="Enter a location"
            required
          />
          <ul id="buk-suggestions"></ul>
          <div id="buk-location-error" class="buk-error-message"></div>
        </div>

        <div class="buk-form-group">
          <label for="buk-checkin">Check-in</label>
          <input type="date" id="buk-checkin" name="buk-checkin" required />
          <div id="buk-checkin-error" class="buk-error-message"></p>
        </div>

        <div class="buk-form-group">
          <label for="buk-checkout">Check-out</label>
          <input type="date" id="buk-checkout" name="buk-checkout" required />
          <div id="buk-checkout-error" class="buk-error-message"></p>
        </div>

        <div class="buk-form-group">
          <button
            type="button"
            id="buk-occupancy-dropdown"
            class="buk-occupancy-dropdown"
          >
            1 Room, 1 Adult
          </button>
          <div class="buk-occupancy-dropdown-content">
            <div id="buk-rooms-container"></div>
            <button type="button" id="buk-add-room">Add Room</button>
            <div id="buk-occupancy-error" class="buk-error-message"></p>
          </div>
        </div>

        <div class="buk-form-group">
          <button type="submit" id="buk-search-btn">Search</button>
        </div>
      </form>
    </div>

Customization

You can customize the widget by applying custom CSS styles to the HTML elements. Here are some of the CSS classes that you can use:

  • .buk-form-group: Applies to each form group element.
  • .buk-occupancy-dropdown: Applies to the occupancy dropdown container.
  • .buk-occupancy-dropdown-content: Applies to the occupancy dropdown content.
  • .buk-room-container: Applies to each room container element.
  • .buk-remove-room: Applies to each remove room button element.
  • .buk-age-select: Applies to each age select element.
  • .buk-error-message: Applies to the error messages.
  • buk-search-btn: Applies to Search button.

License

This widget is licensed under the MIT license.