@rettangoli/ui 0.1.30 → 0.1.32-rc1
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/README.md +20 -85
- package/dist/rettangoli-iife-layout.min.js +113 -173
- package/dist/rettangoli-iife-ui.min.js +123 -183
- package/package.json +5 -4
- package/src/common/dimensions.js +72 -0
- package/src/common/link.js +111 -0
- package/src/common/responsive.js +8 -0
- package/src/common.js +43 -8
- package/src/components/accordionItem/accordionItem.handlers.js +1 -1
- package/src/components/accordionItem/accordionItem.schema.yaml +14 -0
- package/src/components/accordionItem/accordionItem.store.js +8 -8
- package/src/components/accordionItem/accordionItem.view.yaml +9 -38
- package/src/components/breadcrumb/breadcrumb.handlers.js +24 -3
- package/src/components/breadcrumb/breadcrumb.schema.yaml +51 -0
- package/src/components/breadcrumb/breadcrumb.store.js +66 -10
- package/src/components/breadcrumb/breadcrumb.view.yaml +18 -58
- package/src/components/dropdownMenu/dropdownMenu.handlers.js +17 -3
- package/src/components/dropdownMenu/dropdownMenu.schema.yaml +64 -0
- package/src/components/dropdownMenu/dropdownMenu.store.js +48 -6
- package/src/components/dropdownMenu/dropdownMenu.view.yaml +24 -46
- package/src/components/form/form.handlers.js +25 -108
- package/src/components/form/form.schema.yaml +283 -0
- package/src/components/form/form.store.js +19 -14
- package/src/components/form/form.view.yaml +28 -319
- package/src/components/globalUi/globalUi.handlers.js +2 -2
- package/src/components/globalUi/globalUi.schema.yaml +8 -0
- package/src/components/globalUi/globalUi.store.js +8 -8
- package/src/components/globalUi/globalUi.view.yaml +9 -46
- package/src/components/navbar/navbar.handlers.js +1 -1
- package/src/components/navbar/navbar.schema.yaml +25 -0
- package/src/components/navbar/navbar.store.js +28 -14
- package/src/components/navbar/navbar.view.yaml +21 -65
- package/src/components/pageOutline/pageOutline.handlers.js +17 -11
- package/src/components/pageOutline/pageOutline.schema.yaml +16 -0
- package/src/components/pageOutline/pageOutline.store.js +6 -7
- package/src/components/pageOutline/pageOutline.view.yaml +1 -29
- package/src/components/popoverInput/popoverInput.handlers.js +31 -31
- package/src/components/popoverInput/popoverInput.schema.yaml +18 -0
- package/src/components/popoverInput/popoverInput.store.js +9 -9
- package/src/components/popoverInput/popoverInput.view.yaml +5 -22
- package/src/components/select/select.handlers.js +31 -35
- package/src/components/select/select.schema.yaml +36 -0
- package/src/components/select/select.store.js +34 -35
- package/src/components/select/select.view.yaml +13 -56
- package/src/components/sidebar/sidebar.handlers.js +5 -5
- package/src/components/sidebar/sidebar.schema.yaml +57 -0
- package/src/components/sidebar/sidebar.store.js +45 -23
- package/src/components/sidebar/sidebar.view.yaml +79 -174
- package/src/components/sliderInput/sliderInput.handlers.js +28 -8
- package/src/components/sliderInput/sliderInput.schema.yaml +27 -0
- package/src/components/sliderInput/sliderInput.store.js +9 -9
- package/src/components/sliderInput/sliderInput.view.yaml +8 -33
- package/src/components/table/table.handlers.js +3 -3
- package/src/components/table/table.schema.yaml +27 -0
- package/src/components/table/table.store.js +8 -8
- package/src/components/table/table.view.yaml +16 -62
- package/src/components/tabs/tabs.schema.yaml +26 -0
- package/src/components/tabs/tabs.store.js +12 -9
- package/src/components/tabs/tabs.view.yaml +4 -60
- package/src/components/tooltip/tooltip.schema.yaml +18 -0
- package/src/components/tooltip/tooltip.store.js +7 -7
- package/src/components/tooltip/tooltip.view.yaml +4 -22
- package/src/components/waveform/waveform.handlers.js +6 -6
- package/src/components/waveform/waveform.schema.yaml +25 -0
- package/src/components/waveform/waveform.store.js +6 -6
- package/src/components/waveform/waveform.view.yaml +6 -34
- package/src/deps/createGlobalUI.js +2 -2
- package/src/primitives/button.js +200 -114
- package/src/primitives/colorPicker.js +56 -50
- package/src/primitives/dialog.js +2 -1
- package/src/primitives/image.js +73 -103
- package/src/primitives/input-number.js +139 -93
- package/src/primitives/input.js +87 -64
- package/src/primitives/popover.js +36 -28
- package/src/primitives/slider.js +6 -4
- package/src/primitives/svg.js +9 -10
- package/src/primitives/text.js +26 -47
- package/src/primitives/textarea.js +25 -9
- package/src/primitives/view.js +49 -90
- package/src/setup.js +1 -7
- package/src/styles/buttonMarginStyles.js +1 -13
- package/src/styles/cursorStyles.js +1 -5
- package/src/styles/flexDirectionStyles.js +4 -4
- package/src/styles/marginStylesForTarget.js +13 -0
- package/src/styles/textColorStyles.js +14 -6
- package/src/styles/textStyles.js +4 -4
- package/src/styles/viewStyles.js +6 -6
- package/src/styles/viewStylesForTarget.js +58 -0
- package/src/styles/flexChildStyles.js +0 -43
package/README.md
CHANGED
|
@@ -1,106 +1,41 @@
|
|
|
1
|
+
# Rettangoli UI
|
|
1
2
|
|
|
2
|
-
|
|
3
|
+
A UI component library built on Web Components with attribute-first styling.
|
|
3
4
|
|
|
4
|
-
##
|
|
5
|
-
|
|
6
|
-
### Folder Structure
|
|
7
|
-
|
|
8
|
-
```
|
|
9
|
-
src/
|
|
10
|
-
├── primitives/ # Basic web components built from scratch, no dependencies
|
|
11
|
-
└── components/ # Pre-built components using @rettangoli/fe
|
|
12
|
-
vt/ # Uses @rettangoli/vt visual testing library
|
|
13
|
-
├── reference/ # Golden screenshots for visual testing
|
|
14
|
-
└── specs/ # HTML test specifications
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
### Install dependencies
|
|
18
|
-
|
|
19
|
-
Use npx to install `rtgl` cli globally. You run into issues if try to use `bunx`.
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
npx i -g rtgl
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Install dependencies
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
bun install
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Generate specification screens
|
|
32
|
-
|
|
33
|
-
Bundles the code to be used for `rettangoli-vt`
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
bun run build:dev
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Uses `rettangoli-vt` to generates test screens
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
bun run vt:generate
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Test for any change using `rettangoli-vt`
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
bun run vt:report
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Accept the changes by updating the reference screenshots
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
bun run vt:accept
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
You can then access the generates screens
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
bun run serve
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Open http://localhost:3000/view to see the specification screens
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
## Usage
|
|
67
|
-
|
|
68
|
-
### Install via CDN
|
|
69
|
-
|
|
70
|
-
Use via CDN iife (Immediately Invoked Function Expression) us [JSDeliver](https://www.jsdelivr.com/package/npm/@rettangoli/ui)
|
|
71
|
-
|
|
72
|
-
Primitives only. This might be useful if you want a light weight version and use only the primitives.
|
|
5
|
+
## Quickstart
|
|
73
6
|
|
|
7
|
+
### CDN (iife)
|
|
8
|
+
Primitives only (lightweight):
|
|
74
9
|
```html
|
|
75
10
|
<script src="https://cdn.jsdelivr.net/npm/@rettangoli/ui@latest/dist/rettangoli-layout.iife.min.js"></script>
|
|
76
11
|
```
|
|
77
12
|
|
|
78
|
-
|
|
79
|
-
|
|
13
|
+
Primitives + components:
|
|
80
14
|
```html
|
|
81
15
|
<script src="https://cdn.jsdelivr.net/npm/@rettangoli/ui@latest/dist/rettangoli-ui.iife.min.js"></script>
|
|
82
16
|
```
|
|
83
17
|
|
|
84
|
-
###
|
|
85
|
-
|
|
86
|
-
Install package
|
|
87
|
-
|
|
18
|
+
### NPM (ESM)
|
|
88
19
|
```bash
|
|
89
20
|
npm install @rettangoli/ui
|
|
90
21
|
```
|
|
91
22
|
|
|
92
|
-
Import the package. This allows you to configure more flexible options and to treeshake only the code that you need.
|
|
93
|
-
|
|
94
23
|
```js
|
|
95
|
-
import { RettangoliView } '@rettangoli/ui';
|
|
96
|
-
customElements.define(
|
|
24
|
+
import { RettangoliView } from '@rettangoli/ui';
|
|
25
|
+
customElements.define('rtgl-view', RettangoliView({}));
|
|
97
26
|
```
|
|
98
27
|
|
|
99
|
-
###
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
28
|
+
### Minimal usage
|
|
29
|
+
```html
|
|
30
|
+
<rtgl-view p=md g=sm>
|
|
31
|
+
<rtgl-text>Hello</rtgl-text>
|
|
32
|
+
<rtgl-button>Click</rtgl-button>
|
|
33
|
+
</rtgl-view>
|
|
34
|
+
```
|
|
104
35
|
|
|
36
|
+
### Stylesheet
|
|
37
|
+
You must include a theme stylesheet in your app. See `src/vt/static/public/theme.css` for a reference theme.
|
|
105
38
|
|
|
39
|
+
---
|
|
106
40
|
|
|
41
|
+
For development workflows, component architecture, and interface rules, see `DEVELOPMENT.md`.
|