barbican-reset 3.33.0 → 3.35.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.
- package/components/BrDetails.vue +6 -2
- package/components/BrFormCheckbox.vue +3 -3
- package/components/BrFormLabel.vue +2 -2
- package/components/BrFormRadio.vue +20 -2
- package/components/BrFormSelect.vue +168 -0
- package/components/BrFormSelectItem.vue +11 -0
- package/components/BrTableCell.vue +14 -0
- package/components/BrTableRow.vue +1 -15
- package/components/BrWrap.vue +6 -0
- package/index.js +4 -0
- package/package.json +1 -1
- package/scripts/helpers/constrainTabbing.js +15 -7
- package/scss/_br-button.scss +4 -0
- package/scss/_br-form-label.scss +3 -0
- package/scss/_br-form-radio.scss +17 -1
- package/scss/_br-form-select-link.scss +15 -0
- package/scss/_br-table-cell.scss +52 -35
- package/scss/_br-table-row.scss +11 -11
- package/scss/_variables.scss +3 -0
- package/scss/index.scss +2 -0
- package/scss/mixins/_br-card.scss +0 -1
- package/scss/mixins/_br-form-radio.scss +3 -3
- package/scss/mixins/_br-wrap.scss +20 -16
- package/scss/mixins/buttons/_custom.scss +1 -0
- package/scss/mixins/buttons/custom/_manage-order.scss +1 -1
- package/scss/mixins/buttons/custom/_select-form.scss +24 -0
- package/scss/mixins/input/_checkbox.scss +8 -4
package/components/BrDetails.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="br-details">
|
|
3
|
-
<br-button variant="summary" @click="update">
|
|
3
|
+
<br-button variant="summary" @click="update" :data-test="'toggle-' + label">
|
|
4
4
|
<div class="wrap-title">
|
|
5
5
|
<slot name="title">Title goes here</slot>
|
|
6
6
|
</div>
|
|
@@ -20,6 +20,10 @@ const props = defineProps({
|
|
|
20
20
|
type: Boolean,
|
|
21
21
|
default: false,
|
|
22
22
|
},
|
|
23
|
+
label: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: 'details',
|
|
26
|
+
},
|
|
23
27
|
})
|
|
24
28
|
|
|
25
29
|
const update = () => emit('update', { open: !props.open })
|
|
@@ -50,6 +54,6 @@ const update = () => emit('update', { open: !props.open })
|
|
|
50
54
|
}
|
|
51
55
|
|
|
52
56
|
.wrap-content.open {
|
|
53
|
-
margin-top: var(--margin-
|
|
57
|
+
margin-top: var(--margin-xxl);
|
|
54
58
|
}
|
|
55
59
|
</style>
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
<br-form-label
|
|
11
11
|
:class="[{ success }, { error }]"
|
|
12
12
|
:disabled="disabled"
|
|
13
|
-
:
|
|
14
|
-
:
|
|
13
|
+
:returns="returns"
|
|
14
|
+
:id="generateID">
|
|
15
15
|
<br-form-input
|
|
16
16
|
:class="[{ success }, { error }]"
|
|
17
17
|
:disabled="disabled"
|
|
@@ -67,7 +67,7 @@ const props = defineProps({
|
|
|
67
67
|
success: Boolean,
|
|
68
68
|
error: Boolean,
|
|
69
69
|
block: Boolean,
|
|
70
|
-
|
|
70
|
+
returns: Boolean,
|
|
71
71
|
})
|
|
72
72
|
|
|
73
73
|
// @description Returns a string for the "id" attribute
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component
|
|
3
|
-
:class="['br-form-label', { disabled }, {
|
|
3
|
+
:class="['br-form-label', { disabled }, { returns }]"
|
|
4
4
|
:is="!disabled ? 'label' : 'div'"
|
|
5
5
|
:for="!disabled ? id : null">
|
|
6
6
|
<slot />
|
|
@@ -14,7 +14,7 @@ const props = defineProps({
|
|
|
14
14
|
disabled: Boolean,
|
|
15
15
|
required: Boolean,
|
|
16
16
|
optional: Boolean,
|
|
17
|
-
|
|
17
|
+
returns: Boolean,
|
|
18
18
|
id: String,
|
|
19
19
|
})
|
|
20
20
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
2
|
+
<div :class="generateClassnames">
|
|
3
3
|
<br-form-label
|
|
4
4
|
:class="[{ success }, { error }]"
|
|
5
5
|
:disabled="disabled"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
v-bind="$attrs"
|
|
12
12
|
:error="error"
|
|
13
13
|
type="radio" />
|
|
14
|
-
<span class="label-text">
|
|
14
|
+
<span v-if="$slots.default" class="label-text">
|
|
15
15
|
<slot />
|
|
16
16
|
</span>
|
|
17
17
|
</br-form-label>
|
|
@@ -25,6 +25,20 @@ import formatKebabCase from '#helpers/formatKebabCase'
|
|
|
25
25
|
import BrFormLabel from '#components/BrFormLabel.vue'
|
|
26
26
|
import BrFormInput from '#components/BrFormInput.vue'
|
|
27
27
|
|
|
28
|
+
const generateClassnames = computed(() => {
|
|
29
|
+
let classnames = ['br-form-radio']
|
|
30
|
+
|
|
31
|
+
if (props.table) {
|
|
32
|
+
classnames.push('table')
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (!props.table) {
|
|
36
|
+
classnames.push('default')
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return classnames
|
|
40
|
+
})
|
|
41
|
+
|
|
28
42
|
defineOptions({
|
|
29
43
|
inheritAttrs: false,
|
|
30
44
|
})
|
|
@@ -45,6 +59,10 @@ const props = defineProps({
|
|
|
45
59
|
default: false,
|
|
46
60
|
type: Boolean,
|
|
47
61
|
},
|
|
62
|
+
table: {
|
|
63
|
+
default: false,
|
|
64
|
+
type: Boolean,
|
|
65
|
+
},
|
|
48
66
|
})
|
|
49
67
|
|
|
50
68
|
// @description Returns a string for the "id" attribute
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<form class="br-select-form" @submit.prevent>
|
|
3
|
+
<button
|
|
4
|
+
class="br-select-form-button btn btn-select-form"
|
|
5
|
+
data-placeholder="placeholder"
|
|
6
|
+
@click="formButtonClick"
|
|
7
|
+
aria-controls="listbox"
|
|
8
|
+
aria-haspopup="listbox"
|
|
9
|
+
aria-expanded="false"
|
|
10
|
+
data-title="title"
|
|
11
|
+
role="combobox">
|
|
12
|
+
<span class="br-select-form-button--title">{{ placeholder }}</span>
|
|
13
|
+
<svg
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
class="br-select-form-icon"
|
|
16
|
+
width="12"
|
|
17
|
+
height="6"
|
|
18
|
+
version="1.1"
|
|
19
|
+
viewBox="0 0 12 6">
|
|
20
|
+
<path d="M6,5.48L1.04.52h9.92l-4.96,4.96Z" />
|
|
21
|
+
</svg>
|
|
22
|
+
</button>
|
|
23
|
+
<ul class="br-select-form-list" role="listbox">
|
|
24
|
+
<slot />
|
|
25
|
+
</ul>
|
|
26
|
+
</form>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup>
|
|
30
|
+
import constrainTabbing from '#scripts/helpers/constrainTabbing'
|
|
31
|
+
|
|
32
|
+
let listenConstrainTabbing = null
|
|
33
|
+
|
|
34
|
+
function formSelectors($form) {
|
|
35
|
+
let $formButton = $form.querySelector('.br-select-form-button')
|
|
36
|
+
let $formList = $form.querySelector('.br-select-form-list')
|
|
37
|
+
let $formItems = $formList.querySelectorAll('.br-select-form-item')
|
|
38
|
+
let ariaExpanded = $formButton.getAttribute('aria-expanded')
|
|
39
|
+
|
|
40
|
+
return {
|
|
41
|
+
$formButton,
|
|
42
|
+
$formList,
|
|
43
|
+
$formItems,
|
|
44
|
+
isOpen: ariaExpanded == 'true',
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function closeForm($form) {
|
|
49
|
+
let { $formButton } = formSelectors($form)
|
|
50
|
+
|
|
51
|
+
$formButton.setAttribute('aria-expanded', 'false')
|
|
52
|
+
|
|
53
|
+
document.removeEventListener('click', listenForClose)
|
|
54
|
+
|
|
55
|
+
document.removeEventListener('keydown', listenForClose)
|
|
56
|
+
|
|
57
|
+
if (listenConstrainTabbing) {
|
|
58
|
+
listenConstrainTabbing.stop()
|
|
59
|
+
listenConstrainTabbing = null
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function closeForms(match) {
|
|
64
|
+
let $forms = document.querySelectorAll('.br-select-form')
|
|
65
|
+
|
|
66
|
+
$forms.forEach(function ($form) {
|
|
67
|
+
if ($form !== match) {
|
|
68
|
+
closeForm($form)
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function listenForClose(event) {
|
|
74
|
+
let { target, key } = event
|
|
75
|
+
|
|
76
|
+
let $form = target.closest('.br-select-form')
|
|
77
|
+
|
|
78
|
+
let clickedOutsideForm = !key && !$form
|
|
79
|
+
|
|
80
|
+
let pressedEscape = ['Escape'].includes(key)
|
|
81
|
+
|
|
82
|
+
let pressedTab = ['Tab'].includes(key)
|
|
83
|
+
|
|
84
|
+
if (clickedOutsideForm || pressedEscape) {
|
|
85
|
+
closeForms()
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (!clickedOutsideForm) {
|
|
89
|
+
if (pressedTab && !listenConstrainTabbing) {
|
|
90
|
+
listenConstrainTabbing = constrainTabbing($form)
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function formButtonClick(event) {
|
|
96
|
+
let { currentTarget } = event
|
|
97
|
+
|
|
98
|
+
let $form = currentTarget.closest('.br-select-form')
|
|
99
|
+
|
|
100
|
+
let { isOpen } = formSelectors($form)
|
|
101
|
+
|
|
102
|
+
currentTarget.setAttribute('aria-expanded', isOpen ? 'false' : 'true')
|
|
103
|
+
|
|
104
|
+
closeForms($form)
|
|
105
|
+
|
|
106
|
+
document.addEventListener('click', listenForClose)
|
|
107
|
+
|
|
108
|
+
document.addEventListener('keydown', listenForClose)
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
defineProps({
|
|
112
|
+
title: {
|
|
113
|
+
type: String,
|
|
114
|
+
default: 'title',
|
|
115
|
+
},
|
|
116
|
+
placeholder: {
|
|
117
|
+
type: String,
|
|
118
|
+
default: 'Add to wallet',
|
|
119
|
+
},
|
|
120
|
+
// options: {
|
|
121
|
+
// type: Array,
|
|
122
|
+
// default: [
|
|
123
|
+
// {
|
|
124
|
+
// link: {
|
|
125
|
+
// href: 'https://apple.com',
|
|
126
|
+
// target: '_blank',
|
|
127
|
+
// title: 'apple',
|
|
128
|
+
// },
|
|
129
|
+
// },
|
|
130
|
+
// {
|
|
131
|
+
// link: {
|
|
132
|
+
// href: 'https://google.com',
|
|
133
|
+
// target: '_blank',
|
|
134
|
+
// title: 'google',
|
|
135
|
+
// },
|
|
136
|
+
// },
|
|
137
|
+
// ],
|
|
138
|
+
// },
|
|
139
|
+
})
|
|
140
|
+
</script>
|
|
141
|
+
|
|
142
|
+
<style scoped>
|
|
143
|
+
.br-select-form {
|
|
144
|
+
position: relative;
|
|
145
|
+
width: 200px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.br-select-form-button[aria-expanded='false'] + .br-select-form-list {
|
|
149
|
+
visibility: hidden;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.br-select-form-list {
|
|
153
|
+
border-bottom: 1px solid currentColor;
|
|
154
|
+
border-right: 1px solid currentColor;
|
|
155
|
+
border-left: 1px solid currentColor;
|
|
156
|
+
border-bottom-right-radius: 0.5rem;
|
|
157
|
+
border-bottom-left-radius: 0.5rem;
|
|
158
|
+
background-color: white;
|
|
159
|
+
position: absolute;
|
|
160
|
+
margin-bottom: 0;
|
|
161
|
+
list-style: none;
|
|
162
|
+
overflow: hidden;
|
|
163
|
+
padding-left: 0;
|
|
164
|
+
margin-top: 0;
|
|
165
|
+
width: 100%;
|
|
166
|
+
z-index: 2;
|
|
167
|
+
}
|
|
168
|
+
</style>
|
|
@@ -22,6 +22,18 @@ const generateClassnames = computed(() => {
|
|
|
22
22
|
classnames.push('align-center')
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
if (props.radio) {
|
|
26
|
+
classnames.push('radio')
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
if (props.returns) {
|
|
30
|
+
classnames.push('returns')
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (!props.radio && !props.returns) {
|
|
34
|
+
classnames.push('default')
|
|
35
|
+
}
|
|
36
|
+
|
|
25
37
|
return classnames
|
|
26
38
|
})
|
|
27
39
|
|
|
@@ -30,7 +42,9 @@ const props = defineProps({
|
|
|
30
42
|
type: String,
|
|
31
43
|
default: 'stretch',
|
|
32
44
|
},
|
|
45
|
+
returns: Boolean,
|
|
33
46
|
right: Boolean,
|
|
34
47
|
center: Boolean,
|
|
48
|
+
radio: Boolean,
|
|
35
49
|
})
|
|
36
50
|
</script>
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div class="br-table-row">
|
|
3
3
|
<slot />
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
|
-
|
|
7
|
-
<script setup>
|
|
8
|
-
import { computed } from 'vue'
|
|
9
|
-
|
|
10
|
-
const generateClassnames = computed(() => {
|
|
11
|
-
let classnames = ['br-table-row']
|
|
12
|
-
return classnames
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
const props = defineProps({
|
|
16
|
-
right: Boolean,
|
|
17
|
-
center: Boolean,
|
|
18
|
-
})
|
|
19
|
-
</script>
|
package/components/BrWrap.vue
CHANGED
|
@@ -17,11 +17,13 @@ const generateComponentClasses = computed(() => {
|
|
|
17
17
|
if (props.cluster) {
|
|
18
18
|
classnames.push('cluster')
|
|
19
19
|
classnames.push('align-' + props.align)
|
|
20
|
+
classnames.push('size-' + props.size)
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
if (props.orders) {
|
|
23
24
|
classnames.push('orders')
|
|
24
25
|
classnames.push('align-' + props.align)
|
|
26
|
+
classnames.push('size-' + props.size)
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
if (props.preferences) {
|
|
@@ -44,5 +46,9 @@ const props = defineProps({
|
|
|
44
46
|
type: String,
|
|
45
47
|
default: 'middle',
|
|
46
48
|
},
|
|
49
|
+
size: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: 'xs',
|
|
52
|
+
},
|
|
47
53
|
})
|
|
48
54
|
</script>
|
package/index.js
CHANGED
|
@@ -33,6 +33,8 @@ import BrFormPassword from '#components/BrFormPassword.vue'
|
|
|
33
33
|
import BrFormRadio from '#components/BrFormRadio.vue'
|
|
34
34
|
import BrFormRadioGroup from '#components/BrFormRadioGroup.vue'
|
|
35
35
|
import BrFormRow from '#components/BrFormRow.vue'
|
|
36
|
+
import BrFormSelect from '#components/BrFormSelect.vue'
|
|
37
|
+
import BrFormSelectItem from '#components/BrFormSelectItem.vue'
|
|
36
38
|
import BrFormTel from '#components/BrFormTel.vue'
|
|
37
39
|
import BrFormTextarea from '#components/BrFormTextarea.vue'
|
|
38
40
|
import BrFormToggle from '#components/BrFormToggle.vue'
|
|
@@ -81,6 +83,8 @@ export {
|
|
|
81
83
|
BrFormRadio,
|
|
82
84
|
BrFormRadioGroup,
|
|
83
85
|
BrFormRow,
|
|
86
|
+
BrFormSelect,
|
|
87
|
+
BrFormSelectItem,
|
|
84
88
|
BrFormTel,
|
|
85
89
|
BrFormTextarea,
|
|
86
90
|
BrFormToggle,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "barbican-reset",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.35.0",
|
|
4
4
|
"description": "Shared design system for Barbican projects, providing SCSS utilities, animations, icons, Vue components, and JS helpers for consistent styling and behaviour.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -7,21 +7,21 @@
|
|
|
7
7
|
* rest of the page while the element is active.
|
|
8
8
|
*
|
|
9
9
|
* @param {HTMLElement} element - The container element to trap focus within.
|
|
10
|
-
* @returns {void}
|
|
10
|
+
* @returns {{ stop: () => void }}
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
|
-
* constrainTabbing(document.getElementById('modal'))
|
|
13
|
+
* const trap = constrainTabbing(document.getElementById('modal'))
|
|
14
|
+
* trap.stop()
|
|
14
15
|
*/
|
|
15
16
|
export default function (element) {
|
|
16
17
|
let focusableEls = element.querySelectorAll('a[href]:not([disabled], [rel=noopener]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])')
|
|
17
18
|
let firstFocusableEl = focusableEls[0]
|
|
18
19
|
let lastFocusableEl = focusableEls[focusableEls.length - 1]
|
|
19
|
-
let KEYCODE_TAB = 9
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
let { key,
|
|
21
|
+
function handler(/** @type {KeyboardEvent} */ event) {
|
|
22
|
+
let { key, shiftKey } = event
|
|
23
23
|
|
|
24
|
-
var isTabPressed = key === 'Tab'
|
|
24
|
+
var isTabPressed = key === 'Tab'
|
|
25
25
|
|
|
26
26
|
if (!isTabPressed) return
|
|
27
27
|
|
|
@@ -36,5 +36,13 @@ export default function (element) {
|
|
|
36
36
|
event.preventDefault()
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
element.addEventListener('keydown', handler)
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
stop() {
|
|
45
|
+
element.removeEventListener('keydown', handler)
|
|
46
|
+
},
|
|
47
|
+
}
|
|
40
48
|
}
|
package/scss/_br-button.scss
CHANGED
package/scss/_br-form-radio.scss
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
@use "mixins/input" as *;
|
|
2
|
+
@use "mixins/breakpoints" as *;
|
|
2
3
|
|
|
3
|
-
.br-form-radio {
|
|
4
|
+
.br-form-radio.default {
|
|
4
5
|
@include br-form-radio;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.br-form-radio.table {
|
|
9
|
+
@include br-form-radio;
|
|
10
|
+
|
|
11
|
+
@include medium-up {
|
|
12
|
+
.br-form-label {
|
|
13
|
+
padding: var(--padding-sm);
|
|
14
|
+
border-radius: 50%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.label-text {
|
|
18
|
+
display: none;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
5
21
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.br-form-select-link {
|
|
2
|
+
padding: var(--padding-md);
|
|
3
|
+
display: block;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.br-form-select-link:focus-visible,
|
|
7
|
+
.br-form-select-link:hover {
|
|
8
|
+
background-color: var(--color-black-5-lighten);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.br-form-select-link:focus-visible {
|
|
12
|
+
outline-offset: var(--outline-inset-lg);
|
|
13
|
+
outline-color: inherit;
|
|
14
|
+
outline-style: dashed;
|
|
15
|
+
}
|
package/scss/_br-table-cell.scss
CHANGED
|
@@ -1,58 +1,75 @@
|
|
|
1
1
|
@use "mixins/breakpoints" as *;
|
|
2
2
|
@use "mixins/br-wrap" as *;
|
|
3
3
|
|
|
4
|
-
@
|
|
5
|
-
|
|
4
|
+
@mixin br-table-cell--default {
|
|
5
|
+
@include medium-up {
|
|
6
6
|
padding: var(--padding-md);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.br-table-cell:not(.width-stretch) {
|
|
10
|
-
flex-shrink: 0;
|
|
11
|
-
}
|
|
12
7
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
&:not(:first-child) {
|
|
9
|
+
border-left-color: var(--color-black-25-lighten);
|
|
10
|
+
border-left-width: var(--border-width-sm);
|
|
11
|
+
border-left-style: solid;
|
|
12
|
+
}
|
|
18
13
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
&.align-right {
|
|
15
|
+
text-align: right;
|
|
16
|
+
}
|
|
22
17
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
&.align-center {
|
|
19
|
+
text-align: center;
|
|
20
|
+
}
|
|
26
21
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
&:not(.width-stretch) {
|
|
23
|
+
flex-shrink: 0;
|
|
24
|
+
}
|
|
30
25
|
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
>label {
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
33
29
|
}
|
|
34
30
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
display: inline-block;
|
|
31
|
+
@include medium-down {
|
|
32
|
+
margin: var(--margin-sm);
|
|
38
33
|
}
|
|
39
34
|
}
|
|
40
35
|
|
|
41
|
-
@
|
|
42
|
-
|
|
43
|
-
@include br-wrap--cluster;
|
|
36
|
+
@mixin br-table-cell--radio {
|
|
37
|
+
@include br-table-cell--default;
|
|
44
38
|
|
|
45
|
-
|
|
39
|
+
@include medium-down {
|
|
40
|
+
&:not(.width-stretch) {
|
|
41
|
+
display: inline-block;
|
|
46
42
|
width: initial;
|
|
47
43
|
}
|
|
48
44
|
}
|
|
45
|
+
}
|
|
49
46
|
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
@mixin br-table-cell--returns {
|
|
48
|
+
@include br-table-cell--default;
|
|
49
|
+
|
|
50
|
+
@include medium-up {
|
|
51
|
+
padding: 0;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
@include medium-down {
|
|
55
|
+
border-bottom-color: var(--color-black-25-lighten);
|
|
56
|
+
border-bottom-width: var(--border-width-sm);
|
|
57
|
+
border-bottom-style: dashed;
|
|
58
|
+
margin-right: -0.5rem;
|
|
59
|
+
margin-left: -0.5rem;
|
|
60
|
+
margin-bottom: 1rem;
|
|
61
|
+
margin-top: -0.5rem;
|
|
57
62
|
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.br-table-cell.default {
|
|
66
|
+
@include br-table-cell--default;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.br-table-cell.radio {
|
|
70
|
+
@include br-table-cell--radio;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.br-table-cell.returns {
|
|
74
|
+
@include br-table-cell--returns;
|
|
58
75
|
}
|
package/scss/_br-table-row.scss
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
@use "mixins/breakpoints" as *;
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
@mixin br-table-row--default {
|
|
4
4
|
border-color: var(--color-black-25-lighten);
|
|
5
5
|
border-width: var(--border-width-sm);
|
|
6
6
|
border-style: solid;
|
|
7
|
-
}
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
8
|
+
&:not(:last-child) {
|
|
9
|
+
margin-bottom: var(--margin-md);
|
|
10
|
+
}
|
|
12
11
|
|
|
13
|
-
@include medium-up {
|
|
14
|
-
.br-table-row {
|
|
12
|
+
@include medium-up {
|
|
15
13
|
display: flex;
|
|
16
14
|
}
|
|
17
|
-
}
|
|
18
15
|
|
|
19
|
-
@include medium-down {
|
|
20
|
-
.br-table-row {
|
|
16
|
+
@include medium-down {
|
|
21
17
|
border-radius: var(--border-radius-lg);
|
|
22
|
-
padding: var(--padding-
|
|
18
|
+
padding: var(--padding-sm);
|
|
23
19
|
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.br-table-row {
|
|
23
|
+
@include br-table-row--default;
|
|
24
24
|
}
|
package/scss/_variables.scss
CHANGED
|
@@ -344,6 +344,7 @@
|
|
|
344
344
|
--line-height-xs: 1;
|
|
345
345
|
--line-height-sm: 1.15;
|
|
346
346
|
--line-height-md: 1.35;
|
|
347
|
+
--line-height-lg: 1.5;
|
|
347
348
|
|
|
348
349
|
// Fixed line height for button/menu items (`38px`).
|
|
349
350
|
--line-height-button-menu: 2.375rem;
|
|
@@ -383,6 +384,8 @@
|
|
|
383
384
|
|
|
384
385
|
// Navlink offset. Negative `--border-width-sm` to align active indicator flush with edge.
|
|
385
386
|
--offset-navlink: calc(var(--border-width-sm) * -1);
|
|
387
|
+
// Large outline inset (`-4px`).
|
|
388
|
+
--outline-inset-lg: calc(0.25rem * -1);
|
|
386
389
|
// Small outline offset (`1px`).
|
|
387
390
|
--outline-offset-sm: 0.0625rem;
|
|
388
391
|
// Medium outline offset (`2px`).
|
package/scss/index.scss
CHANGED
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
@use "br-form-checkbox";
|
|
9
9
|
@use "br-form-edit";
|
|
10
10
|
@use "br-form-fieldset";
|
|
11
|
+
@use "br-form-label";
|
|
11
12
|
@use "br-form-radio";
|
|
12
13
|
@use "br-form-row";
|
|
14
|
+
@use "br-form-select-link";
|
|
13
15
|
@use "br-form-textarea";
|
|
14
16
|
@use "br-form-toggle";
|
|
15
17
|
@use "br-form-update";
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
@mixin br-form-radio--input {
|
|
16
16
|
cursor: pointer;
|
|
17
17
|
|
|
18
|
-
&:focus {
|
|
18
|
+
&:focus-visible {
|
|
19
19
|
outline-color: var(--color-black-25-lighten);
|
|
20
20
|
outline-offset: var(--outline-offset-lg);
|
|
21
21
|
outline-width: var(--border-width-sm);
|
|
22
22
|
outline-style: dashed;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
&:checked:focus {
|
|
25
|
+
&:checked:focus-visible {
|
|
26
26
|
@include br-form-radio--input-colors;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
cursor: pointer;
|
|
85
85
|
|
|
86
86
|
&:hover,
|
|
87
|
-
&:has(input:focus) {
|
|
87
|
+
&:has(input:focus-visible) {
|
|
88
88
|
@include br-form-radio-label--disabled;
|
|
89
89
|
@include br-form-radio-label--hover;
|
|
90
90
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
@use "../mixins/breakpoints" as *;
|
|
2
2
|
|
|
3
|
+
$sizes: xs, sm, md, lg;
|
|
4
|
+
|
|
3
5
|
@mixin br-wrap--default {
|
|
4
6
|
max-width: var(--width-layout-sm);
|
|
5
7
|
margin-right: auto;
|
|
@@ -17,10 +19,14 @@
|
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
@mixin br-wrap--cluster {
|
|
20
|
-
|
|
22
|
+
@each $size in $sizes {
|
|
23
|
+
&.size-#{$size} {
|
|
24
|
+
margin: var(--margin-wrap-#{$size});
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
|
|
26
|
+
>* {
|
|
27
|
+
margin: var(--margin-#{$size});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
24
30
|
}
|
|
25
31
|
|
|
26
32
|
&.align-middle>* {
|
|
@@ -45,21 +51,19 @@
|
|
|
45
51
|
@mixin br-wrap--orders {
|
|
46
52
|
@include br-wrap--cluster;
|
|
47
53
|
|
|
48
|
-
$
|
|
54
|
+
@each $size in $sizes {
|
|
55
|
+
$margin: calc(var(--margin-#{$size}) * 2);
|
|
49
56
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
@include medium-up {
|
|
57
|
-
>* {
|
|
58
|
-
width: calc(50% - $margin);
|
|
59
|
-
}
|
|
57
|
+
&.size-#{$size} {
|
|
58
|
+
>* {
|
|
59
|
+
@include medium-down {
|
|
60
|
+
width: calc(100% - $margin);
|
|
61
|
+
}
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
@include medium-up {
|
|
64
|
+
width: calc(50% - $margin);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
63
67
|
}
|
|
64
68
|
}
|
|
65
69
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@use "./manage-order" as *;
|
|
2
|
+
|
|
3
|
+
@mixin btn-select-form {
|
|
4
|
+
@include btn-manage-order;
|
|
5
|
+
|
|
6
|
+
& {
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&[aria-expanded='true'] {
|
|
12
|
+
border-bottom-right-radius: 0;
|
|
13
|
+
border-bottom-left-radius: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&:active {
|
|
17
|
+
transform: scale(1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:hover,
|
|
21
|
+
&:focus-visible {
|
|
22
|
+
fill: currentColor;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
@mixin br-form-checkbox--input {
|
|
18
|
-
&:focus {
|
|
18
|
+
&:focus-visible {
|
|
19
19
|
outline-color: var(--color-black-50-lighten);
|
|
20
20
|
outline-offset: var(--outline-offset-lg);
|
|
21
21
|
outline-width: var(--border-width-sm);
|
|
22
22
|
outline-style: dashed;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
&:checked:focus {
|
|
25
|
+
&:checked:focus-visible {
|
|
26
26
|
@include br-form-checkbox--input-colors;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
&.
|
|
84
|
+
&.returns {
|
|
85
85
|
border-bottom-right-radius: 0;
|
|
86
86
|
border-bottom-left-radius: 0;
|
|
87
87
|
border-width: 0;
|
|
@@ -90,13 +90,17 @@
|
|
|
90
90
|
border-top-right-radius: 0;
|
|
91
91
|
border-top-left-radius: 0;
|
|
92
92
|
}
|
|
93
|
+
|
|
94
|
+
@include medium-down {
|
|
95
|
+
padding: var(--padding-lg);
|
|
96
|
+
}
|
|
93
97
|
}
|
|
94
98
|
|
|
95
99
|
&:not(.disabled) {
|
|
96
100
|
cursor: pointer;
|
|
97
101
|
|
|
98
102
|
&:hover,
|
|
99
|
-
&:has(input:focus) {
|
|
103
|
+
&:has(input:focus-visible) {
|
|
100
104
|
@include br-form-checkbox-label--disabled;
|
|
101
105
|
@include br-form-checkbox-label--hover;
|
|
102
106
|
}
|