@ulu/frontend 0.1.0-beta.106 → 0.1.0-beta.108

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 (182) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/ulu-frontend.min.css +1 -1
  3. package/docs-dev/changelog/index.html +111 -0
  4. package/docs-dev/demos/accordion/index.html +90 -0
  5. package/docs-dev/demos/badge/index.html +90 -0
  6. package/docs-dev/demos/badge-stack/index.html +90 -0
  7. package/docs-dev/demos/breadcrumb/index.html +90 -0
  8. package/docs-dev/demos/breakpoints-manager/index.html +90 -0
  9. package/docs-dev/demos/button/index.html +90 -0
  10. package/docs-dev/demos/button-group/index.html +90 -0
  11. package/docs-dev/demos/button-verbose/index.html +90 -0
  12. package/docs-dev/demos/callout/index.html +90 -0
  13. package/docs-dev/demos/captioned-figure/index.html +90 -0
  14. package/docs-dev/demos/card/index.html +106 -16
  15. package/docs-dev/demos/card-grid/index.html +90 -0
  16. package/docs-dev/demos/counter-list/index.html +90 -0
  17. package/docs-dev/demos/css-icons/index.html +90 -0
  18. package/docs-dev/demos/data-grid/index.html +90 -0
  19. package/docs-dev/demos/data-table/index.html +190 -100
  20. package/docs-dev/demos/details-group/index.html +90 -0
  21. package/docs-dev/demos/donut-chart/index.html +5874 -0
  22. package/docs-dev/demos/file-save/index.html +90 -0
  23. package/docs-dev/demos/flipcard/index.html +90 -0
  24. package/docs-dev/demos/form-theme/index.html +93 -3
  25. package/docs-dev/demos/headline-label/index.html +90 -0
  26. package/docs-dev/demos/index.html +90 -0
  27. package/docs-dev/demos/list-inline/index.html +90 -0
  28. package/docs-dev/demos/list-lines/index.html +90 -0
  29. package/docs-dev/demos/menu-stack/index.html +90 -0
  30. package/docs-dev/demos/modals/index.html +90 -0
  31. package/docs-dev/demos/nav-strip/index.html +90 -0
  32. package/docs-dev/demos/overlay-section/index.html +90 -0
  33. package/docs-dev/demos/panel/index.html +90 -0
  34. package/docs-dev/demos/popovers/index.html +90 -0
  35. package/docs-dev/demos/print/index.html +90 -0
  36. package/docs-dev/demos/progress-bar/index.html +90 -0
  37. package/docs-dev/demos/progress-circle/index.html +6137 -0
  38. package/docs-dev/demos/progress-donut/index.html +6107 -0
  39. package/docs-dev/demos/pull-quote/index.html +90 -0
  40. package/docs-dev/demos/rail/index.html +90 -0
  41. package/docs-dev/demos/rule/index.html +90 -0
  42. package/docs-dev/demos/scrollpoints/index.html +90 -0
  43. package/docs-dev/demos/skeleton/index.html +90 -0
  44. package/docs-dev/demos/spoke-spinner/index.html +90 -0
  45. package/docs-dev/demos/sticky-list/index.html +90 -0
  46. package/docs-dev/demos/tabs/index.html +90 -0
  47. package/docs-dev/demos/tag/index.html +90 -0
  48. package/docs-dev/demos/theme-toggle/index.html +90 -0
  49. package/docs-dev/demos/tiles/index.html +90 -0
  50. package/docs-dev/demos/tooltip/index.html +90 -0
  51. package/docs-dev/demos/wysiwyg/index.html +90 -0
  52. package/docs-dev/guide/building-stylesheet/index.html +90 -0
  53. package/docs-dev/guide/developing-ulu-scss-module/index.html +90 -0
  54. package/docs-dev/guide/index.html +90 -0
  55. package/docs-dev/index.html +90 -0
  56. package/docs-dev/javascript/events/index.html +90 -0
  57. package/docs-dev/javascript/index.html +90 -0
  58. package/docs-dev/javascript/settings/index.html +90 -0
  59. package/docs-dev/javascript/ui-breakpoints/index.html +90 -0
  60. package/docs-dev/javascript/ui-collapsible/index.html +90 -0
  61. package/docs-dev/javascript/ui-details-group/index.html +90 -0
  62. package/docs-dev/javascript/ui-dialog/index.html +90 -0
  63. package/docs-dev/javascript/ui-flipcard/index.html +90 -0
  64. package/docs-dev/javascript/ui-grid/index.html +90 -0
  65. package/docs-dev/javascript/ui-modal-builder/index.html +90 -0
  66. package/docs-dev/javascript/ui-overflow-scroller/index.html +90 -0
  67. package/docs-dev/javascript/ui-overflow-scroller-pager/index.html +90 -0
  68. package/docs-dev/javascript/ui-page/index.html +90 -0
  69. package/docs-dev/javascript/ui-popover/index.html +90 -0
  70. package/docs-dev/javascript/ui-print/index.html +90 -0
  71. package/docs-dev/javascript/ui-print-details/index.html +90 -0
  72. package/docs-dev/javascript/ui-programmatic-modal/index.html +90 -0
  73. package/docs-dev/javascript/ui-proxy-click/index.html +90 -0
  74. package/docs-dev/javascript/ui-resizer/index.html +90 -0
  75. package/docs-dev/javascript/ui-scroll-slider/index.html +90 -0
  76. package/docs-dev/javascript/ui-scrollpoint/index.html +90 -0
  77. package/docs-dev/javascript/ui-slider/index.html +90 -0
  78. package/docs-dev/javascript/ui-tabs/index.html +90 -0
  79. package/docs-dev/javascript/ui-theme-toggle/index.html +90 -0
  80. package/docs-dev/javascript/ui-tooltip/index.html +90 -0
  81. package/docs-dev/javascript/utils-class-logger/index.html +90 -0
  82. package/docs-dev/javascript/utils-css/index.html +90 -0
  83. package/docs-dev/javascript/utils-dom/index.html +90 -0
  84. package/docs-dev/javascript/utils-file-save/index.html +90 -0
  85. package/docs-dev/javascript/utils-floating-ui/index.html +90 -0
  86. package/docs-dev/javascript/utils-id/index.html +90 -0
  87. package/docs-dev/javascript/utils-pause-youtube-video/index.html +90 -0
  88. package/docs-dev/javascript/utils-system/index.html +90 -0
  89. package/docs-dev/sass/base/color/index.html +90 -0
  90. package/docs-dev/sass/base/elements/index.html +90 -0
  91. package/docs-dev/sass/base/index/index.html +90 -0
  92. package/docs-dev/sass/base/index.html +90 -0
  93. package/docs-dev/sass/base/keyframes/index.html +90 -0
  94. package/docs-dev/sass/base/layout/index.html +90 -0
  95. package/docs-dev/sass/base/normalize/index.html +90 -0
  96. package/docs-dev/sass/base/print/index.html +90 -0
  97. package/docs-dev/sass/base/root/index.html +90 -0
  98. package/docs-dev/sass/base/typography/index.html +90 -0
  99. package/docs-dev/sass/components/accordion/index.html +90 -0
  100. package/docs-dev/sass/components/adaptive-spacing/index.html +90 -0
  101. package/docs-dev/sass/components/badge/index.html +90 -0
  102. package/docs-dev/sass/components/badge-stack/index.html +90 -0
  103. package/docs-dev/sass/components/basic-hero/index.html +90 -0
  104. package/docs-dev/sass/components/breadcrumb/index.html +90 -0
  105. package/docs-dev/sass/components/button/index.html +90 -0
  106. package/docs-dev/sass/components/button-group/index.html +90 -0
  107. package/docs-dev/sass/components/button-verbose/index.html +90 -0
  108. package/docs-dev/sass/components/callout/index.html +90 -0
  109. package/docs-dev/sass/components/captioned-figure/index.html +90 -0
  110. package/docs-dev/sass/components/card/index.html +90 -0
  111. package/docs-dev/sass/components/card-grid/index.html +90 -0
  112. package/docs-dev/sass/components/counter-list/index.html +90 -0
  113. package/docs-dev/sass/components/css-icon/index.html +90 -0
  114. package/docs-dev/sass/components/data-grid/index.html +90 -0
  115. package/docs-dev/sass/components/data-table/index.html +90 -0
  116. package/docs-dev/sass/components/fill-context/index.html +90 -0
  117. package/docs-dev/sass/components/flipcard/index.html +90 -0
  118. package/docs-dev/sass/components/flipcard-grid/index.html +90 -0
  119. package/docs-dev/sass/components/form-theme/index.html +90 -0
  120. package/docs-dev/sass/components/headline-label/index.html +90 -0
  121. package/docs-dev/sass/components/hero/index.html +90 -0
  122. package/docs-dev/sass/components/horizontal-rule/index.html +90 -0
  123. package/docs-dev/sass/components/image-grid/index.html +90 -0
  124. package/docs-dev/sass/components/index/index.html +103 -10
  125. package/docs-dev/sass/components/index.html +90 -0
  126. package/docs-dev/sass/components/links/index.html +90 -0
  127. package/docs-dev/sass/components/list-inline/index.html +90 -0
  128. package/docs-dev/sass/components/list-lines/index.html +90 -0
  129. package/docs-dev/sass/components/list-ordered/index.html +90 -0
  130. package/docs-dev/sass/components/list-unordered/index.html +90 -0
  131. package/docs-dev/sass/components/menu-stack/index.html +90 -0
  132. package/docs-dev/sass/components/modal/index.html +90 -0
  133. package/docs-dev/sass/components/nav-strip/index.html +90 -0
  134. package/docs-dev/sass/components/overlay-section/index.html +90 -0
  135. package/docs-dev/sass/components/pager/index.html +90 -0
  136. package/docs-dev/sass/components/panel/index.html +90 -0
  137. package/docs-dev/sass/components/placeholder-block/index.html +90 -0
  138. package/docs-dev/sass/components/popover/index.html +90 -0
  139. package/docs-dev/sass/components/progress-bar/index.html +6192 -0
  140. package/docs-dev/sass/components/progress-circle/index.html +6084 -0
  141. package/docs-dev/sass/components/pull-quote/index.html +90 -0
  142. package/docs-dev/sass/components/rail/index.html +90 -0
  143. package/docs-dev/sass/components/ratio-box/index.html +90 -0
  144. package/docs-dev/sass/components/rule/index.html +90 -0
  145. package/docs-dev/sass/components/scroll-slider/index.html +90 -0
  146. package/docs-dev/sass/components/skeleton/index.html +90 -0
  147. package/docs-dev/sass/components/skip-link/index.html +90 -0
  148. package/docs-dev/sass/components/slider/index.html +90 -0
  149. package/docs-dev/sass/components/spoke-spinner/index.html +90 -0
  150. package/docs-dev/sass/components/sticky-list/index.html +90 -0
  151. package/docs-dev/sass/components/tabs/index.html +90 -0
  152. package/docs-dev/sass/components/tag/index.html +90 -0
  153. package/docs-dev/sass/components/tile-button/index.html +90 -0
  154. package/docs-dev/sass/components/tile-grid/index.html +90 -0
  155. package/docs-dev/sass/components/tile-grid-overlay/index.html +90 -0
  156. package/docs-dev/sass/components/vignette/index.html +90 -0
  157. package/docs-dev/sass/components/wysiwyg/index.html +90 -0
  158. package/docs-dev/sass/core/breakpoint/index.html +90 -0
  159. package/docs-dev/sass/core/button/index.html +90 -0
  160. package/docs-dev/sass/core/color/index.html +166 -71
  161. package/docs-dev/sass/core/cssvar/index.html +90 -0
  162. package/docs-dev/sass/core/element/index.html +90 -0
  163. package/docs-dev/sass/core/index.html +90 -0
  164. package/docs-dev/sass/core/layout/index.html +90 -0
  165. package/docs-dev/sass/core/path/index.html +90 -0
  166. package/docs-dev/sass/core/selector/index.html +90 -0
  167. package/docs-dev/sass/core/typography/index.html +90 -0
  168. package/docs-dev/sass/core/units/index.html +90 -0
  169. package/docs-dev/sass/core/utils/index.html +90 -0
  170. package/docs-dev/sass/helpers/color/index.html +90 -0
  171. package/docs-dev/sass/helpers/display/index.html +90 -0
  172. package/docs-dev/sass/helpers/index/index.html +90 -0
  173. package/docs-dev/sass/helpers/index.html +90 -0
  174. package/docs-dev/sass/helpers/typography/index.html +90 -0
  175. package/docs-dev/sass/helpers/units/index.html +90 -0
  176. package/docs-dev/sass/helpers/utilities/index.html +91 -1
  177. package/docs-dev/sass/index.html +90 -0
  178. package/package.json +1 -1
  179. package/scss/_color.scss +43 -38
  180. package/scss/components/_index.scss +7 -0
  181. package/scss/components/_progress-bar.scss +2 -5
  182. package/scss/components/_progress-circle.scss +175 -0
@@ -0,0 +1,175 @@
1
+ ////
2
+ /// @group progress-circle
3
+ /// A circular progress indicator.
4
+ ////
5
+
6
+ @use "sass:map";
7
+ @use "sass:math";
8
+ @use "../selector";
9
+ @use "../utils";
10
+ @use "../color";
11
+
12
+ /// Module Settings
13
+ /// @type Map
14
+ /// @prop {Dimension} size [100px] The width and height of the chart.
15
+ /// @prop {Number} viewbox-size [32] The size of the SVG viewbox. Used to calculate mask radius.
16
+ /// @prop {Number} stroke-width [10] The width of the progress circle's stroke.
17
+ /// @prop {Color} color-track ["placeholder-background-alt"] The color of the inactive track. Can be a theme color name or a CSS variable.
18
+ /// @prop {Color} color-progress ["indicator"] The color of the progress stroke in a neutral state. Can be a theme color name or a CSS variable.
19
+ /// @prop {Color} color-mask [white] The color of the center mask that creates the donut hole. Can be a theme color name or a CSS variable.
20
+ /// @prop {Color} color-mask-pie [rgba(255, 255, 255, 0.5)] The mask color when using the pie style modifier.
21
+ /// @prop {Color} value-color ["type"] The theme color name for the percentage text inside the circle.
22
+ /// @prop {Color} value-color-outside ["type-tertiary"] The theme color name for the percentage text when displayed outside the circle.
23
+ /// @prop {Dimension | List} value-margin-outside [(0.1em 0.35em)] The margin for the outside value text.
24
+ /// @prop {Time} transition-duration [300ms] The duration for the stroke transition animation (when the component is updating already in the page)
25
+ /// @prop {Time} animation-duration [1s] The duration for the stroke animation (relies on template having a custom build animation per pie based on dash array). This is used for initial animations
26
+ /// @prop {Time} animation-delay [2s] The delay for the animation
27
+ /// @prop {Time} animation-timing [ease-in] Timing function for animation
28
+ /// @prop {Map} status-colors A map of status names to their corresponding colors (e.g., "low": "warning").
29
+ /// @prop {Map} sizes A map of size variations. Each key is a modifier name (e.g., "small") and the value is a map with `size` and `stroke-width` properties.
30
+
31
+ $config: (
32
+ "size": 100px,
33
+ "viewbox-size": 32,
34
+ "stroke-width": 10,
35
+ "color-track": "placeholder-background-alt",
36
+ "color-progress": "indicator",
37
+ "color-mask": white,
38
+ "color-mask-pie": rgba(255, 255, 255, 0.4),
39
+ "value-color": "type",
40
+ "value-color-outside": "type-tertiary",
41
+ "value-margin-outside" : (0.1em 0.35em),
42
+ "transition-duration" : 300ms,
43
+ "animation-duration" : 1s,
44
+ "animation-delay" : 2s,
45
+ "animation-timing" : ease-in,
46
+ "status-colors": (
47
+ "low": "danger",
48
+ "incomplete": "warning",
49
+ "complete": "success",
50
+ ),
51
+ "sizes": (
52
+ "small" : (
53
+ "size": 40px,
54
+ "stroke-width": 13,
55
+ )
56
+ )
57
+ ) !default;
58
+
59
+ /// Change modules $config
60
+ /// @param {Map} $changes Map of changes
61
+ @mixin set($changes) {
62
+ $config: map.merge($config, $changes) !global;
63
+ }
64
+
65
+ /// Get a config option
66
+ /// @param {String} $name Name of property
67
+ @function get($name) {
68
+ @return utils.require-map-get($config, $name, "progress-circle [config]");
69
+ }
70
+
71
+ /// Prints component styles
72
+ /// @demo progress-circle
73
+ @mixin styles {
74
+ $prefix: selector.class("progress-circle");
75
+
76
+ #{ $prefix } {
77
+ display: flex;
78
+ flex-direction: column;
79
+ align-items: center;
80
+ text-align: center;
81
+ --ulu-progress-circle-stroke-width: #{ get("stroke-width") };
82
+ }
83
+ #{ $prefix }__chart {
84
+ position: relative;
85
+ line-height: 1;
86
+ }
87
+ #{ $prefix }__chart-value {
88
+ position: absolute;
89
+ top: 50%;
90
+ left: 50%;
91
+ transform: translate(-50%, -50%);
92
+ color: color.get(get("value-color"));
93
+ text-shadow: none;
94
+ }
95
+ #{ $prefix }__chart-svg {
96
+ width: get("size");
97
+ height: get("size");
98
+ transform: rotate(-90deg);
99
+ border-radius: 50%;
100
+ }
101
+ #{ $prefix }__chart-track {
102
+ fill: transparent;
103
+ stroke: color.get(get("color-track"));
104
+ stroke-width: var(--ulu-progress-circle-stroke-width);
105
+ }
106
+ #{ $prefix }__chart-pie {
107
+ fill: transparent;
108
+ stroke: color.get(get("color-progress"));
109
+ stroke-width: var(--ulu-progress-circle-stroke-width);
110
+ stroke-dasharray: 0 100;
111
+ will-change: stroke-dasharray;
112
+ // If value is changing
113
+ transition: stroke get("transition-duration");
114
+ // For in template composed initial animation
115
+ animation-duration: get("animation-duration");
116
+ animation-delay: get("animation-delay");
117
+ animation-timing-function: get("animation-timing");
118
+ }
119
+ #{ $prefix }__chart-mask {
120
+ fill: color.get(get("color-mask"));
121
+ r: calc( (get("viewbox-size") / 2) - (var(--ulu-progress-circle-stroke-width) / 2) );
122
+ }
123
+ #{ $prefix }__value {
124
+ color: color.get(get("value-color-outside"));
125
+ margin: get("value-margin-outside");
126
+ font-weight: normal;
127
+ line-height: 1;
128
+ }
129
+
130
+ #{ $prefix }--outside {
131
+ flex-direction: row;
132
+ justify-content: center;
133
+ flex-wrap: wrap;
134
+ }
135
+ #{ $prefix }--outside-below {
136
+ display: block;
137
+ }
138
+ #{ $prefix }--pie {
139
+ // Note do not adjust the custom property for this since we want the mask to still be sized correctly
140
+ #{ $prefix }__chart-pie {
141
+ stroke-width: get("viewbox-size"); // As large as the svg (so it fills the circle)
142
+ }
143
+ #{ $prefix }__chart-track {
144
+ fill: color.get(get("color-track"));
145
+ }
146
+ #{ $prefix }__chart-mask {
147
+ fill: color.get(get("color-mask-pie"));
148
+ }
149
+ }
150
+ #{ $prefix }--no-mask {
151
+ #{ $prefix }__chart-mask {
152
+ display: none;
153
+ }
154
+ }
155
+
156
+
157
+ @each $name, $props in get("sizes") {
158
+ #{ $prefix }--#{ $name } {
159
+ --ulu-progress-circle-stroke-width: #{map.get($props, "stroke-width")};
160
+ #{ $prefix }__chart-svg {
161
+ width: map.get($props, "size");
162
+ height: map.get($props, "size");
163
+ }
164
+ }
165
+ }
166
+ @each $name, $color in get("status-colors") {
167
+ #{ $prefix }--#{ $name } {
168
+ #{ $prefix }__chart-pie {
169
+ stroke: color.get($color);
170
+ }
171
+ }
172
+ }
173
+
174
+
175
+ }