Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move akn-structure related SCSS into law-widget-styles #273

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ alongside support for React, and Vue.

### Packages

| Project | Package | Description | Documentation |
|-----------------------|-------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|--------------------------------------------|
| **Core** | [`@lawsafrica/law-widgets`](https://www.npmjs.com/package/@lawsafrica/law-widgets) | Web components library built for Akoma Ntoso documents | [`README.md`](core/README.md) |
| **Law Widget Styles** | [`@lawsafrica/law-widget-styles`](https://www.npmjs.com/package/@lawsafrica/law-widget-styles) | Stylesheets for use with HTML documents published using the [Indigo platform](https://indigo.readthedocs.org). | [`README.md`](law-widget-styles/README.md) |
| **Vue** | [`@lawsafrica/law-widgets-vue`](https://www.npmjs.com/package/@lawsafrica/law-widgets-vue) | Vue wrapper component library of `@lawsafrica/law-widgets` | [`README.md`](packages/vue/README.md) |
| **React** | [`@lawsafrica/law-widgets-react`](https://www.npmjs.com/package/@lawsafrica//law-widgets-react) | React wrapper component library of `@lawsafrica/law-widgets` | [`README.md`](packages/react/README.md) |
| Project | Documentation | Package | Description |
|-----------------------|--------------------------------------------|-------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|
| **Core** | [`README.md`](core/README.md) | [`@lawsafrica/law-widgets`](https://www.npmjs.com/package/@lawsafrica/law-widgets) | Web components library built for Akoma Ntoso documents |
| **Law Widget Styles** | [`README.md`](law-widget-styles/README.md) | [`@lawsafrica/law-widget-styles`](https://www.npmjs.com/package/@lawsafrica/law-widget-styles) | Stylesheets for use with HTML documents published using the [Indigo platform](https://indigo.readthedocs.org). |
| **Vue** | [`README.md`](packages/vue/README.md) | [`@lawsafrica/law-widgets-vue`](https://www.npmjs.com/package/@lawsafrica/law-widgets-vue) | Vue wrapper component library of `@lawsafrica/law-widgets` |
| **React** | [`README.md`](packages/react/README.md) | [`@lawsafrica/law-widgets-react`](https://www.npmjs.com/package/@lawsafrica//law-widgets-react) | React wrapper component library of `@lawsafrica/law-widgets` |

## Getting started
Click [here](core/README.md#components) to learn how to use our components.
Expand All @@ -25,24 +25,20 @@ At the root of project in your terminal, run `npm install`

**Installing and symlinking dependencies via Lerna**

Run `lerna bootstrap` in the terminal. This will npm install all the packages (`core`, `law-widget-styles`, `react`, `vue`),
Run `npx lerna bootstrap` in the terminal. This will npm install all the packages (`core`, `law-widget-styles`, `react`, `vue`),
and provide the necessary symlinking between packages. (i.e `core` has `law-widget-styles` as a dependency, hence Lerna will
symlink `law-widget-styles`).

Try prepending ``lerna`` with ``npx `` if you get ``command not found: lerna``.

## Running tests
In the terminal, run `lerna run test`.
In the terminal, run `npx lerna run test`.

## Building packages
In the terminal, run `lerna run build`.
In the terminal, run `npx lerna run build`.

## Releasing and publishing packages

- Once you have merged your feature into main, run `lerna version VERSION_NUMBER --conventional-commits` (
e.g `lerna version 1.0.1 --conventional-commits`) in the terminal.
- Once you have merged your feature into main, run `npx lerna version VERSION_NUMBER --conventional-commits` (
e.g `npx lerna version 1.0.1 --conventional-commits`) in the terminal.
- An automatic tagged commit will occur and the changelog for the packages will be updated.
- Create a new release [here](https://github.com/laws-africa/law-widgets/releases/new). Use the tag that was
pushed
for your release.
- Create a new release [here](https://github.com/laws-africa/law-widgets/releases/new). Use the tag that was pushed for your release.
- Upon creating a release, a new version of the packages will be published on `npm`.
89 changes: 0 additions & 89 deletions core/src/components/akoma-ntoso/_variables.scss

This file was deleted.

3 changes: 1 addition & 2 deletions core/src/components/akoma-ntoso/akoma-ntoso.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

@import "@lawsafrica/law-widget-styles/scss/mixins";
@import "@lawsafrica/law-widget-styles/scss/variables";
@import "variables";
@import "structure";
@import "@lawsafrica/law-widget-styles/scss/mixins/structure";

la-akoma-ntoso {
display: block;
Expand Down
91 changes: 91 additions & 0 deletions law-widget-styles/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ $akn-table-border-width: 1px !default;

$akn-footnote-bg-colour: rgba(0, 0, 0, 0.07);

// akn-structure
$akn-structure-hier-start-colour: #ef9a9a !default;
$akn-structure-block-start-colour: adjust-hue($akn-structure-hier-start-colour, 55deg) !default;
$akn-structure-inline-start-colour: adjust-hue($akn-structure-hier-start-colour, 105deg) !default;
$akn-structure-subflow-start-colour: adjust-hue($akn-structure-hier-start-colour, 25deg) !default;
$akn-structure-doc-container-start-colour: adjust-hue($akn-structure-hier-start-colour, 35deg) !default;
$akn-structure-spacing: 3px !default;


// AKN document types
$akn-elements-doctype: (
Expand Down Expand Up @@ -60,3 +68,86 @@ $akn-elements-block: (
$akn-elements-doc-container: (
"attachment", "component"
);

// AKN inline elements
$akn-elements-inline: ("abbr", "remark");

// AKN subflow elements
$akn-elements-subflow: ("authorialNote", "embeddedStructure");

// Display names for AKN elements, possibly abbreviated
$akn-element-names: (
"abbr": "abbr",
"address": "address",
"adjournment": "adjournment",
"administrationOfOath": "administrationOfOath",
"alinea": "alinea",
"answer": "answer",
"article": "article",
"attachment": "attachment",
"authorialNote": "footnote",
"blockList": "items",
"book": "book",
"chapter": "chapter",
"clause": "clause",
"communication": "communication",
"component": "component",
"crossHeading": "crossHeading",
"debateSection": "debateSection",
"declarationOfVote": "declarationOfVote",
"division": "division",
"embeddedStructure": "quote",
"hcontainer": "hcontainer",
"indent": "indent",
"intro": "intro",
"item": "item",
"level": "level",
"list": "list",
"listIntroduction": "listIntro",
"listWrapUp": "listWrapUp",
"ministerialStatements": "ministerialStatements",
"nationalInterest": "nationalInterest",
"noticesOfMotion": "noticesOfMotion",
"oralStatements": "oralStatements",
"papers": "papers",
"paragraph": "para",
"part": "part",
"personalStatements": "personalStatements",
"petitions": "petitions",
"point": "point",
"pointOfOrder": "pointOfOrder",
"prayers": "prayers",
"preamble": "preamble",
"preface": "preface",
"proceduralMotions": "proceduralMotions",
"proviso": "proviso",
"question": "question",
"remark": "remark",
"rule": "rule",
"section": "section",
"subchapter": "subchapter",
"subclause": "subclause",
"subdivision": "subdivision",
"sublist": "sublist",
"subparagraph": "subpara",
"subpart": "subpart",
"subrule": "subrule",
"subsection": "subsection",
"subtitle": "subtitle",
"table": "table",
"title": "title",
"tome": "tome",
"transitional": "transitional",
"ul": "bullets",
"wrapUp": "wrapUp",
"questions": "questions",
"resolutions": "resolutions",
"rollCall": "rollCall",
"speech": "speech",
"speechGroup": "speechGroup",
"writtenStatements": "writtenStatements",
"from": "from",
"narrative": "narrative",
"scene": "scene",
"summary": "summary",
);
Loading