@heliux-org/ui-style 1.0.130 → 1.0.132
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/dist/functions/functions/_camelize.scss +25 -0
- package/dist/functions/functions/_capitalize.scss +11 -0
- package/dist/functions/functions/_contain.scss +8 -0
- package/dist/functions/functions/_extract-rgb.scss +8 -0
- package/dist/functions/functions/_map-collect.scss +17 -0
- package/dist/mixins/mixins/_common.scss +67 -0
- package/dist/mixins/mixins/_states.scss +48 -0
- package/dist/mixins/mixins/_typography.scss +24 -0
- package/package.json +2 -2
- /package/dist/{colors.json → files/colors.json} +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// FUNCTIONS: Camelize string
|
|
2
|
+
|
|
3
|
+
// Modules imports
|
|
4
|
+
@use "sass:string";
|
|
5
|
+
|
|
6
|
+
// @arguments [string] $string
|
|
7
|
+
// @return camelcase string
|
|
8
|
+
@function camelize($string) {
|
|
9
|
+
$progress: $string;
|
|
10
|
+
$result: "";
|
|
11
|
+
$exclude: " ", "-", "–", "—", "_", ",", ";", ":", ".";
|
|
12
|
+
|
|
13
|
+
@while str-length($progress) > 0 {
|
|
14
|
+
$char: string.slice($progress, 1, 1);
|
|
15
|
+
|
|
16
|
+
@if contain($exclude, $char) {
|
|
17
|
+
$progress: capitalize(string.slice($progress, 2, 2)) + string.slice($progress, 3);
|
|
18
|
+
} @else {
|
|
19
|
+
$result: $result + $char;
|
|
20
|
+
$progress: string.slice($progress, 2);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@return $result;
|
|
25
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// MIXINS: Capitalize
|
|
2
|
+
// - Helper function
|
|
3
|
+
|
|
4
|
+
// Modules imports
|
|
5
|
+
@use "sass:string";
|
|
6
|
+
|
|
7
|
+
// @arguments: $string
|
|
8
|
+
// @return capitalize string
|
|
9
|
+
@function capitalize($string) {
|
|
10
|
+
@return to-upper-case(string.slice($string, 1, 1)) + string.slice($string, 2);
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// MIXINS: Extract Rgb
|
|
2
|
+
// @arguments $color (can be hardcoded or $color)
|
|
3
|
+
// @return: comma separated RGB values
|
|
4
|
+
// Use: We use "extract-rgb" when we want to return a comma separated list of rgb values from a color.
|
|
5
|
+
// - We use it in some of our token assignments and their custom-properties output.
|
|
6
|
+
@function extract-rgb($color) {
|
|
7
|
+
@return red($color), green($color), blue($color);
|
|
8
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// MIXINS: Map Collect
|
|
2
|
+
|
|
3
|
+
// Modules imports
|
|
4
|
+
@use "sass:map";
|
|
5
|
+
|
|
6
|
+
// @arguments: multiple coma separated $maps.
|
|
7
|
+
// @return: a single map with merged values.
|
|
8
|
+
// Use: we use "map-collect" to merge maps from different scopes.
|
|
9
|
+
// - We assume there will be no key duplication since scopes are separated.
|
|
10
|
+
@function map-collect($maps...) {
|
|
11
|
+
$collection: ();
|
|
12
|
+
|
|
13
|
+
@each $map in $maps {
|
|
14
|
+
$collection: map.merge($collection, $map);
|
|
15
|
+
}
|
|
16
|
+
@return $collection;
|
|
17
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
$expand-animation-timing: cubic-bezier(0, 0, 0.35, 1);
|
|
2
|
+
|
|
3
|
+
// Grid auto fit sizes
|
|
4
|
+
$grid-auto-fit-cell-width-small: 120px;
|
|
5
|
+
$grid-auto-fit-cell-width-medium: 180px;
|
|
6
|
+
$grid-auto-fit-cell-width-large: 240px;
|
|
7
|
+
$grid-auto-fit-cell-width-xl: 300px;
|
|
8
|
+
|
|
9
|
+
@mixin hidden-element() {
|
|
10
|
+
opacity: 0;
|
|
11
|
+
width: 0;
|
|
12
|
+
height: 0;
|
|
13
|
+
position: absolute;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Grid auto fit
|
|
17
|
+
// - This mixin defines a grid with auto fit repeat cells using min-max funtion.
|
|
18
|
+
// -- This allows grid to accommodate container width without media queries.
|
|
19
|
+
// -- it uses a repeat grid function with auto fix and minmax.
|
|
20
|
+
// -- grid adaptation is due to the min value along with auto-fit and 1fr max value.
|
|
21
|
+
|
|
22
|
+
// @params:
|
|
23
|
+
// - $grid-gap: null , defines grid "gap" attribute.
|
|
24
|
+
// - $grid-column-gap: null, defines grid "column-gap" attribute.
|
|
25
|
+
// - $grid-row-gap: null, defines grid "row-gap" attribute.
|
|
26
|
+
// - $grid-cell-min-width: {mandatory}, defined min value in for grid-template-columns
|
|
27
|
+
// - $grid-cell-array-calc: {mandatory}, defined max num of items using calc
|
|
28
|
+
|
|
29
|
+
@mixin grid-auto-fit(
|
|
30
|
+
$grid-gap: null,
|
|
31
|
+
$grid-column-gap: null,
|
|
32
|
+
$grid-row-gap: null,
|
|
33
|
+
$grid-cell-min-width,
|
|
34
|
+
$grid-cell-array-calc: null,
|
|
35
|
+
$important: false
|
|
36
|
+
) {
|
|
37
|
+
display: grid;
|
|
38
|
+
@if $important {
|
|
39
|
+
grid-template-columns: repeat(
|
|
40
|
+
auto-fit,
|
|
41
|
+
minmax(clamp(#{$grid-cell-array-calc}, #{$grid-cell-min-width}, 100%), 1fr)
|
|
42
|
+
) !important;
|
|
43
|
+
gap: $grid-gap !important;
|
|
44
|
+
column-gap: $grid-column-gap !important;
|
|
45
|
+
row-gap: $grid-row-gap !important;
|
|
46
|
+
} @else {
|
|
47
|
+
grid-template-columns: repeat(
|
|
48
|
+
auto-fit,
|
|
49
|
+
minmax(clamp(#{$grid-cell-array-calc}, #{$grid-cell-min-width}, 100%), 1fr)
|
|
50
|
+
);
|
|
51
|
+
gap: $grid-gap;
|
|
52
|
+
column-gap: $grid-column-gap;
|
|
53
|
+
row-gap: $grid-row-gap;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@mixin scroller($width: 4px, $height: 6px, $color: var(--divider-primary)) {
|
|
58
|
+
&::-webkit-scrollbar {
|
|
59
|
+
width: $width;
|
|
60
|
+
height: $height;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&::-webkit-scrollbar-thumb {
|
|
64
|
+
background-color: $color;
|
|
65
|
+
border-radius: 4px;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
@mixin disabled {
|
|
2
|
+
border-color: var(--disabled-background-color);
|
|
3
|
+
color: var(--disabled-text-color);
|
|
4
|
+
cursor: not-allowed;
|
|
5
|
+
|
|
6
|
+
&:hover {
|
|
7
|
+
background-color: transparent;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@mixin reset-button {
|
|
12
|
+
border: none;
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: 0;
|
|
15
|
+
width: auto;
|
|
16
|
+
overflow: visible;
|
|
17
|
+
background: transparent;
|
|
18
|
+
|
|
19
|
+
/* inherit font & color from ancestor */
|
|
20
|
+
color: inherit;
|
|
21
|
+
font: inherit;
|
|
22
|
+
|
|
23
|
+
/* Normalize `line-height`. Cannot be changed from `normal` in Firefox 4+. */
|
|
24
|
+
line-height: normal;
|
|
25
|
+
|
|
26
|
+
/* Corrects font smoothing for webkit */
|
|
27
|
+
-webkit-font-smoothing: inherit;
|
|
28
|
+
-moz-osx-font-smoothing: inherit;
|
|
29
|
+
|
|
30
|
+
/* Corrects inability to style clickable `input` types in iOS */
|
|
31
|
+
appearance: none;
|
|
32
|
+
|
|
33
|
+
@include focus-style;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@mixin focus-style($focus-radius: 4px) {
|
|
37
|
+
&:focus-visible,
|
|
38
|
+
&.focus-visible {
|
|
39
|
+
outline: none;
|
|
40
|
+
z-index: 11;
|
|
41
|
+
border-radius: $focus-radius;
|
|
42
|
+
box-shadow: 0 0 0 3px hsl(209deg 100% 50% / 50%), 0 0 0 1px var(--primary-hover-color) inset;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:focus:not(.focus-visible) {
|
|
46
|
+
outline: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@mixin vibe-text($type-prefix, $weight-type) {
|
|
2
|
+
font: var(--font-#{$type-prefix}-#{$weight-type});
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
@mixin vibe-heading($type-prefix, $weight-type) {
|
|
6
|
+
font: var(--font-#{$type-prefix}-#{$weight-type});
|
|
7
|
+
letter-spacing: var(--letter-spacing-#{$type-prefix}-#{$weight-type});
|
|
8
|
+
-webkit-font-smoothing: var(--font-smoothing-webkit);
|
|
9
|
+
-moz-osx-font-smoothing: var(--font-smoothing-moz);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@mixin line-clamp($lines: 1le) {
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
display: -webkit-box;
|
|
15
|
+
-webkit-line-clamp: $lines;
|
|
16
|
+
-webkit-box-orient: vertical;
|
|
17
|
+
white-space: initial; // doesn't work with white-space: no-wrap
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@mixin ellipsis {
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
text-overflow: ellipsis;
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heliux-org/ui-style",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.132",
|
|
4
4
|
"description": "Heliux UI CSS Foundations",
|
|
5
5
|
"main": "dist/index.css",
|
|
6
6
|
"scripts": {
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"sass": "^1.70.0",
|
|
67
67
|
"stylelint-config-recommended-scss": "^6.0.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "245fe57e9958d7e68ff14188f43eb0beb5cbc2e1"
|
|
70
70
|
}
|
|
File without changes
|