unit.gl 0.0.40 → 0.1.1

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 (67) hide show
  1. package/README.md +0 -1
  2. package/css/unit.gl.css +54 -42
  3. package/css/unit.gl.min.css +1 -1
  4. package/package.json +2 -22
  5. package/scss/_reset.scss +20 -12
  6. package/scss/classes/_guide.scss +35 -40
  7. package/scss/classes/_guides.scss +141 -0
  8. package/scss/classes/_index.scss +3 -5
  9. package/scss/classes/_ratio.scss +3 -5
  10. package/scss/dev/_banner.scss +4 -7
  11. package/scss/dev/_index.scss +7 -0
  12. package/scss/functions/_color.scss +8 -11
  13. package/scss/functions/_index.scss +18 -11
  14. package/scss/functions/_layer.scss +6 -10
  15. package/scss/functions/_ratio.scss +13 -16
  16. package/scss/functions/_scale.scss +20 -18
  17. package/scss/functions/_sequence.scss +64 -72
  18. package/scss/functions/_view.scss +6 -9
  19. package/scss/functions/math/_arithmetic.scss +21 -30
  20. package/scss/functions/math/_index.scss +4 -7
  21. package/scss/functions/unit/_index.scss +8 -7
  22. package/scss/functions/unit/_unit_conversion.scss +42 -29
  23. package/scss/functions/unit/_unit_functions.scss +55 -43
  24. package/scss/index.scss +0 -1
  25. package/scss/maps/_color.scss +14 -14
  26. package/scss/maps/_index.scss +26 -0
  27. package/scss/mixins/_device.scss +9 -10
  28. package/scss/mixins/_display.scss +52 -57
  29. package/scss/mixins/_guide.scss +59 -81
  30. package/scss/mixins/_helper.scss +74 -92
  31. package/scss/mixins/_index.scss +12 -14
  32. package/scss/mixins/_paper.scss +10 -11
  33. package/scss/mixins/_ratio.scss +172 -76
  34. package/scss/mixins/_unit.scss +33 -23
  35. package/scss/mixins/_view.scss +47 -54
  36. package/scss/{_global.scss → tags/_global.scss} +12 -11
  37. package/scss/tags/_index.scss +5 -6
  38. package/scss/tags/_unit.scss +4 -11
  39. package/scss/variables/_color.scss +18 -20
  40. package/scss/variables/_device.scss +179 -73
  41. package/scss/variables/_index.scss +21 -22
  42. package/scss/variables/_layer.scss +26 -35
  43. package/scss/variables/_paper.scss +1022 -241
  44. package/scss/variables/_ratio.scss +148 -90
  45. package/scss/variables/_scale.scss +141 -115
  46. package/scss/variables/_unit.scss +20 -35
  47. package/scss/variables/_view.scss +54 -57
  48. package/ts/AspectRatio.ts +27 -6
  49. package/ts/Border.ts +35 -4
  50. package/ts/BoxModel.ts +32 -4
  51. package/ts/FlexContainer.ts +36 -9
  52. package/ts/Grid.ts +28 -3
  53. package/ts/GridContainer.ts +29 -3
  54. package/ts/Layout.ts +37 -7
  55. package/ts/Position.ts +29 -4
  56. package/ts/Rectangle.ts +26 -3
  57. package/ts/ResponsiveImage.ts +22 -3
  58. package/ts/ResponsiveScale.ts +25 -2
  59. package/ts/Size.ts +25 -3
  60. package/ts/Spacing.ts +45 -7
  61. package/ts/Transform.ts +37 -4
  62. package/ts/Typography.ts +40 -6
  63. package/ts/Unit.ts +34 -10
  64. package/ts/Viewport.ts +31 -3
  65. package/ts/index.ts +1 -16
  66. package/scss/utilities/_guides.scss +0 -103
  67. package/scss/utilities/_index.scss +0 -6
@@ -3,15 +3,15 @@
3
3
  // ============================================================================
4
4
 
5
5
  ////
6
- ///
6
+ ///
7
7
  /// Variables Module
8
8
  /// ===========================================================================
9
- ///
9
+ ///
10
10
  /// This module consolidates and forwards SCSS partials that define variables
11
11
  /// for consistent use throughout the project. Each forwarded file encapsulates
12
12
  /// a specific category of variables, ensuring modularity, clarity, and ease of
13
13
  /// maintenance.
14
- ///
14
+ ///
15
15
  /// Forwarded Modules Overview:
16
16
  /// - `layer`: Variables related to layout layers and z-indexing.
17
17
  /// - `paper`: Defines color palettes, textures, and backgrounds.
@@ -21,14 +21,14 @@
21
21
  /// - `device`: Device-specific configurations to enhance responsive design.
22
22
  /// - `color`: Centralized color definitions for consistent theming.
23
23
  /// - `ratio`: Aspect ratio configurations for responsive elements.
24
- ///
24
+ ///
25
25
  /// @group Variables
26
26
  /// @author Scape Agency
27
27
  /// @link https://unit.gl
28
28
  /// @since 0.1.0 initial release
29
29
  /// @todo None
30
30
  /// @access public
31
- ///
31
+ ///
32
32
  ////
33
33
 
34
34
 
@@ -42,58 +42,57 @@
42
42
  // ============================================================================
43
43
 
44
44
 
45
- ///
45
+ ///
46
46
  /// Forwards variables related to layout layers and z-indexing, ensuring
47
47
  /// consistent layering and stacking order throughout the project.
48
- ///
48
+ ///
49
49
  @forward "layer"; // Layout layers and z-index variables
50
50
 
51
51
 
52
- ///
52
+ ///
53
53
  /// Forwards variables defining paper sizes etc.
54
- ///
54
+ ///
55
55
  @forward "paper";
56
56
 
57
57
 
58
- ///
58
+ ///
59
59
  /// Forwards variables managing scaling factors for typography and responsive
60
60
  /// elements, ensuring that elements scale proportionally across different
61
61
  /// viewports.
62
- ///
62
+ ///
63
63
  @forward "scale"; // Typography scaling and responsive element sizing
64
64
 
65
65
 
66
- ///
66
+ ///
67
67
  /// Forwards viewport-specific variables, such as breakpoints, to facilitate
68
68
  /// responsive design practices.
69
- ///
69
+ ///
70
70
  @forward "view"; // Viewport-specific variables and breakpoints
71
71
 
72
72
 
73
- ///
73
+ ///
74
74
  /// Forwards device-specific configurations that aid in creating responsive
75
75
  /// designs tailored to various devices.
76
- ///
76
+ ///
77
77
  @forward "device"; // Device-specific responsive design variables
78
78
 
79
79
 
80
- ///
80
+ ///
81
81
  /// Forwards centralized color definitions, providing a consistent color scheme
82
82
  /// across the project.
83
- ///
83
+ ///
84
84
  @forward "color"; // Centralized color definitions for the project
85
85
 
86
86
 
87
- ///
87
+ ///
88
88
  /// Forwards aspect ratio configurations that ensure responsive elements
89
89
  /// maintain their intended proportions across different devices and viewports.
90
- ///
90
+ ///
91
91
  @forward "ratio"; // Aspect ratio configurations for responsive elements
92
92
 
93
- ///
93
+ ///
94
94
  /// Forwards variables related to measurement units, spacing, and size
95
95
  /// definitions. Useful for maintaining consistent sizing across different
96
96
  /// components.
97
- ///
97
+ ///
98
98
  @forward "unit"; // Measurement units and spacing
99
-
@@ -3,17 +3,17 @@
3
3
  // ============================================================================
4
4
 
5
5
  ////
6
- ///
6
+ ///
7
7
  /// Layer Variables Module
8
8
  /// ===========================================================================
9
- ///
9
+ ///
10
10
  /// @group Layer
11
11
  /// @author Scape Agency
12
12
  /// @link https://unit.gl
13
13
  /// @since 0.1.0 initial release
14
14
  /// @todo None
15
15
  /// @access public
16
- ///
16
+ ///
17
17
  ////
18
18
 
19
19
 
@@ -27,33 +27,33 @@
27
27
  // ============================================================================
28
28
 
29
29
 
30
- ///
30
+ ///
31
31
  /// Z-Index Layer Map
32
32
  /// ---------------------------------------------------------------------------
33
33
  ///
34
34
  /// A map defining the z-index layers used to manage the stacking order of UI
35
35
  /// elements. Each key in the map represents a specific layer, with an
36
36
  /// associated numeric value indicating its z-index.
37
- ///
37
+ ///
38
38
  /// This map defines the z-index layers used throughout the project to manage
39
39
  /// the stacking order of various interface elements. Adjustments can be made
40
40
  /// by modifying the values associated with each layer.
41
- ///
41
+ ///
42
42
  /// - **Guides**: High-priority overlays for design guides.
43
43
  /// - **Overlays**: Elements like modals that need to appear above other content.
44
44
  /// - **Interface Elements**: General UI components, ribbons, and controls.
45
45
  /// - **Content**: Main content areas, typically stacked below UI elements.
46
46
  /// - **Background Layers**: Base layers like canvases, typically behind content.
47
47
  /// - **Special Values**: Special z-index values for maximum, minimum, and baseline.
48
- ///
48
+ ///
49
49
  /// @name layers
50
50
  /// @type Map
51
- ///
51
+ ///
52
52
  /// @example scss - Usage Example
53
53
  /// .element {
54
- /// z-index: z('modal');
54
+ /// z-index: z("modal");
55
55
  /// }
56
- ///
56
+ ///
57
57
  /// @todo Add more layers as needed, ensuring consistent and clear naming.
58
58
  ///
59
59
  $layers: (
@@ -61,95 +61,86 @@ $layers: (
61
61
  // ========================================================================
62
62
  // Guides
63
63
  // ========================================================================
64
-
64
+
65
65
  /// High-priority guide overlays for design and debugging.
66
66
  /// @name guides
67
67
  /// @type Number
68
- "guides": 9998, // High priority guide overlays
68
+ "guides": 9998,
69
69
 
70
-
71
70
  /// Baseline guide used for text alignment and visual rhythm.
72
71
  /// @name guide_baseline
73
72
  /// @type Number
74
- "guide_baseline": 3000, // Baseline guide for text alignment
73
+ "guide_baseline": 3000,
75
74
 
76
-
77
75
  /// Graphical guides, such as grid overlays, used in design.
78
76
  /// @name guide_graph
79
77
  /// @type Number
80
- "guide_graph": 3100, // Graphical guides, such as grids
78
+ "guide_graph": 3100,
81
79
 
82
80
  // ========================================================================
83
81
  // Overlays
84
82
  // ========================================================================
85
83
 
86
-
87
- /// Z-index for modals and dialog boxes, ensuring they appear above other content.
84
+ /// Z-index for modals and dialog boxes, ensuring they appear above other
85
+ /// content.
88
86
  /// @name modal
89
87
  /// @type Number
90
- "modal": 7000, // Modals and dialog boxes
88
+ "modal": 7000,
91
89
 
92
90
  // ========================================================================
93
91
  // Interface Elements
94
92
  // ========================================================================
95
93
 
96
-
97
94
  /// Z-index for top ribbons and banners that overlay other UI elements.
98
95
  /// @name ribbon
99
96
  /// @type Number
100
- "ribbon": 5000, // Top ribbons, banners
97
+ "ribbon": 5000,
101
98
 
102
-
103
99
  /// General interface elements like headers, footers, and sidebars.
104
100
  /// @name interface
105
101
  /// @type Number
106
- "interface": 4000, // General interface elements
102
+ "interface": 4000,
107
103
 
108
-
109
104
  /// Controls like buttons, sliders, and other interactive elements.
110
105
  /// @name control
111
106
  /// @type Number
112
- "control": 3000, // Controls like buttons, sliders
107
+ "control": 3000,
113
108
 
114
109
  // ========================================================================
115
110
  // Content
116
111
  // ========================================================================
117
112
 
118
-
119
113
  /// Main content area, typically stacked below UI elements.
120
114
  /// @name content
121
115
  /// @type Number
122
- "content": 2000, // Main content area
116
+ "content": 2000,
123
117
 
124
118
  // ========================================================================
125
119
  // Background Layers
126
120
  // ========================================================================
127
121
 
128
-
129
122
  /// Background canvas or base layer, typically the lowest layer.
130
123
  /// @name canvas
131
124
  /// @type Number
132
- "canvas": -1000, // Background canvas or base layer
125
+ "canvas": -1000,
133
126
 
134
127
  // ========================================================================
135
128
  // Special Values
136
129
  // ========================================================================
137
-
130
+
138
131
  /// Maximum possible z-index value.
139
132
  /// @name max
140
133
  /// @type Number
141
- "max": 9999, // Maximum possible z-index
134
+ "max": 9999,
142
135
 
143
-
144
136
  /// Default, baseline z-index value.
145
137
  /// @name mid
146
138
  /// @type Number
147
- "mid": 0, // Default, baseline z-index
139
+ "mid": 0,
148
140
 
149
-
150
141
  /// Minimum possible z-index value.
151
142
  /// @name min
152
143
  /// @type Number
153
- "min":m-9999, // Minimum possible z-index
144
+ "min": -9999,
154
145
 
155
146
  ) !default;