amelia-booking-ui
TypeScript icon, indicating that this package has built-in type declarations

0.0.288 • Public • Published

Design System for Amelia WordPress Booking Plugin

This project focuses on creating a design system for the Amelia WordPress booking plugin using Vue.js. Our goal is to enhance the user interface and experience consistency throughout the plugin.

Prerequisites

Before contributing to this project, please ensure you have the following tools installed:

  • Node.js
  • NVM (Node Version Manager)
  • pnpm (Performant npm)

Node Version Management with NVM

To maintain consistency across different development environments, we use NVM (Node Version Manager) for managing Node.js versions.

Installing NVM

If NVM is not already installed on your machine, you can follow the installation instructions on the NVM GitHub page.

Using NVM

We recommend using the Latest LTS (Long-Term Support) version of Node.js for this project. To install and use the latest LTS version, execute the following commands:

nvm install --lts
nvm use --lts

Getting Started

To set up your development environment and start contributing to the design system, follow these steps:

  1. Clone the project repository and navigate to the project directory:

    git clone git@bitbucket.org:tmsplugins/amelia-ui.git
    cd amelia-ui
  2. Install the project dependencies using pnpm:

    npm install

Linting and Formatting with ESLint and Prettier

To ensure code quality and consistency, we use ESLint for linting and Prettier for formatting. Here are the commands to run these tools:

Lint with ESLint

To identify and report on patterns found in ECMAScript/JavaScript code, we use ESLint. It helps in finding problematic patterns or code that doesn't adhere to certain style guidelines.

To run ESLint, use the following command:

npm run lint

This command will check your code for any linting errors based on the project's ESLint configuration.

Format with Prettier

Prettier is an opinionated code formatter that supports many languages and integrates with most editors. It removes all original styling and ensures that all outputted code conforms to a consistent style.

To format your code using Prettier, use the following command:

npm run format

This command will automatically format your code files according to the project's Prettier configuration, ensuring consistency across your codebase.

Build Instructions

Compile and Hot-Reload for Development

When working on the project, you might want to see your changes reflected immediately. For this purpose, you can use the following command to compile your project and set up hot-reloading:

npm run dev

Compile and Minify for Production

To compile and minify your project for production use, execute the following command:

npm run build

This will generate a dist directory with the compiled assets, ready for production deployment.

Adding a New Component

Follow these instructions to add a new component to the project. The new component should be placed in the src/components directory, and its name should start with Am.

Step 1: Create the Component

  1. Navigate to the src/components directory in your project.
  2. Create a new file for your component. The filename should start with Am and follow the PascalCase convention. For example, AmButtonAction.vue for a button component.
  3. Inside the new file, define your Vue component. Here's a basic template you can start with:
<template>
  <div>
    <!-- Your component HTML goes here -->
  </div>
</template>

<script setup>
// Component logic using Composition API goes here
</script>

<style scoped lang="scss">
/* Your component SCSS goes here */
</style>

Step 2: Export the Component

To make the component available for import, you need to export it from the src/components/index.ts file.

  1. Open src/index.ts file.
  2. Add an export statement for your new component.

Step 3: Using the Component

After the component is exported in the index.ts file, you can import and use it in other parts of your application like this:

import { AmButtonAction } from '@/components'

Now you're ready to use AmButtonAction in your application.

Remember to follow these steps each time you add a new component to ensure consistency and maintainability in your project.

Deployment to NPM Instructions

This document outlines the steps needed to deploy your package to the npm registry. Ensure you follow each step carefully to successfully publish your package.

Step 1: Update the Version in package.json

Before deploying, you need to update the version of your package in package.json. This version number should adhere to semantic versioning (semver) standards. Update the version field to reflect the new version of your package.

Example:

"version": "1.0.1"

Step 2: Build Your Package

Run the build command to generate the latest distribution of your package. This step is crucial to ensure that the latest code changes are compiled and ready for publication.

pnpm run build

Step 3: Log In to npm

Before publishing, you need to be logged in to npm. Use the following command to log in. If you're already logged in, you can skip this step.

npm login

Follow the prompts to enter your npm account credentials.

Step 4: Publish Your Package

Once you're logged in and have your package ready, use the following command to publish it to npm:

npm publish

Adding a New Icon

Follow these instructions to add a new icon to the project. The new icon should be placed in the src/icons/{type} directory.

Step 1: Placing the Icon

Depending on the style of the icon, place it in the appropriate subdirectory:

  • Fill Iconssrc/icons/{type}/fill
  • Line Iconssrc/icons/{type}/line
  • Outline Iconssrc/icons/{type}/outline

Step 2: Modify the SVG File

Before adding the icon, ensure the SVG file follows these formatting rules:

✅ For Fill Icons (src/icons/{type}/fill)

  • If any element has fill="color", remove the color value and set it to an empty string (fill="").
  • Do not add any additional class.

✅ For Line and Outline Icons (src/icons/{type}/line and src/icons/{type}/outline)

  • If any element has fill="color", remove the color value and set it to an empty string (fill="").
  • Add the class fill-path to the element.
  • If the <svg> file has stroke="color", remove the color value and set it to an empty string (stroke="").
  • Add the class stroke-path to the corresponding element.

Step 3: Importing the Icon in iconImports.js

After adding the new icon, update the iconImports.js file to include it.

  • Ensure that the correct path is used (fill, line, or outline).

Step 4: Testing the New Icon

After following all the above steps, make sure everything works as expected by adding the following code in App.vue:

<AmIcon name="plug" color="blue" />
<AmIcon name="plug" color="blue" type="line" />
<AmIcon name="plug" color="blue" type="outline" />
  • If the icons appear correctly with the assigned styles, then the process was successful.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.2880latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.2880
0.0.2870
0.0.28647
0.0.28554
0.0.28438
0.0.2838
0.0.2826
0.0.2814
0.0.2804
0.0.2793
0.0.2783
0.0.2774
0.0.2764
0.0.2754
0.0.2743
0.0.2733
0.0.2723
0.0.2716
0.0.2702
0.0.2692
0.0.2684
0.0.2674
0.0.2662
0.0.2653
0.0.2642
0.0.2632
0.0.2623
0.0.2613
0.0.2604
0.0.2582
0.0.2573
0.0.2564
0.0.2552
0.0.2542
0.0.2532
0.0.2522
0.0.2513
0.0.2503
0.0.2492
0.0.2482
0.0.2472
0.0.2462
0.0.2453
0.0.2443
0.0.2431
0.0.2420
0.0.2411
0.0.2400
0.0.2391
0.0.2381
0.0.2370
0.0.2361
0.0.2350
0.0.2340
0.0.2330
0.0.2320
0.0.2310
0.0.2300
0.0.2290
0.0.2270
0.0.2260
0.0.2250
0.0.2240
0.0.2230
0.0.2220
0.0.2210
0.0.2200
0.0.2190
0.0.2180
0.0.2170
0.0.2150
0.0.2140
0.0.2130
0.0.2120
0.0.2110
0.0.2100
0.0.2090
0.0.2080
0.0.2070
0.0.2060
0.0.2050
0.0.2040
0.0.2030
0.0.2020
0.0.2010
0.0.2000
0.0.1990
0.0.1980
0.0.1970
0.0.1960
0.0.1950
0.0.1940
0.0.1930
0.0.1920
0.0.1910
0.0.1900
0.0.1890
0.0.1880
0.0.1870
0.0.1860
0.0.1850
0.0.1840
0.0.1830
0.0.1820
0.0.1810
0.0.1800
0.0.1790
0.0.1780
0.0.1770
0.0.1760
0.0.1751
0.0.1740
0.0.1730
0.0.1720
0.0.1710
0.0.1700
0.0.1690
0.0.1680
0.0.1670
0.0.1660
0.0.1640
0.0.1630
0.0.1620
0.0.1610
0.0.1600
0.0.1590
0.0.1580
0.0.1570
0.0.1560
0.0.1550
0.0.1540
0.0.1530
0.0.1520
0.0.1510
0.0.1500
0.0.1490
0.0.1480
0.0.1470
0.0.1460
0.0.1450
0.0.1440
0.0.1430
0.0.1420
0.0.1410
0.0.1400
0.0.1390
0.0.1380
0.0.1370
0.0.1360
0.0.1350
0.0.1340
0.0.1330
0.0.1320
0.0.1310
0.0.1300
0.0.1290
0.0.1280
0.0.1270
0.0.1260
0.0.1250
0.0.1240
0.0.1220
0.0.1210
0.0.1200
0.0.1190
0.0.1180
0.0.1170
0.0.1160
0.0.1150
0.0.1140
0.0.1130
0.0.1120
0.0.1110
0.0.1100
0.0.1090
0.0.1080
0.0.1070
0.0.1060
0.0.1050
0.0.1040
0.0.1030
0.0.1020
0.0.1010
0.0.1000
0.0.990
0.0.980
0.0.970
0.0.960
0.0.950
0.0.940
0.0.930
0.0.920
0.0.910
0.0.900
0.0.890
0.0.880
0.0.870
0.0.860
0.0.840
0.0.850
0.0.830
0.0.820
0.0.811
0.0.800
0.0.790
0.0.780
0.0.770
0.0.760
0.0.750
0.0.740
0.0.730
0.0.720
0.0.710
0.0.700
0.0.690
0.0.680
0.0.670
0.0.660
0.0.640
0.0.630
0.0.620
0.0.610
0.0.600
0.0.590
0.0.580
0.0.570
0.0.560
0.0.550
0.0.540
0.0.530
0.0.520
0.0.511
0.0.500
0.0.490
0.0.481
0.0.470
0.0.460
0.0.450
0.0.430
0.0.420
0.0.410
0.0.400
0.0.390
0.0.380
0.0.370
0.0.350
0.0.330
0.0.320
0.0.310
0.0.290
0.0.280
0.0.270
0.0.260
0.0.250
0.0.241
0.0.230
0.0.220
0.0.210
0.0.200
0.0.190
0.0.180
0.0.170
0.0.160
0.0.150
0.0.140
0.0.130
0.0.121
0.0.111
0.0.101
0.0.91
0.0.81
0.0.70
0.0.61
0.0.51
0.0.41
0.0.31
0.0.21

Package Sidebar

Install

npm i amelia-booking-ui

Weekly Downloads

258

Version

0.0.288

License

none

Unpacked Size

38.1 MB

Total Files

84

Last publish

Collaborators

  • ameliabooking