barbican-reset 3.29.0 → 3.31.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/README.md +180 -98
- package/animations/confirm.js +47 -45
- package/components/BrFormCheckbox.vue +7 -17
- package/components/BrFormCheckboxGroup.vue +4 -8
- package/components/BrSkiplink.vue +2 -2
- package/icons/barbican.vue +4 -12
- package/index.js +2 -0
- package/mixins/inputs.js +42 -0
- package/package.json +43 -106
- package/scripts/helpers/compareArrays.js +11 -7
- package/scripts/helpers/formatKebabCase.js +12 -6
- package/scripts/helpers/logObject.js +10 -4
- package/scss/_br-icon.scss +23 -0
- package/scss/_br-link.scss +1 -2
- package/scss/_variables.scss +251 -4
- package/scss/index.scss +1 -1
- package/scss/lists.scss +5 -0
- package/scss/mixins/br-link/_navcard.scss +1 -1
- package/scss/mixins/buttons/_custom.scss +5 -4
- package/scss/mixins/buttons/custom/_manage-order.scss +8 -2
- package/scss/mixins/buttons/custom/_outline-secondary.scss +7 -2
- package/scss/mixins/input/_checkbox.scss +1 -1
- package/scss/mixins/table/_generic.scss +5 -4
- package/scss/reset.scss +5 -0
- package/scss/supreme.scss +15 -3
- package/scss/typography.scss +14 -0
- package/scss/_app.scss +0 -6
- package/scss/br-link/_manage-order.scss +0 -13
package/README.md
CHANGED
|
@@ -2,154 +2,236 @@
|
|
|
2
2
|
|
|
3
3
|
## Introduction
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Barbican Reset is an NPM package that provides a shared design system for Barbican digital projects — including SCSS utilities, Vue components, icons, animations, logos, and JS helpers.
|
|
6
6
|
|
|
7
7
|
## Contents
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
- [Barbican Reset](#barbican-reset)
|
|
10
|
+
- [Introduction](#introduction)
|
|
11
|
+
- [Contents](#contents)
|
|
12
|
+
- [1. Setup](#1-setup)
|
|
13
|
+
- [2. Component library](#2-component-library)
|
|
14
|
+
- [3. SCSS](#3-scss)
|
|
15
|
+
- [Full stylesheet](#full-stylesheet)
|
|
16
|
+
- [Individual stylesheets](#individual-stylesheets)
|
|
17
|
+
- [Mixins](#mixins)
|
|
18
|
+
- [SCSS documentation](#scss-documentation)
|
|
19
|
+
- [4. Icons](#4-icons)
|
|
20
|
+
- [5. Animations](#5-animations)
|
|
21
|
+
- [6. Logos](#6-logos)
|
|
22
|
+
- [7. Scripts](#7-scripts)
|
|
23
|
+
- [8. Pattern library](#8-pattern-library)
|
|
24
|
+
- [Setup](#setup)
|
|
25
|
+
- [New pages](#new-pages)
|
|
26
|
+
- [Extending layouts](#extending-layouts)
|
|
27
|
+
- [Including components (mixins)](#including-components-mixins)
|
|
28
|
+
- [9. Font library](#9-font-library)
|
|
15
29
|
|
|
16
30
|
## 1. Setup
|
|
17
31
|
|
|
18
|
-
|
|
32
|
+
Install the package into any project:
|
|
19
33
|
|
|
20
|
-
|
|
34
|
+
```sh
|
|
35
|
+
npm i barbican-reset
|
|
36
|
+
```
|
|
21
37
|
|
|
22
|
-
|
|
38
|
+
Import a component:
|
|
23
39
|
|
|
24
|
-
|
|
40
|
+
```js
|
|
41
|
+
import { BrAlert } from 'barbican-reset'
|
|
42
|
+
```
|
|
25
43
|
|
|
26
|
-
|
|
44
|
+
## 2. Component library
|
|
27
45
|
|
|
28
|
-
|
|
46
|
+
The component library is **Vue 3 only**.
|
|
47
|
+
|
|
48
|
+
> Many components are registered globally within the Barbican ticketing app. Check `main.js` to see which are available without an additional import.
|
|
49
|
+
|
|
50
|
+
| Component | File |
|
|
51
|
+
| --------------------------- | ------------------------------- |
|
|
52
|
+
| `<br-alert>` | BrAlert.vue |
|
|
53
|
+
| `<br-anchor>` | BrAnchor.vue |
|
|
54
|
+
| `<br-button>` | BrButton.vue |
|
|
55
|
+
| `<br-card>` | BrCard.vue |
|
|
56
|
+
| `<br-card-body>` | BrCardBody.vue |
|
|
57
|
+
| `<br-card-subtitle>` | BrCardSubtitle.vue |
|
|
58
|
+
| `<br-card-tearoff>` | BrCardTearoff.vue |
|
|
59
|
+
| `<br-card-text>` | BrCardText.vue |
|
|
60
|
+
| `<br-card-title>` | BrCardTitle.vue |
|
|
61
|
+
| `<br-collapse-button>` | BrCollapse/Button.vue |
|
|
62
|
+
| `<br-collapse-content>` | BrCollapse/Content.vue |
|
|
63
|
+
| `<br-confirm-done>` | BrConfirmDone.vue |
|
|
64
|
+
| `<br-confirm-email>` | BrConfirmEmail.vue |
|
|
65
|
+
| `<br-container>` | BrContainer.vue |
|
|
66
|
+
| `<br-details>` | BrDetails.vue |
|
|
67
|
+
| `<br-footer-lower>` | BrFooterLower.vue |
|
|
68
|
+
| `<br-footer-upper>` | BrFooterUpper.vue |
|
|
69
|
+
| `<br-form-block>` | BrFormBlock.vue |
|
|
70
|
+
| `<br-form-checkbox>` | BrFormCheckbox.vue |
|
|
71
|
+
| `<br-form-checkbox-group>` | BrFormCheckboxGroup.vue |
|
|
72
|
+
| `<br-form-date>` | BrFormDate.vue |
|
|
73
|
+
| `<br-form-edit>` | BrFormEdit.vue |
|
|
74
|
+
| `<br-form-email>` | BrFormEmail.vue |
|
|
75
|
+
| `<br-form-fieldset>` | BrFormFieldset.vue |
|
|
76
|
+
| `<br-form-input>` | BrFormInput.vue |
|
|
77
|
+
| `<br-form-password>` | BrFormPassword.vue |
|
|
78
|
+
| `<br-form-radio>` | BrFormRadio.vue |
|
|
79
|
+
| `<br-form-radio-group>` | BrFormRadioGroup.vue |
|
|
80
|
+
| `<br-form-row>` | BrFormRow.vue |
|
|
81
|
+
| `<br-form-tel>` | BrFormTel.vue |
|
|
82
|
+
| `<br-form-textarea>` | BrFormTextarea.vue |
|
|
83
|
+
| `<br-form-toggle>` | BrFormToggle.vue |
|
|
84
|
+
| `<br-form-update>` | BrFormUpdate.vue |
|
|
85
|
+
| `<br-form-visible>` | BrFormVisible.vue |
|
|
86
|
+
| `<br-link>` | BrLink.vue |
|
|
87
|
+
| `<br-loader>` | BrLoader.vue |
|
|
88
|
+
| `<br-overlay>` | BrOverlay.vue |
|
|
89
|
+
| `<br-skiplink>` | BrSkiplink.vue |
|
|
90
|
+
| `<br-status-bars>` | BrStatusBars.vue |
|
|
91
|
+
| `<br-table-header>` | BrTableHeader.vue |
|
|
92
|
+
| `<br-wrap>` | BrWrap.vue |
|
|
93
|
+
|
|
94
|
+
> The `br-` prefix makes it immediately clear that a component is from Barbican Reset and not native to the app. It also ensures two-word component names, which is the recommended format for custom elements (e.g. `<br-header>` rather than `<header>`).
|
|
95
|
+
|
|
96
|
+
## 3. SCSS
|
|
97
|
+
|
|
98
|
+
### Full stylesheet
|
|
99
|
+
|
|
100
|
+
```scss
|
|
101
|
+
// Vite / webpack (resolves from node_modules automatically)
|
|
102
|
+
@import 'barbican-reset/scss';
|
|
103
|
+
|
|
104
|
+
// Explicit node_modules path (e.g. Drupal)
|
|
105
|
+
@import '../node_modules/barbican-reset/scss';
|
|
106
|
+
```
|
|
29
107
|
|
|
30
|
-
|
|
108
|
+
### Individual stylesheets
|
|
31
109
|
|
|
32
|
-
|
|
110
|
+
The package exposes several standalone stylesheets:
|
|
33
111
|
|
|
34
|
-
|
|
112
|
+
| Export | Description |
|
|
113
|
+
| ------------------------------- | ---------------------------------- |
|
|
114
|
+
| `barbican-reset/scss` | Full stylesheet |
|
|
115
|
+
| `barbican-reset/reset` | CSS reset only |
|
|
116
|
+
| `barbican-reset/typography` | Typography styles |
|
|
117
|
+
| `barbican-reset/lists` | List styles |
|
|
118
|
+
| `barbican-reset/supreme` | Supreme font styles |
|
|
35
119
|
|
|
36
|
-
|
|
120
|
+
### Mixins
|
|
37
121
|
|
|
38
|
-
|
|
122
|
+
```scss
|
|
123
|
+
// Vite / webpack
|
|
124
|
+
@import 'barbican-reset/scss/mixins';
|
|
39
125
|
|
|
40
|
-
|
|
126
|
+
// Explicit node_modules path
|
|
127
|
+
@import '../node_modules/barbican-reset/scss/mixins';
|
|
128
|
+
```
|
|
41
129
|
|
|
42
|
-
The
|
|
43
|
-
|
|
44
|
-
> Many components are available globally within the Barbican ticketing app. Check the main.js file to see which components are currently available. These won't need an additional import statement.
|
|
45
|
-
|
|
46
|
-
> When manually importing components into Vue.js, be sure to declare the import as a Vue component as well
|
|
47
|
-
|
|
48
|
-
You can reference any of the following components:
|
|
49
|
-
|
|
50
|
-
| Component | Filename | SCSS Class | SCSS Mixin | Previously |
|
|
51
|
-
| -------------------- | ------------------- | -------------------- | ---------------- | ------------- |
|
|
52
|
-
| `<br-alert>` | BrAlert.vue | .br-alert | br-alert--setup | - |
|
|
53
|
-
| `<br-anchor>` | BrAnchor.vue | .btn | setup-button | - |
|
|
54
|
-
| `<br-button>` | BrButton.vue | .br-form-checkbox | br-form-checkbox | - |
|
|
55
|
-
| `<br-confirm-done>` | BrConfirmDone.vue | - | - | - |
|
|
56
|
-
| `<br-confirm-email>` | BrConfirmEmail.vue | - | - | - |
|
|
57
|
-
| `<br-container>` | BrContainer.vue | .br-container--outer | - | - |
|
|
58
|
-
| `<br-footer-lower>` | br_footer_lower.vue | .br-footer-lower | br-footer-lower | - |
|
|
59
|
-
| `<br-footer-upper>` | br_footer_upper.vue | .br-footer-upper | br-footer-upper | - |
|
|
60
|
-
| `<br-form-block>` | BrFormBlock.vue | - | - | - |
|
|
61
|
-
| `<br-form-password>` | BrFormPassword.vue | .br-form-password | br-form-password | - |
|
|
62
|
-
| `<br-form-row>` | BrFormRow.vue | .br-form-row | br-form-row | - |
|
|
63
|
-
| `<br-form-update>` | BrFormUpdate.vue | .br-form-update | br-form-update | - |
|
|
64
|
-
| `<br-loader>` | BrLoader.vue | .br-loader | - | - |
|
|
65
|
-
| `<br-skiplink>` | BrSkiplink.vue | - | - | `<skip-link>` |
|
|
66
|
-
| `<br-wrap>` | BrWrap.vue | .br-wrap | - | - |
|
|
67
|
-
|
|
68
|
-
The following component titles are deprecated. You can still use them, but they will migrate to the BR naming convention in future.
|
|
69
|
-
|
|
70
|
-
| Component | Filename | SCSS Class | SCSS Mixin |
|
|
71
|
-
| ----------------- | ----------------- | ---------- | ---------- |
|
|
72
|
-
| `<account-title>` | AccountTitle.vue | - | - |
|
|
73
|
-
| `<card-display>` | card_display.vue | - | - |
|
|
74
|
-
| `<event-summary>` | EventSummary.vue | - | - |
|
|
75
|
-
| `<fluid-iframe>` | FluidIframe.vue | - | - |
|
|
76
|
-
| `<help-row>` | help_row.vue | - | - |
|
|
77
|
-
| `<placeholder>` | placeholder.vue | - | - |
|
|
78
|
-
| `<payment-logo>` | payment_logo.vue | - | - |
|
|
79
|
-
| `<related-card>` | related_card.vue | - | - |
|
|
80
|
-
| `<related-title>` | related_title.vue | - | - |
|
|
81
|
-
| `<related-row>` | related_row.vue | - | - |
|
|
82
|
-
| `<type-text>` | type_text.vue | - | - |
|
|
83
|
-
| `<video-content>` | VideoContent.vue | - | - |
|
|
130
|
+
> The Barbican ticketing site makes SCSS mixins globally available via `vue.config.js`, so individual component files do not need to import them explicitly.
|
|
84
131
|
|
|
132
|
+
### SCSS documentation
|
|
133
|
+
|
|
134
|
+
We use SassDoc to document SCSS. To generate and watch for changes:
|
|
135
|
+
|
|
136
|
+
```sh
|
|
137
|
+
npm run build:css
|
|
85
138
|
```
|
|
86
|
-
The BR naming convention imitates the Bootstrap example. This format is useful for two reasons:
|
|
87
139
|
|
|
88
|
-
|
|
140
|
+
Open `sassdoc/index.html` in your browser to view the output.
|
|
141
|
+
|
|
142
|
+
## 4. Icons
|
|
89
143
|
|
|
90
|
-
|
|
144
|
+
Icons are Vue components exported from the `barbican-reset/icons` path.
|
|
145
|
+
|
|
146
|
+
```js
|
|
147
|
+
import { Cart, Close } from 'barbican-reset/icons'
|
|
91
148
|
```
|
|
92
149
|
|
|
93
|
-
|
|
150
|
+
Icon sub-groups are available at their own export paths:
|
|
94
151
|
|
|
95
|
-
|
|
152
|
+
```js
|
|
153
|
+
import { Edit } from 'barbican-reset/icons/account'
|
|
154
|
+
import { Done } from 'barbican-reset/icons/confirm'
|
|
155
|
+
import { Live } from 'barbican-reset/icons/stream'
|
|
156
|
+
```
|
|
96
157
|
|
|
97
|
-
|
|
98
|
-
- To view the documentation, open the file `sassdoc/index.html` in your browser. You will need to refresh this page to view any additional changes that you make.
|
|
158
|
+
## 5. Animations
|
|
99
159
|
|
|
100
|
-
|
|
160
|
+
GSAP animation helpers are exported from `barbican-reset/animations`.
|
|
101
161
|
|
|
102
|
-
|
|
162
|
+
```js
|
|
163
|
+
import { confirm } from 'barbican-reset/animations'
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## 6. Logos
|
|
167
|
+
|
|
168
|
+
SVG logo files are located in the `logos/` directory:
|
|
169
|
+
|
|
170
|
+
- `barbican.svg`
|
|
171
|
+
- `arts-council-england.svg`
|
|
172
|
+
- `city-of-london.svg`
|
|
173
|
+
- `lso.svg`
|
|
174
|
+
|
|
175
|
+
## 7. Scripts
|
|
103
176
|
|
|
104
|
-
|
|
177
|
+
JS helper utilities are available at two export paths:
|
|
105
178
|
|
|
106
|
-
|
|
107
|
-
-
|
|
108
|
-
|
|
109
|
-
- To view the documentation, open the file `out/index.html` in your browser. You will need to refresh this page to view any additional changes that you make.
|
|
179
|
+
```js
|
|
180
|
+
// Top-level helpers barrel
|
|
181
|
+
import helpers from 'barbican-reset/scripts/helpers'
|
|
110
182
|
|
|
111
|
-
|
|
183
|
+
// Vue composition API mixins (input helpers)
|
|
184
|
+
import { useInput } from 'barbican-reset/mixins'
|
|
185
|
+
```
|
|
112
186
|
|
|
113
|
-
|
|
187
|
+
## 8. Pattern library
|
|
114
188
|
|
|
115
|
-
|
|
189
|
+
The pattern library provides a single source of truth for all SCSS styles and lets you view the full family of Barbican styles alongside each other.
|
|
116
190
|
|
|
117
|
-
|
|
191
|
+
### Setup
|
|
118
192
|
|
|
119
|
-
|
|
193
|
+
> If this is your first time, navigate to the `patterns` subfolder and run `npm i`.
|
|
120
194
|
|
|
121
|
-
|
|
195
|
+
From the root folder:
|
|
122
196
|
|
|
123
|
-
|
|
197
|
+
```sh
|
|
198
|
+
npm run serve:patterns
|
|
199
|
+
```
|
|
124
200
|
|
|
125
|
-
|
|
201
|
+
Then open `http://localhost:3000` in your browser.
|
|
126
202
|
|
|
127
|
-
|
|
203
|
+
### New pages
|
|
128
204
|
|
|
129
|
-
|
|
205
|
+
> Run the following from the `patterns` subfolder.
|
|
130
206
|
|
|
131
|
-
|
|
207
|
+
Navigate to the `views` subfolder and duplicate `index.pug`, then rename it.
|
|
132
208
|
|
|
133
|
-
|
|
209
|
+
### Extending layouts
|
|
134
210
|
|
|
135
|
-
|
|
211
|
+
The first line of your page reads:
|
|
136
212
|
|
|
137
|
-
|
|
213
|
+
```pug
|
|
214
|
+
extends ../layouts/main
|
|
215
|
+
```
|
|
138
216
|
|
|
139
|
-
The
|
|
217
|
+
The `layouts/main.pug` file defines `block content` — the area your page can write into. Layouts are useful for page templates, removing the need for repetitive scaffolding code.
|
|
140
218
|
|
|
141
|
-
|
|
219
|
+
### Including components (mixins)
|
|
142
220
|
|
|
143
|
-
|
|
221
|
+
The second line of your page reads:
|
|
144
222
|
|
|
145
|
-
|
|
223
|
+
```pug
|
|
224
|
+
include ../components/samples
|
|
225
|
+
```
|
|
146
226
|
|
|
147
|
-
|
|
227
|
+
The `components/samples.pug` file defines `mixin Samples()`. Call it from your page like so:
|
|
148
228
|
|
|
149
|
-
|
|
229
|
+
```pug
|
|
230
|
+
+Samples('Contemporary', 'contemporary-music')
|
|
231
|
+
```
|
|
150
232
|
|
|
151
|
-
|
|
233
|
+
Mixins are useful for rendering repetitive markup. For more flexibility, extend a layout instead.
|
|
152
234
|
|
|
153
|
-
|
|
235
|
+
## 9. Font library
|
|
154
236
|
|
|
155
|
-
|
|
237
|
+
The package includes a `font-face` SCSS mixin that defaults font URLs to `https://static.barbican.org.uk/systems-public/fonts/subset/`, so no digital project needs to host its own font files.
|
package/animations/confirm.js
CHANGED
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
import gsap from
|
|
1
|
+
import gsap from 'gsap'
|
|
2
2
|
|
|
3
|
+
/** @type {gsap.TweenVars} Fade-in vars: animates element from transparent with a short delay */
|
|
3
4
|
const fadeIn = {
|
|
4
5
|
duration: 0.3,
|
|
5
6
|
opacity: 0,
|
|
6
7
|
delay: 0.3,
|
|
7
|
-
}
|
|
8
|
+
}
|
|
8
9
|
|
|
10
|
+
/** @type {gsap.TweenVars} Explode vars: scales element up and fades it out */
|
|
9
11
|
const explode = {
|
|
10
|
-
ease:
|
|
12
|
+
ease: 'power1.out',
|
|
11
13
|
opacity: 0,
|
|
12
14
|
scale: 1.5,
|
|
13
|
-
}
|
|
15
|
+
}
|
|
14
16
|
|
|
17
|
+
/** @type {gsap.TimelineVars} Default timeline settings shared across all confirm animations */
|
|
15
18
|
const defaults = {
|
|
16
19
|
duration: 0.6,
|
|
17
|
-
ease:
|
|
18
|
-
transformOrigin:
|
|
19
|
-
}
|
|
20
|
-
|
|
20
|
+
ease: 'power1.in',
|
|
21
|
+
transformOrigin: 'center',
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Animates the email confirmation card.
|
|
26
|
+
* Fades in the title, draws the envelope outline and fold SVG paths,
|
|
27
|
+
* explodes a cloned title, then slides in the arrow.
|
|
28
|
+
*/
|
|
21
29
|
export const animateEmail = () => {
|
|
22
|
-
const query = (target) => document.querySelector(`.card[email] ${target}`)
|
|
23
|
-
const title = query(
|
|
24
|
-
const outline = query(
|
|
25
|
-
const arrow = query(
|
|
26
|
-
const fold = query(
|
|
27
|
-
const tl = gsap.timeline({ defaults })
|
|
28
|
-
|
|
29
|
-
const clone = title.cloneNode(true)
|
|
30
|
-
clone.classList.add(
|
|
31
|
-
title.after(clone)
|
|
32
|
-
|
|
33
|
-
tl.set(arrow, { opacity: 0 })
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
};
|
|
42
|
-
|
|
30
|
+
const query = (target) => document.querySelector(`.card[email] ${target}`)
|
|
31
|
+
const title = query('.card-title')
|
|
32
|
+
const outline = query('.outline')
|
|
33
|
+
const arrow = query('.arrow')
|
|
34
|
+
const fold = query('.fold')
|
|
35
|
+
const tl = gsap.timeline({ defaults })
|
|
36
|
+
|
|
37
|
+
const clone = title.cloneNode(true)
|
|
38
|
+
clone.classList.add('clone')
|
|
39
|
+
title.after(clone)
|
|
40
|
+
|
|
41
|
+
tl.set(arrow, { opacity: 0 }).from(title, fadeIn).set(clone, { opacity: 0.4 }).from(outline, { drawSVG: '0%' }, 'start').from(fold, { drawSVG: '0%', duration: 0.3 }, 'start').to(clone, explode, 'start').set(arrow, { opacity: 1 }).from(arrow, { x: -6, ease: 'power1.out' })
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Animates the done confirmation card.
|
|
46
|
+
* Fades in the title, draws the circle outline and tick SVG paths,
|
|
47
|
+
* and explodes a cloned title.
|
|
48
|
+
*/
|
|
43
49
|
export const animateDone = () => {
|
|
44
|
-
const query = (target) => document.querySelector(`.card[done] ${target}`)
|
|
45
|
-
const title = query(
|
|
46
|
-
const outline = query(
|
|
47
|
-
const tick = query(
|
|
48
|
-
const tl = gsap.timeline({ defaults })
|
|
49
|
-
|
|
50
|
-
const clone = title.cloneNode(true)
|
|
51
|
-
clone.classList.add(
|
|
52
|
-
title.after(clone)
|
|
53
|
-
|
|
54
|
-
tl.from(title, fadeIn)
|
|
55
|
-
|
|
56
|
-
.from(outline, { drawSVG: "0%" }, "start")
|
|
57
|
-
.from(tick, { drawSVG: "0%", duration: 0.3 }, "start+=0.3")
|
|
58
|
-
.to(clone, explode, "start");
|
|
59
|
-
};
|
|
50
|
+
const query = (target) => document.querySelector(`.card[done] ${target}`)
|
|
51
|
+
const title = query('.card-title')
|
|
52
|
+
const outline = query('.outline')
|
|
53
|
+
const tick = query('.tick')
|
|
54
|
+
const tl = gsap.timeline({ defaults })
|
|
55
|
+
|
|
56
|
+
const clone = title.cloneNode(true)
|
|
57
|
+
clone.classList.add('clone')
|
|
58
|
+
title.after(clone)
|
|
59
|
+
|
|
60
|
+
tl.from(title, fadeIn).set(clone, { opacity: 0.4 }).from(outline, { drawSVG: '0%' }, 'start').from(tick, { drawSVG: '0%', duration: 0.3 }, 'start+=0.3').to(clone, explode, 'start')
|
|
61
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="br-form-checkbox">
|
|
2
|
+
<div :class="['br-form-checkbox', { block }]">
|
|
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
|
type="checkbox"
|
|
13
13
|
:error="error" />
|
|
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>
|
|
@@ -29,21 +29,11 @@ defineOptions({
|
|
|
29
29
|
})
|
|
30
30
|
|
|
31
31
|
const props = defineProps({
|
|
32
|
-
id:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
type: Boolean,
|
|
38
|
-
},
|
|
39
|
-
success: {
|
|
40
|
-
default: false,
|
|
41
|
-
type: Boolean,
|
|
42
|
-
},
|
|
43
|
-
error: {
|
|
44
|
-
default: false,
|
|
45
|
-
type: Boolean,
|
|
46
|
-
},
|
|
32
|
+
id: String,
|
|
33
|
+
disabled: Boolean,
|
|
34
|
+
success: Boolean,
|
|
35
|
+
error: Boolean,
|
|
36
|
+
block: Boolean,
|
|
47
37
|
})
|
|
48
38
|
|
|
49
39
|
// @description Returns a string for the "id" attribute
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
:value="option.value"
|
|
9
9
|
:success="success"
|
|
10
10
|
v-model="model"
|
|
11
|
+
:block="block"
|
|
11
12
|
:error="error"
|
|
12
13
|
:name="name">
|
|
13
14
|
<slot v-if="$slots.default" v-bind="option" />
|
|
@@ -31,13 +32,8 @@ const model = defineModel()
|
|
|
31
32
|
const props = defineProps({
|
|
32
33
|
options: Array,
|
|
33
34
|
name: String,
|
|
34
|
-
success:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
error: {
|
|
39
|
-
default: false,
|
|
40
|
-
type: Boolean,
|
|
41
|
-
},
|
|
35
|
+
success: Boolean,
|
|
36
|
+
error: Boolean,
|
|
37
|
+
block: Boolean,
|
|
42
38
|
})
|
|
43
39
|
</script>
|
package/icons/barbican.vue
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<svg
|
|
3
3
|
xmlns="http://www.w3.org/2000/svg"
|
|
4
|
-
|
|
4
|
+
class="br-icon wordmark"
|
|
5
5
|
viewBox="0 0 333 65"
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
height="31.23"
|
|
7
|
+
width="160">
|
|
8
8
|
<path
|
|
9
|
-
d="M0 0H14.7V24.2C18.2 21.1 21.4 19.9 26.3 19.9C38.7 19.9 47.6 29.5 47.6 42.8C47.6 49.3 45.2 55.3 41.2 59.4C37.6 63.1 32.7 64.9 26.8 64.9C20.8 64.9 17.3 63.4 14.1 59.8V63.3H0V0ZM13.7 42.4C13.7 48.7 17.5 52.9 23.1 52.9C28.7 52.9 32.2 49.1 32.2 42.8C32.2 36.4 28.7 32.4 22.9 32.4C17.4 32.5 13.7 36.5 13.7 42.4V42.4ZM83.1 60.5C79.3 64 76.6 65 70.8 65C64.2 65 59.4 63.2 55.7 59.3C51.7 55.1 49.6 49.3 49.6 42.6C49.6 29.4 58.3 20.2 70.6 20.2C76 20.2 79 21.4 83 25.2V21.6H97.1V63.6H83.1V60.5V60.5ZM64.9 43C64.9 49.3 68.4 53 74.2 53C79.8 53 83.5 48.9 83.5 42.6C83.5 36.6 79.9 32.5 74.4 32.5C68.9 32.5 64.9 36.9 64.9 43ZM101.2 21.5H115.3V26.8C118.4 22 121.5 20.3 126.6 20.3C127.6 20.3 128.2 20.4 131.7 20.8V34.1C130 33.6 129.1 33.6 127.9 33.6C120.1 33.6 116 37.8 116 45.8V63.5H101.3L101.2 21.5V21.5ZM134.2 0H148.9V24.2C152.4 21.1 155.6 19.9 160.5 19.9C172.9 19.9 181.8 29.5 181.8 42.8C181.8 49.3 179.4 55.3 175.4 59.4C171.8 63.1 167 64.9 161 64.9C155 64.9 151.5 63.4 148.3 59.8V63.3H134.2V0ZM147.9 42.4C147.9 48.7 151.7 52.9 157.3 52.9C162.9 52.9 166.4 49.1 166.4 42.8C166.4 36.4 162.9 32.4 157.1 32.4C151.6 32.5 147.9 36.5 147.9 42.4ZM200.2 9.3C200.2 13.8 196.6 17.5 192 17.5C187.5 17.5 183.9 13.9 183.9 9.3C183.9 4.8 187.5 1.2 192 1.2C196.6 1.2 200.2 4.8 200.2 9.3ZM184.7 21.5H199.4V63.5H184.7V21.5V21.5ZM236 61.6C229.9 64.6 227.7 65.1 222.6 65.1C216.8 65.1 212.2 63.6 209.1 60.4C204.9 56.4 202.6 50.1 202.6 43C202.6 29.2 211 19.7 223.3 19.7C228 19.7 231.2 20.6 236 23.5V38.2C232.5 34.1 230.4 32.8 226.8 32.8C221.4 32.8 218.2 36.4 218.2 42.3C218.2 48.1 221.5 51.7 226.7 51.7C230.1 51.7 232.5 50.4 236 47V61.6V61.6ZM271 60.5C267.2 64 264.5 65 258.7 65C252.1 65 247.3 63.2 243.6 59.3C239.6 55.1 237.5 49.3 237.5 42.6C237.5 29.4 246.2 20.2 258.5 20.2C263.9 20.2 266.9 21.4 270.9 25.2V21.6H285V63.6H270.9V60.5H271V60.5ZM252.8 43C252.8 49.3 256.3 53 262.1 53C267.7 53 271.4 48.9 271.4 42.6C271.4 36.6 267.8 32.5 262.3 32.5C256.8 32.5 252.8 36.9 252.8 43ZM289.1 21.5H303.6V26.3C307.3 21.5 310.6 19.9 316.6 19.9C323.1 19.9 328.6 22.5 331 26.9C332.3 29.2 332.9 31.8 332.9 35.1V63.4H318.2V40.3C318.2 34.7 316.1 32 311.7 32C307 32 303.8 35.3 303.8 40.3V63.4H289.1V21.5Z"
|
|
10
|
-
fill="white" />
|
|
9
|
+
d="M0 0H14.7V24.2C18.2 21.1 21.4 19.9 26.3 19.9C38.7 19.9 47.6 29.5 47.6 42.8C47.6 49.3 45.2 55.3 41.2 59.4C37.6 63.1 32.7 64.9 26.8 64.9C20.8 64.9 17.3 63.4 14.1 59.8V63.3H0V0ZM13.7 42.4C13.7 48.7 17.5 52.9 23.1 52.9C28.7 52.9 32.2 49.1 32.2 42.8C32.2 36.4 28.7 32.4 22.9 32.4C17.4 32.5 13.7 36.5 13.7 42.4V42.4ZM83.1 60.5C79.3 64 76.6 65 70.8 65C64.2 65 59.4 63.2 55.7 59.3C51.7 55.1 49.6 49.3 49.6 42.6C49.6 29.4 58.3 20.2 70.6 20.2C76 20.2 79 21.4 83 25.2V21.6H97.1V63.6H83.1V60.5V60.5ZM64.9 43C64.9 49.3 68.4 53 74.2 53C79.8 53 83.5 48.9 83.5 42.6C83.5 36.6 79.9 32.5 74.4 32.5C68.9 32.5 64.9 36.9 64.9 43ZM101.2 21.5H115.3V26.8C118.4 22 121.5 20.3 126.6 20.3C127.6 20.3 128.2 20.4 131.7 20.8V34.1C130 33.6 129.1 33.6 127.9 33.6C120.1 33.6 116 37.8 116 45.8V63.5H101.3L101.2 21.5V21.5ZM134.2 0H148.9V24.2C152.4 21.1 155.6 19.9 160.5 19.9C172.9 19.9 181.8 29.5 181.8 42.8C181.8 49.3 179.4 55.3 175.4 59.4C171.8 63.1 167 64.9 161 64.9C155 64.9 151.5 63.4 148.3 59.8V63.3H134.2V0ZM147.9 42.4C147.9 48.7 151.7 52.9 157.3 52.9C162.9 52.9 166.4 49.1 166.4 42.8C166.4 36.4 162.9 32.4 157.1 32.4C151.6 32.5 147.9 36.5 147.9 42.4ZM200.2 9.3C200.2 13.8 196.6 17.5 192 17.5C187.5 17.5 183.9 13.9 183.9 9.3C183.9 4.8 187.5 1.2 192 1.2C196.6 1.2 200.2 4.8 200.2 9.3ZM184.7 21.5H199.4V63.5H184.7V21.5V21.5ZM236 61.6C229.9 64.6 227.7 65.1 222.6 65.1C216.8 65.1 212.2 63.6 209.1 60.4C204.9 56.4 202.6 50.1 202.6 43C202.6 29.2 211 19.7 223.3 19.7C228 19.7 231.2 20.6 236 23.5V38.2C232.5 34.1 230.4 32.8 226.8 32.8C221.4 32.8 218.2 36.4 218.2 42.3C218.2 48.1 221.5 51.7 226.7 51.7C230.1 51.7 232.5 50.4 236 47V61.6V61.6ZM271 60.5C267.2 64 264.5 65 258.7 65C252.1 65 247.3 63.2 243.6 59.3C239.6 55.1 237.5 49.3 237.5 42.6C237.5 29.4 246.2 20.2 258.5 20.2C263.9 20.2 266.9 21.4 270.9 25.2V21.6H285V63.6H270.9V60.5H271V60.5ZM252.8 43C252.8 49.3 256.3 53 262.1 53C267.7 53 271.4 48.9 271.4 42.6C271.4 36.6 267.8 32.5 262.3 32.5C256.8 32.5 252.8 36.9 252.8 43ZM289.1 21.5H303.6V26.3C307.3 21.5 310.6 19.9 316.6 19.9C323.1 19.9 328.6 22.5 331 26.9C332.3 29.2 332.9 31.8 332.9 35.1V63.4H318.2V40.3C318.2 34.7 316.1 32 311.7 32C307 32 303.8 35.3 303.8 40.3V63.4H289.1V21.5Z" />
|
|
11
10
|
</svg>
|
|
12
11
|
</template>
|
|
13
|
-
|
|
14
|
-
<style lang="scss" module>
|
|
15
|
-
.logo {
|
|
16
|
-
height: auto;
|
|
17
|
-
width: var(--width-icon);
|
|
18
|
-
}
|
|
19
|
-
</style>
|
package/index.js
CHANGED
|
@@ -28,6 +28,7 @@ import BrFormEdit from '#components/BrFormEdit.vue'
|
|
|
28
28
|
import BrFormEmail from '#components/BrFormEmail.vue'
|
|
29
29
|
import BrFormFieldset from '#components/BrFormFieldset.vue'
|
|
30
30
|
import BrFormInput from '#components/BrFormInput.vue'
|
|
31
|
+
import BrFormLabel from '#components/BrFormLabel.vue'
|
|
31
32
|
import BrFormPassword from '#components/BrFormPassword.vue'
|
|
32
33
|
import BrFormRadio from '#components/BrFormRadio.vue'
|
|
33
34
|
import BrFormRadioGroup from '#components/BrFormRadioGroup.vue'
|
|
@@ -73,6 +74,7 @@ export {
|
|
|
73
74
|
BrFormEmail,
|
|
74
75
|
BrFormFieldset,
|
|
75
76
|
BrFormInput,
|
|
77
|
+
BrFormLabel,
|
|
76
78
|
BrFormPassword,
|
|
77
79
|
BrFormRadio,
|
|
78
80
|
BrFormRadioGroup,
|