rettangoli-ui 0.1.0-rc2 → 0.1.0-rc4

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 (54) hide show
  1. package/README.md +16 -27
  2. package/dist/rettangoli-iife-layout.min.js +118 -45
  3. package/dist/rettangoli-iife-ui.min.js +86 -65
  4. package/package.json +11 -4
  5. package/src/common/BaseElement.js +182 -0
  6. package/src/common.js +190 -0
  7. package/src/components/dialog/dialog.handlers.js +5 -0
  8. package/src/components/dialog/dialog.store.js +24 -0
  9. package/src/components/dialog/dialog.view.yaml +41 -0
  10. package/src/components/dropdownMenu/dropdownMenu.handlers.js +5 -0
  11. package/src/components/dropdownMenu/dropdownMenu.store.js +25 -0
  12. package/src/components/dropdownMenu/dropdownMenu.view.yaml +52 -0
  13. package/src/components/form/form.handlers.js +30 -0
  14. package/src/components/form/form.store.js +45 -0
  15. package/src/components/form/form.view.yaml +47 -0
  16. package/src/components/navbar/navbar.examples.yaml +86 -0
  17. package/src/components/navbar/navbar.handlers.js +10 -0
  18. package/src/components/navbar/navbar.store.js +46 -0
  19. package/src/components/navbar/navbar.view.yaml +74 -0
  20. package/src/components/pageOutline/pageOutline.handlers.js +69 -0
  21. package/src/components/pageOutline/pageOutline.store.js +40 -0
  22. package/src/components/pageOutline/pageOutline.view.yaml +34 -0
  23. package/src/components/popover/popover.handlers.js +5 -0
  24. package/src/components/popover/popover.store.js +12 -0
  25. package/src/components/popover/popover.view.yaml +57 -0
  26. package/src/components/select/select.handlers.js +46 -0
  27. package/src/components/select/select.store.js +65 -0
  28. package/src/components/select/select.view.yaml +50 -0
  29. package/src/components/sidebar/sidebar.handlers.js +36 -0
  30. package/src/components/sidebar/sidebar.store.js +139 -0
  31. package/src/components/sidebar/sidebar.view.yaml +190 -0
  32. package/src/entry-iife-layout.js +15 -0
  33. package/src/entry-iife-ui.js +18 -0
  34. package/src/index.js +17 -0
  35. package/src/lib/uhtml.js +9 -0
  36. package/src/primitives/button.js +306 -0
  37. package/src/primitives/image.js +234 -0
  38. package/src/primitives/input.js +208 -0
  39. package/src/primitives/svg.js +95 -0
  40. package/src/primitives/text.js +141 -0
  41. package/src/primitives/textarea.js +103 -0
  42. package/src/primitives/view.js +217 -0
  43. package/src/setup.js +16 -0
  44. package/src/styles/anchorStyles.js +13 -0
  45. package/src/styles/buttonMarginStyles.js +84 -0
  46. package/src/styles/cursorStyles.js +12 -0
  47. package/src/styles/flexChildStyles.js +43 -0
  48. package/src/styles/flexDirectionStyles.js +74 -0
  49. package/src/styles/marginStyles.js +13 -0
  50. package/src/styles/paddingSvgStyles.js +120 -0
  51. package/src/styles/scrollStyles.js +22 -0
  52. package/src/styles/textColorStyles.js +14 -0
  53. package/src/styles/textStyles.js +62 -0
  54. package/src/styles/viewStyles.js +119 -0
@@ -0,0 +1,119 @@
1
+ import { generateCSS, spacing } from "../common.js";
2
+
3
+ const borderWidth = {
4
+ xs: "--border-width-xs",
5
+ sm: "--border-width-sm",
6
+ md: "--border-width-md",
7
+ lg: "--border-width-lg",
8
+ xl: "--border-width-xl",
9
+ }
10
+
11
+ const styles = {
12
+ bgc: {
13
+ pr: `
14
+ background-color: var(--primary);
15
+ `,
16
+ se: `
17
+ background-color: var(--secondary);
18
+ `,
19
+ de: `
20
+ background-color: var(--destructive);
21
+ `,
22
+ fg: `
23
+ background-color: var(--foreground);
24
+ `,
25
+ bg: `
26
+ background-color: var(--background);
27
+ `,
28
+ mu: `
29
+ background-color: var(--muted);
30
+ `,
31
+ ac: `
32
+ background-color: var(--accent);
33
+ `,
34
+ bo: `
35
+ background-color: var(--border);
36
+ `,
37
+ },
38
+ pos: {
39
+ rel: "relative",
40
+ abs: "absolute",
41
+ fix: "fixed",
42
+ },
43
+ cor: {
44
+ full: `
45
+ top: 0;
46
+ right: 0;
47
+ bottom: 0;
48
+ left: 0;
49
+ height: 100%;
50
+ `,
51
+ top: `
52
+ top: 0;
53
+ right: 0;
54
+ left: 0;
55
+ `,
56
+ right: `
57
+ top: 0;
58
+ right: 0;
59
+ bottom: 0;
60
+ height: 100%;
61
+ `,
62
+ bottom: `
63
+ right: 0;
64
+ bottom: 0;
65
+ left: 0;
66
+ `,
67
+ left: `
68
+ bottom: 0;
69
+ left: 0;
70
+ top: 0;
71
+ height: 100%;
72
+ `,
73
+ },
74
+ shadow: {
75
+ sm: "--shadow-sm",
76
+ md: "--shadow-md",
77
+ lg: "--shadow-lg",
78
+ },
79
+ pt: spacing,
80
+ pr: spacing,
81
+ pb:spacing,
82
+ pl: spacing,
83
+ p: spacing,
84
+ ph: spacing,
85
+ pv: spacing,
86
+ g: spacing,
87
+ gv: spacing,
88
+ gh: spacing,
89
+ bw: borderWidth,
90
+ bwt: borderWidth,
91
+ bwr: borderWidth,
92
+ bwb: borderWidth,
93
+ bwl: borderWidth,
94
+ bc: {
95
+ p: "--color-primary",
96
+ pc: "--color-primary-container",
97
+ s: "--color-secondary",
98
+ sc: "--color-secondary-container",
99
+ e: "--color-error",
100
+ ec: "--color-error-container",
101
+ su: "--color-surface",
102
+ sucl: "--color-surface-container-low",
103
+ suc: "--color-surface-container",
104
+ such: "--color-surface-container-high",
105
+ isu: "--color-inverse-surface",
106
+ o: "--color-outline",
107
+ ov: "--color-outline-variant",
108
+ },
109
+ br: {
110
+ xs: "--border-radius-xs",
111
+ sm: "--border-radius-sm",
112
+ md: "--border-radius-md",
113
+ lg: "--border-radius-lg",
114
+ xl: "--border-radius-xl",
115
+ f: "--border-radius-f",
116
+ },
117
+ };
118
+
119
+ export default generateCSS(styles)