@rettangoli/ui 0.1.31 → 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.
Files changed (89) hide show
  1. package/README.md +20 -85
  2. package/dist/rettangoli-iife-layout.min.js +113 -173
  3. package/dist/rettangoli-iife-ui.min.js +123 -183
  4. package/package.json +5 -4
  5. package/src/common/dimensions.js +72 -0
  6. package/src/common/link.js +111 -0
  7. package/src/common/responsive.js +8 -0
  8. package/src/common.js +43 -8
  9. package/src/components/accordionItem/accordionItem.handlers.js +1 -1
  10. package/src/components/accordionItem/accordionItem.schema.yaml +14 -0
  11. package/src/components/accordionItem/accordionItem.store.js +8 -8
  12. package/src/components/accordionItem/accordionItem.view.yaml +5 -35
  13. package/src/components/breadcrumb/breadcrumb.handlers.js +24 -3
  14. package/src/components/breadcrumb/breadcrumb.schema.yaml +51 -0
  15. package/src/components/breadcrumb/breadcrumb.store.js +66 -10
  16. package/src/components/breadcrumb/breadcrumb.view.yaml +18 -58
  17. package/src/components/dropdownMenu/dropdownMenu.handlers.js +17 -3
  18. package/src/components/dropdownMenu/dropdownMenu.schema.yaml +64 -0
  19. package/src/components/dropdownMenu/dropdownMenu.store.js +48 -6
  20. package/src/components/dropdownMenu/dropdownMenu.view.yaml +24 -46
  21. package/src/components/form/form.handlers.js +25 -108
  22. package/src/components/form/form.schema.yaml +283 -0
  23. package/src/components/form/form.store.js +19 -14
  24. package/src/components/form/form.view.yaml +28 -319
  25. package/src/components/globalUi/globalUi.handlers.js +2 -2
  26. package/src/components/globalUi/globalUi.schema.yaml +8 -0
  27. package/src/components/globalUi/globalUi.store.js +8 -8
  28. package/src/components/globalUi/globalUi.view.yaml +9 -46
  29. package/src/components/navbar/navbar.handlers.js +1 -1
  30. package/src/components/navbar/navbar.schema.yaml +25 -0
  31. package/src/components/navbar/navbar.store.js +28 -14
  32. package/src/components/navbar/navbar.view.yaml +21 -65
  33. package/src/components/pageOutline/pageOutline.handlers.js +17 -11
  34. package/src/components/pageOutline/pageOutline.schema.yaml +16 -0
  35. package/src/components/pageOutline/pageOutline.store.js +6 -7
  36. package/src/components/pageOutline/pageOutline.view.yaml +1 -29
  37. package/src/components/popoverInput/popoverInput.handlers.js +31 -31
  38. package/src/components/popoverInput/popoverInput.schema.yaml +18 -0
  39. package/src/components/popoverInput/popoverInput.store.js +9 -9
  40. package/src/components/popoverInput/popoverInput.view.yaml +5 -22
  41. package/src/components/select/select.handlers.js +31 -35
  42. package/src/components/select/select.schema.yaml +36 -0
  43. package/src/components/select/select.store.js +34 -35
  44. package/src/components/select/select.view.yaml +13 -56
  45. package/src/components/sidebar/sidebar.handlers.js +5 -5
  46. package/src/components/sidebar/sidebar.schema.yaml +57 -0
  47. package/src/components/sidebar/sidebar.store.js +45 -23
  48. package/src/components/sidebar/sidebar.view.yaml +79 -174
  49. package/src/components/sliderInput/sliderInput.handlers.js +28 -8
  50. package/src/components/sliderInput/sliderInput.schema.yaml +27 -0
  51. package/src/components/sliderInput/sliderInput.store.js +9 -9
  52. package/src/components/sliderInput/sliderInput.view.yaml +8 -33
  53. package/src/components/table/table.handlers.js +3 -3
  54. package/src/components/table/table.schema.yaml +27 -0
  55. package/src/components/table/table.store.js +8 -8
  56. package/src/components/table/table.view.yaml +16 -62
  57. package/src/components/tabs/tabs.schema.yaml +26 -0
  58. package/src/components/tabs/tabs.store.js +12 -9
  59. package/src/components/tabs/tabs.view.yaml +4 -60
  60. package/src/components/tooltip/tooltip.schema.yaml +18 -0
  61. package/src/components/tooltip/tooltip.store.js +7 -7
  62. package/src/components/tooltip/tooltip.view.yaml +4 -22
  63. package/src/components/waveform/waveform.handlers.js +6 -6
  64. package/src/components/waveform/waveform.schema.yaml +25 -0
  65. package/src/components/waveform/waveform.store.js +6 -6
  66. package/src/components/waveform/waveform.view.yaml +6 -34
  67. package/src/deps/createGlobalUI.js +2 -2
  68. package/src/primitives/button.js +200 -114
  69. package/src/primitives/colorPicker.js +56 -50
  70. package/src/primitives/dialog.js +2 -1
  71. package/src/primitives/image.js +73 -103
  72. package/src/primitives/input-number.js +139 -93
  73. package/src/primitives/input.js +87 -64
  74. package/src/primitives/popover.js +36 -28
  75. package/src/primitives/slider.js +6 -4
  76. package/src/primitives/svg.js +9 -10
  77. package/src/primitives/text.js +26 -47
  78. package/src/primitives/textarea.js +25 -9
  79. package/src/primitives/view.js +49 -90
  80. package/src/setup.js +1 -7
  81. package/src/styles/buttonMarginStyles.js +1 -13
  82. package/src/styles/cursorStyles.js +1 -5
  83. package/src/styles/flexDirectionStyles.js +4 -4
  84. package/src/styles/marginStylesForTarget.js +13 -0
  85. package/src/styles/textColorStyles.js +14 -6
  86. package/src/styles/textStyles.js +4 -4
  87. package/src/styles/viewStyles.js +6 -6
  88. package/src/styles/viewStylesForTarget.js +58 -0
  89. package/src/styles/flexChildStyles.js +0 -43
package/README.md CHANGED
@@ -1,106 +1,41 @@
1
+ # Rettangoli UI
1
2
 
2
- # Rettangoli
3
+ A UI component library built on Web Components with attribute-first styling.
3
4
 
4
- ## Development
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
- All primitives and components
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
- ### Install via NPM
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("rtgl-view", RettangoliView({}));
24
+ import { RettangoliView } from '@rettangoli/ui';
25
+ customElements.define('rtgl-view', RettangoliView({}));
97
26
  ```
98
27
 
99
- ### Stylesheet file
100
-
101
- Make sure you import a stylesheet file from your html file. [Example](./src/vt/static/public/theme.css)
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`.