@ulu/frontend 0.0.23 → 0.1.0-beta.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.
Files changed (211) hide show
  1. package/deprecated/js/drupal-programmatic-modal.js +91 -0
  2. package/{js/ui/modals.js → deprecated/js/micromodal-modals.js} +41 -67
  3. package/dist/ulu-frontend.min.css +1 -1
  4. package/dist/ulu-frontend.min.js +70 -1
  5. package/index.js +6 -1
  6. package/js/events/index.js +58 -7
  7. package/js/index.js +3 -7
  8. package/js/{helpers/css-breakpoint.js → ui/breakpoints.js} +9 -11
  9. package/js/ui/collapsible.js +195 -0
  10. package/js/ui/dialog.js +157 -0
  11. package/js/ui/dialog.todo +37 -0
  12. package/js/ui/flipcard.js +55 -11
  13. package/js/ui/grid.js +2 -47
  14. package/js/ui/index.js +21 -0
  15. package/js/ui/modal-builder.js +197 -0
  16. package/js/ui/overflow-scroller-pager.js +1 -1
  17. package/js/ui/overflow-scroller.js +8 -5
  18. package/js/ui/page.js +14 -0
  19. package/js/ui/popover.js +135 -0
  20. package/js/ui/print-details.js +44 -0
  21. package/js/ui/print.js +67 -0
  22. package/js/ui/programmatic-modal.js +79 -81
  23. package/js/ui/proxy-click.js +80 -0
  24. package/js/ui/resizer.js +3 -3
  25. package/js/ui/scroll-slider.js +56 -0
  26. package/js/ui/scrollpoint.js +300 -0
  27. package/js/ui/slider.js +72 -10
  28. package/js/ui/tabs.js +85 -58
  29. package/js/ui/theme-toggle.js +129 -0
  30. package/js/ui/tooltip.js +268 -67
  31. package/js/utils/{logger.js → class-logger.js} +6 -5
  32. package/js/utils/dom.js +122 -0
  33. package/js/utils/file-save.js +67 -0
  34. package/js/utils/floating-ui.js +83 -0
  35. package/js/utils/id.js +22 -0
  36. package/js/utils/index.js +7 -0
  37. package/js/{helpers → utils}/pause-youtube-video.js +1 -1
  38. package/package.json +32 -11
  39. package/resources/drupal/twig-macros/accordion.twig +99 -0
  40. package/resources/drupal/twig-macros/dropdown.twig +44 -0
  41. package/resources/drupal/twig-macros/flipcard.twig +69 -0
  42. package/resources/drupal/twig-macros/image.twig +30 -0
  43. package/resources/drupal/twig-macros/layout.twig +338 -0
  44. package/resources/drupal/twig-macros/slider.twig +214 -0
  45. package/resources/drupal/twig-macros/tabs.twig +84 -0
  46. package/scss/README.md +13 -1
  47. package/scss/_breakpoint.scss +69 -26
  48. package/scss/_button.scss +148 -57
  49. package/scss/_color.scss +46 -28
  50. package/scss/_cssvar.scss +103 -12
  51. package/scss/_element.scss +84 -67
  52. package/scss/_index.scss +0 -3
  53. package/scss/_layout.scss +57 -26
  54. package/scss/_path.scss +2 -2
  55. package/scss/_selector.scss +20 -11
  56. package/scss/_typography.scss +115 -82
  57. package/scss/_units.scss +14 -13
  58. package/scss/_utils.scss +280 -18
  59. package/scss/base/_color.scss +2 -1
  60. package/scss/base/_elements.scss +61 -35
  61. package/scss/base/_index.scss +60 -23
  62. package/scss/base/_keyframes.scss +115 -16
  63. package/scss/base/_layout.scss +10 -6
  64. package/scss/base/_normalize.scss +6 -122
  65. package/scss/base/_print.scss +49 -0
  66. package/scss/base/_root.scss +28 -0
  67. package/scss/base/_typography.scss +4 -1
  68. package/scss/components/_accordion.scss +217 -0
  69. package/scss/components/_adaptive-spacing.scss +148 -0
  70. package/scss/components/_badge.scss +17 -14
  71. package/scss/components/_button-verbose.scss +138 -0
  72. package/scss/components/_button.scss +9 -4
  73. package/scss/components/_callout.scss +175 -0
  74. package/scss/components/_captioned-figure.scss +173 -0
  75. package/scss/components/_card-grid.scss +75 -0
  76. package/scss/components/_card.scss +420 -0
  77. package/scss/components/_css-icon.scss +433 -0
  78. package/scss/{_grid.scss → components/_data-grid.scss} +100 -68
  79. package/scss/components/_data-table.scss +180 -0
  80. package/scss/components/_fill-context.scss +20 -22
  81. package/scss/components/_flipcard-grid.scss +66 -0
  82. package/scss/components/_flipcard.scss +304 -0
  83. package/scss/components/_form-theme.scss +633 -0
  84. package/scss/components/_hero.scss +183 -0
  85. package/scss/components/_horizontal-rule.scss +51 -0
  86. package/scss/components/_image-grid.scss +71 -0
  87. package/scss/components/_index.scss +276 -38
  88. package/scss/components/_links.scss +1 -1
  89. package/scss/components/_list-lines.scss +14 -3
  90. package/scss/components/_list-ordered.scss +3 -1
  91. package/scss/components/_list-unordered.scss +3 -1
  92. package/scss/components/_menu-stack.scss +245 -0
  93. package/scss/components/_modal.scss +495 -0
  94. package/scss/components/_nav-strip.scss +148 -0
  95. package/scss/components/_overlay-section.scss +122 -0
  96. package/scss/components/_pager.scss +168 -0
  97. package/scss/components/_placeholder-block.scss +121 -0
  98. package/scss/components/_popover.scss +263 -0
  99. package/scss/components/_pull-quote.scss +111 -0
  100. package/scss/components/_ratio-box.scss +64 -0
  101. package/scss/components/_rule.scss +12 -9
  102. package/scss/components/_scroll-slider.scss +204 -0
  103. package/scss/components/_skip-link.scss +92 -0
  104. package/scss/components/_slider.scss +241 -0
  105. package/scss/components/_spoke-spinner.scss +193 -0
  106. package/scss/components/_tabs.scss +179 -0
  107. package/scss/components/_tag.scss +142 -0
  108. package/scss/components/_tile-button.scss +131 -0
  109. package/scss/components/_tile-grid-overlay.scss +132 -0
  110. package/scss/components/_tile-grid.scss +172 -0
  111. package/scss/components/_vignette.scss +65 -0
  112. package/scss/components/_wysiwyg.scss +94 -0
  113. package/scss/helpers/_color.scss +1 -0
  114. package/scss/helpers/_display.scss +2 -1
  115. package/scss/helpers/_index.scss +45 -22
  116. package/scss/helpers/_print.scss +20 -43
  117. package/scss/helpers/_typography.scss +3 -0
  118. package/scss/helpers/_units.scss +10 -13
  119. package/scss/helpers/_utilities.scss +5 -1
  120. package/scss/stylesheets/base-styles.scss +7 -0
  121. package/scss/stylesheets/component-styles.scss +7 -0
  122. package/scss/stylesheets/helper-styles.scss +7 -0
  123. package/types/events/index.d.ts +1 -1
  124. package/types/events/index.d.ts.map +1 -1
  125. package/types/index.d.ts +2 -2
  126. package/types/{helpers/css-breakpoint.d.ts → ui/breakpoints.d.ts} +3 -3
  127. package/types/ui/breakpoints.d.ts.map +1 -0
  128. package/types/ui/collapsible.d.ts +67 -0
  129. package/types/ui/collapsible.d.ts.map +1 -0
  130. package/types/ui/dialog.d.ts +42 -0
  131. package/types/ui/dialog.d.ts.map +1 -0
  132. package/types/ui/flipcard.d.ts +8 -1
  133. package/types/ui/flipcard.d.ts.map +1 -1
  134. package/types/ui/grid.d.ts +0 -11
  135. package/types/ui/grid.d.ts.map +1 -1
  136. package/types/ui/index.d.ts +23 -0
  137. package/types/ui/index.d.ts.map +1 -0
  138. package/types/ui/modal-builder.d.ts +54 -0
  139. package/types/ui/modal-builder.d.ts.map +1 -0
  140. package/types/ui/overflow-scroller-pager.d.ts +1 -1
  141. package/types/ui/overflow-scroller-pager.d.ts.map +1 -1
  142. package/types/ui/overflow-scroller.d.ts +3 -1
  143. package/types/ui/overflow-scroller.d.ts.map +1 -1
  144. package/types/ui/page.d.ts +5 -0
  145. package/types/ui/page.d.ts.map +1 -0
  146. package/types/ui/popover.d.ts +40 -0
  147. package/types/ui/popover.d.ts.map +1 -0
  148. package/types/ui/print-details.d.ts +10 -0
  149. package/types/ui/print-details.d.ts.map +1 -0
  150. package/types/ui/print.d.ts +10 -0
  151. package/types/ui/print.d.ts.map +1 -0
  152. package/types/ui/programmatic-modal.d.ts +19 -1
  153. package/types/ui/programmatic-modal.d.ts.map +1 -1
  154. package/types/ui/proxy-click.d.ts +18 -0
  155. package/types/ui/proxy-click.d.ts.map +1 -0
  156. package/types/ui/resizer.d.ts +1 -1
  157. package/types/ui/resizer.d.ts.map +1 -1
  158. package/types/ui/scroll-slider.d.ts +13 -0
  159. package/types/ui/scroll-slider.d.ts.map +1 -0
  160. package/types/ui/scrollpoint.d.ts +133 -0
  161. package/types/ui/scrollpoint.d.ts.map +1 -0
  162. package/types/ui/slider.d.ts +14 -2
  163. package/types/ui/slider.d.ts.map +1 -1
  164. package/types/ui/tabs.d.ts +22 -0
  165. package/types/ui/tabs.d.ts.map +1 -1
  166. package/types/ui/theme-toggle.d.ts +14 -0
  167. package/types/ui/theme-toggle.d.ts.map +1 -0
  168. package/types/ui/tooltip.d.ts +92 -10
  169. package/types/ui/tooltip.d.ts.map +1 -1
  170. package/types/utils/{logger.d.ts → class-logger.d.ts} +1 -1
  171. package/types/utils/class-logger.d.ts.map +1 -0
  172. package/types/utils/dom.d.ts +48 -0
  173. package/types/utils/dom.d.ts.map +1 -0
  174. package/types/utils/file-save.d.ts +64 -0
  175. package/types/utils/file-save.d.ts.map +1 -0
  176. package/types/utils/floating-ui.d.ts +19 -0
  177. package/types/utils/floating-ui.d.ts.map +1 -0
  178. package/types/utils/id.d.ts +10 -0
  179. package/types/utils/id.d.ts.map +1 -0
  180. package/types/utils/index.d.ts +9 -0
  181. package/types/utils/index.d.ts.map +1 -0
  182. package/types/utils/pause-youtube-video.d.ts.map +1 -0
  183. package/js/helpers/file-save.js +0 -52
  184. package/js/helpers/scrollbar-width-property.js +0 -14
  185. package/project.todo +0 -22
  186. package/scss/_calculate.scss +0 -64
  187. package/scss/_utility.scss +0 -12
  188. package/types/helpers/css-breakpoint.d.ts.map +0 -1
  189. package/types/helpers/file-save.d.ts +0 -17
  190. package/types/helpers/file-save.d.ts.map +0 -1
  191. package/types/helpers/node-data-manager.d.ts +0 -45
  192. package/types/helpers/node-data-manager.d.ts.map +0 -1
  193. package/types/helpers/pause-youtube-video.d.ts.map +0 -1
  194. package/types/helpers/scrollbar-width-property.d.ts +0 -11
  195. package/types/helpers/scrollbar-width-property.d.ts.map +0 -1
  196. package/types/ui/modals.d.ts +0 -27
  197. package/types/ui/modals.d.ts.map +0 -1
  198. package/types/utils/logger.d.ts.map +0 -1
  199. package/vite.config.js +0 -36
  200. /package/{js/deprecated → deprecated/js}/doc-ready.js +0 -0
  201. /package/{js/deprecated → deprecated/js}/jquery-prototypes.js +0 -0
  202. /package/{js/deprecated → deprecated/js}/mini-collapsible-popper-positioning.js +0 -0
  203. /package/{js/deprecated → deprecated/js}/mini-collapsible.js +0 -0
  204. /package/{js/helpers → deprecated/js}/node-data-manager.js +0 -0
  205. /package/{js/deprecated → deprecated/js}/script-loader.js +0 -0
  206. /package/{js/deprecated → deprecated/js}/waypoints/README.md +0 -0
  207. /package/{js/deprecated → deprecated/js}/waypoints/anchor-menu.js +0 -0
  208. /package/{js/deprecated → deprecated/js}/waypoints/element-waypoint.js +0 -0
  209. /package/{js/deprecated → deprecated/js}/waypoints/examples/page-link-menu.md +0 -0
  210. /package/{js/deprecated → deprecated/js}/waypoints/state-in-attribute.js +0 -0
  211. /package/types/{helpers → utils}/pause-youtube-video.d.ts +0 -0
@@ -10,18 +10,24 @@
10
10
  @use "../utils";
11
11
 
12
12
  /// Module Config
13
+ /// @prop {Boolean} border-first [true] If enabled, adds a top border to the first item in list-lines.
14
+ /// @prop {Boolean} border-last [true] If enabled, adds a bottom border to the last item in list-lines.
15
+ /// @prop {Dimension} margin-bottom [1em] Bottom margin of list.
16
+ /// @prop {Dimension} margin-top [0] Top margin of list.
17
+ /// @prop {Dimension} padding-between [1em] Padding between items in list.
13
18
 
14
19
  $config: (
15
20
  "border-first" : true,
16
21
  "border-last" : true,
17
- "margin-top": 0,
18
22
  "margin-bottom": 1em,
23
+ "margin-top": 0,
19
24
  "padding-between" : 1em
20
25
  ) !default;
21
26
 
22
27
  /// Change modules $config
23
28
  /// @param {Map} $changes Map of changes
24
- /// @include module-name.set(( "property" : value ));
29
+ /// @example
30
+ /// @include ulu.component-list-lines-set(( "property" : value ));
25
31
 
26
32
  @mixin set($changes) {
27
33
  $config: map.merge($config, $changes) !global;
@@ -29,7 +35,8 @@ $config: (
29
35
 
30
36
  /// Get a config option
31
37
  /// @param {Map} $name Name of property
32
- /// @include module-name.get("property");
38
+ /// @example
39
+ /// @include ulu.component-list-lines-get("property");
33
40
 
34
41
  @function get($name) {
35
42
  @return utils.require-map-get($config, $name, "grid [config]");
@@ -59,6 +66,10 @@ $config: (
59
66
  }
60
67
  }
61
68
 
69
+ /// Output component stylesheet
70
+ /// @example scss
71
+ /// @include ulu.component-list-lines-styles();
72
+
62
73
  @mixin styles {
63
74
 
64
75
  .list-lines {
@@ -6,7 +6,9 @@
6
6
  @use "../color";
7
7
  @use "../selector";
8
8
 
9
- /// Output styles
9
+ /// Output component stylesheet
10
+ /// @example scss
11
+ /// @include ulu.component-list-ordered-styles();
10
12
 
11
13
  @mixin styles {
12
14
  $prefix: selector.class("list-ordered");
@@ -6,7 +6,9 @@
6
6
  @use "../color";
7
7
  @use "../selector";
8
8
 
9
- /// Output styles
9
+ /// Output component stylesheet
10
+ /// @example scss
11
+ /// @include ulu.component-list-unordered-styles();
10
12
 
11
13
  @mixin styles {
12
14
  $prefix: selector.class("list-unordered");
@@ -0,0 +1,245 @@
1
+ ////
2
+ /// @group menu-stack
3
+ ////
4
+
5
+ @use "sass:meta";
6
+ @use "sass:map";
7
+ @use "sass:math";
8
+ @use "sass:selector" as sassSelector;
9
+
10
+ @use "../utils";
11
+ @use "../color";
12
+ @use "../element";
13
+ @use "../selector";
14
+ @use "../button";
15
+ @use "../typography";
16
+
17
+ // Used for function fallback
18
+ $-fallbacks: (
19
+ "link-border-radius" : (
20
+ "function" : meta.get-function("get", false, "button"),
21
+ "property" : "border-radius"
22
+ )
23
+ );
24
+
25
+ /// Module Settings
26
+ /// @type Map
27
+ /// @prop {Dimension} checkbox-area-width [3em] The width of the checkbox are.
28
+ /// @prop {Boolean} link-separated-margin [false] Enables a margin between the items in the menu-stack.
29
+ /// @prop {Boolean} link-separated-rule-style [false] Enables a rule between the items in the menu-stack.
30
+ /// @prop {Dimension} nested-indent [0.5em] The indentation of child lists within the menu-stack.
31
+ /// @prop {Dimension} rule-margin [0.5em] Sets the padding and margin of the rule.
32
+ /// @prop {String} rule-style [default] Determines the styling of the rule. Uses the rule.scss component.
33
+ /// @prop {Number} toggle-icon-rotate [false] Set a value to rotate the collapsible item toggle icon rotation when open (ie. 90deg)
34
+ /// @prop {Dimension} compact-link-padding-x [0.75em] The links horizontal padding when using the compact option.
35
+ /// @prop {Dimension} compact-link-padding-y [0.25em] The links vertical padding when using the compact option.
36
+ /// @prop {Color} label-color [null] The type color of the label.
37
+ /// @prop {Dimension} label-margin [0.5em] The margin of the label.
38
+ /// @prop {CssValue} label-text-transform [uppercase] Transforms the label text.
39
+ /// @prop {CssValue} label-type-size [false] Adjusts the type size of the label.
40
+ /// @prop {list} link-active-selectors [(.is-active, '[aria-current=page]')] Selectors to apply active styling.
41
+ /// @prop {Color} link-background-color [transparent] The background color of the menu-stack toggle.
42
+ /// @prop {Color} link-background-color-active [rgb(219, 219, 219)] The background color of the menu-stack toggle when active.
43
+ /// @prop {Color} link-background-color-hover [rgb(219, 219, 219)] The background color of the menu-stack toggle when hovered or focused.
44
+ /// @prop {Dimension} link-border-radius [true] The border radius of the menu-stack toggle. If set to true, will use the border radius from the button component.
45
+ /// @prop {String} link-color [link] The type color of the menu-stack toggle. This uses color.scss, so the value of this option should be a color variable from color.scss.
46
+ /// @prop {Color} link-color-active [black] The type color of the menu-stack toggle when active.
47
+ /// @prop {String} link-color-hover [link-hover] The type color of the menu-stack toggle when hovered or focused. This uses color.scss, so the value of this option should be a color variable from color.scss.
48
+ /// @prop {CssValue} link-font-weight [null] The font weight of the menu-stack toggle.
49
+ /// @prop {Dimension} link-icon-margin [0.65em] Adds a right margin to the icon.
50
+ /// @prop {Dimension} link-icon-width [1em] The width of the icon.
51
+ /// @prop {Dimension} link-margin [0.2em] Margin for the menu-stack toggle.
52
+ /// @prop {Dimension} link-padding-x [1em] Horizontal padding for menu-stack toggle.
53
+ /// @prop {Dimension} link-padding-y [0.35em] Vertical padding for menu-stack toggle.
54
+
55
+ $config: (
56
+ "checkbox-area-width" : 3em,
57
+ "nested-indent" : 0.5em,
58
+ "rule-style" : "default",
59
+ "rule-margin" : 0.5em,
60
+ "link-separated-margin" : false,
61
+ "link-separated-rule-style" : false,
62
+ "toggle-icon-rotate" : false,
63
+ "compact-link-padding-x": 0.75em,
64
+ "compact-link-padding-y": 0.25em,
65
+
66
+ "label-color" : null,
67
+ "label-margin" : 0.5em,
68
+ "label-text-transform" : uppercase,
69
+ "label-type-size" : false,
70
+ "link-active-selectors" : (".is-active", '[aria-current="page"]'),
71
+ "link-background-color" : transparent,
72
+ "link-background-color-active" : rgb(219, 219, 219),
73
+ "link-background-color-hover" : rgb(219, 219, 219),
74
+ "link-border-radius" : true,
75
+ "link-color" : "link",
76
+ "link-color-active" : black,
77
+ "link-color-hover" : "link-hover",
78
+ "link-font-weight" : null,
79
+ "link-icon-margin" : 0.65em,
80
+ "link-icon-width" : 1em,
81
+ "link-margin" : 0.2em,
82
+ "link-padding-x": 1em,
83
+ "link-padding-y": 0.35em,
84
+ ) !default;
85
+
86
+
87
+ /// Change modules $config
88
+ /// @param {Map} $changes Map of changes
89
+ /// @example
90
+ /// @include ulu.component-menu-stack-set(( "property" : value ));
91
+
92
+ @mixin set($changes) {
93
+ $config: map.merge($config, $changes) !global;
94
+ }
95
+
96
+ /// Get a config option
97
+ /// @param {Map} $name Name of property
98
+ /// @example
99
+ /// @include ulu.component-menu-stack-get("property");
100
+
101
+ @function get($name) {
102
+ $value: utils.require-map-get($config, $name, "menu-stack [config]");
103
+ @return utils.function-fallback($name, $value, $-fallbacks);
104
+ }
105
+
106
+ // Internal fallback helper
107
+ @function -fallback($op1, $op2) {
108
+ @return utils.map-fallback($config, $op1, $op2);
109
+ }
110
+
111
+ /// Prints component styles
112
+ /// @example scss
113
+ /// @include ulu.component-menu-stack-styles();
114
+ /// @todo Colors stuff
115
+ /// @todo Selector prefix
116
+
117
+ @mixin styles {
118
+ $prefix: selector.class("menu-stack");
119
+
120
+ #{ $prefix }--separated {
121
+ border-top: element.get-rule-style(get("rule-style"));
122
+ padding-top: get("rule-margin");
123
+ margin-top: get("rule-margin");
124
+ }
125
+ #{ $prefix }__label {
126
+ text-transform: get("label-text-transform");
127
+ padding-bottom: get("label-margin");
128
+ color: color.get(get("label-color"));
129
+ @if (get("label-type-size")) {
130
+ @include typography.size(get("label-type-size"), $only-font-size: true);
131
+ }
132
+ }
133
+ #{ $prefix }__item--separator-before {
134
+ border-top: element.get-rule-style(-fallback("link-separated-rule-style", "rule-style"));
135
+ margin-top: -fallback("link-separated-margin", "link-padding-y");
136
+ padding-top: -fallback("link-separated-margin", "link-padding-y");
137
+ }
138
+ #{ $prefix }__item--separator-after {
139
+ border-bottom: element.get-rule-style(-fallback("link-separated-rule-style", "rule-style"));
140
+ margin-bottom: -fallback("link-separated-margin", "link-padding-y");
141
+ padding-bottom: -fallback("link-separated-margin", "link-padding-y");
142
+ }
143
+ #{ $prefix }__list {
144
+ & & {
145
+ padding-left: get("nested-indent");
146
+ }
147
+ }
148
+ // By default the link hangs outside the container so that
149
+ // the icons/text align to the text (above/below)
150
+ // - Use the modifier "site-menu--contained" to keep the links within
151
+ // the parent container (no optical alignment), should be within something that contains it
152
+ #{ $prefix }__link,
153
+ #{ $prefix }__checkbox,
154
+ #{ $prefix }__toggle {
155
+ width: 100%;
156
+ display: flex;
157
+ align-items: center;
158
+ padding: get("link-padding-y") get("link-padding-x");
159
+ margin: get("link-margin") 0;
160
+ border-radius: get("link-border-radius");
161
+ font-weight: get("link-font-weight");
162
+ color: color.get(get("link-color"));
163
+ background-color: color.get(get("link-background-color"));
164
+ box-sizing: border-box;
165
+ &:hover,
166
+ &:focus {
167
+ color: color.get(get("link-color-hover"));
168
+ background-color: color.get(get("link-background-color-hover"));
169
+ }
170
+ @each $active-selector in get("link-active-selectors") {
171
+ &#{ $active-selector } {
172
+ &,
173
+ &:hover {
174
+ color: color.get(get("link-color-active"));
175
+ background-color: color.get(get("link-background-color-active"));
176
+ }
177
+ }
178
+ }
179
+ }
180
+ #{ $prefix }__checkbox {
181
+ $checkbox-y: (get("link-padding-y") + get("link-margin"));
182
+ padding: 0;
183
+ position: relative;
184
+ [type="checkbox"] {
185
+ position: absolute;
186
+ top: $checkbox-y;
187
+ left: get("link-padding-x");
188
+ }
189
+ label {
190
+ width: 100%;
191
+ padding: $checkbox-y get("link-padding-x") $checkbox-y get("checkbox-area-width");
192
+ }
193
+ }
194
+ #{ $prefix }__link-text {
195
+ display: block;
196
+ flex-grow: 1;
197
+ }
198
+ #{ $prefix }__link-icon {
199
+ margin-right: get("link-icon-margin");
200
+ width: get("link-icon-width");
201
+ }
202
+ #{ $prefix }__collapsible {
203
+ margin: 0;
204
+ @if (get("toggle-icon-rotate")) {
205
+ &[open] {
206
+ #{ $prefix }__toggle-icon {
207
+ transform: rotate(get("toggle-icon-rotate"));
208
+ }
209
+ }
210
+ }
211
+ }
212
+ #{ $prefix }__toggle {
213
+ display: flex;
214
+ justify-content: space-between;
215
+ align-items: center;
216
+ cursor: pointer;
217
+ }
218
+
219
+ // Modifiers
220
+
221
+ // Link buttons hang outside in margin so that text optically aligns
222
+ #{ $prefix }--hanging {
223
+ padding-left: get("link-padding-x");
224
+ padding-right: get("link-padding-x");
225
+ > #{ $prefix }__list > #{ $prefix }__item {
226
+ > #{ $prefix }__link,
227
+ >#{ $prefix }__collapsible > #{ $prefix }__toggle {
228
+ margin-left: -(get("link-padding-x"));
229
+ margin-right: -(get("link-padding-x"));
230
+ width: calc(100% + (get("link-padding-x") * 2));
231
+ }
232
+ }
233
+
234
+ // #{ $prefix }__toggle {
235
+ // width: auto;
236
+ // }
237
+ }
238
+ #{ $prefix }--compact {
239
+ #{ $prefix }__link {
240
+ border-radius: 0;
241
+ margin: 0;
242
+ padding: get("compact-link-padding-y") get("compact-link-padding-x");
243
+ }
244
+ }
245
+ }