@octaviaflow/grid 1.0.0

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.
@@ -0,0 +1,56 @@
1
+ //
2
+ // Copyright OctaviaFlow. 2025
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ @use 'sass:meta';
9
+ @use 'sass:math';
10
+
11
+ /// Default font size
12
+ /// @type Number
13
+ /// @access public
14
+ /// @group @octaviaflow/layout
15
+ $base-font-size: 16px !default;
16
+
17
+ /// Convert a given px unit to a rem unit
18
+ /// @param {Number} $px - Number with px unit
19
+ /// @return {Number} Number with rem unit
20
+ /// @access public
21
+ /// @group @octaviaflow/layout
22
+ @function to-rem($px) {
23
+ @if math.unit($px) != 'px' {
24
+ @error "Expected argument $px to be of type `px`, instead received: `#{math.unit($px)}`";
25
+ }
26
+
27
+ @return math.div($px, $base-font-size) * 1rem;
28
+ }
29
+
30
+ /// This function causes an error when using sass > 1.65.0
31
+ /// Replaced with `to-rem` function
32
+ /// @param {Number} $px - Number with px unit
33
+ /// @return {Number} Number with rem unit
34
+ /// @access public
35
+ /// @deprecated
36
+ /// @group @octaviaflow/layout
37
+ @function rem($px) {
38
+ @if math.unit($px) != 'px' {
39
+ @error "Expected argument $px to be of type `px`, instead received: `#{math.unit($px)}`";
40
+ }
41
+
42
+ @return math.div($px, $base-font-size) * 1rem;
43
+ }
44
+
45
+ /// Convert a given px unit to a em unit
46
+ /// @param {Number} $px - Number with px unit
47
+ /// @return {Number} Number with em unit
48
+ /// @access public
49
+ /// @group @octaviaflow/layout
50
+ @function em($px) {
51
+ @if math.unit($px) != 'px' {
52
+ @error "Expected argument $px to be of type `px`, instead received: `#{math.unit($px)}`";
53
+ }
54
+
55
+ @return math.div($px, $base-font-size) * 1em;
56
+ }
package/telemetry.yml ADDED
@@ -0,0 +1,17 @@
1
+ # yaml-language-server: $schema=https://unpkg.com/@octaviaflow/telemetry-config-schema@v1.0.0/dist/config.schema.json
2
+ version: 1
3
+ projectId: '41a9fc0d-1368-4718-b519-605a5d01f644'
4
+ name: 'octaviaflow-grid'
5
+ storage:
6
+ type: 'file'
7
+ file:
8
+ directory: '/Volumes/Main/Projects/OctaviaFlow-Design-System/telemetry-logs'
9
+ fileNamePattern: 'octaviaflow-grid-{timestamp}.json'
10
+ maxFileSizeMB: 10
11
+ compress: false
12
+ collect:
13
+ npm:
14
+ dependencies: null
15
+ js:
16
+ functions: {}
17
+ tokens: null