@amedia/brick-mcp 0.1.0 → 0.1.2

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.
@@ -1,40 +1,57 @@
1
1
  [
2
2
  {
3
3
  "name": "brick-alt-teaser",
4
- "version": "8.0.68",
4
+ "version": "8.0.70",
5
5
  "selector": "brick-alt-teaser-v8",
6
6
  "category": "Display",
7
- "tags": ["display"]
7
+ "tags": [
8
+ "display"
9
+ ]
8
10
  },
9
11
  {
10
12
  "name": "brick-avatar",
11
- "version": "0.2.39",
13
+ "version": "0.2.42",
12
14
  "selector": "brick-avatar-v0",
13
15
  "description": "brick-avatar component",
14
16
  "category": "Display",
15
- "tags": ["display"]
17
+ "tags": [
18
+ "display"
19
+ ]
16
20
  },
17
21
  {
18
22
  "name": "brick-button",
19
- "version": "9.3.4",
23
+ "version": "9.3.6",
20
24
  "selector": "brick-button-v9",
21
25
  "category": "Forms",
22
- "tags": ["forms", "interactive"]
26
+ "tags": [
27
+ "forms",
28
+ "interactive"
29
+ ]
30
+ },
31
+ {
32
+ "name": "brick-byline",
33
+ "version": "1.0.2",
34
+ "selector": "brick-byline-v1",
35
+ "description": "brick-byline component"
23
36
  },
24
37
  {
25
38
  "name": "brick-card",
26
- "version": "7.3.11",
39
+ "version": "7.3.13",
27
40
  "selector": "brick-card-v7",
28
41
  "category": "Layout",
29
- "tags": ["layout"]
42
+ "tags": [
43
+ "layout"
44
+ ]
30
45
  },
31
46
  {
32
47
  "name": "brick-carousel",
33
- "version": "2.0.13",
48
+ "version": "2.2.2",
34
49
  "selector": "brick-carousel-v2",
35
50
  "description": "Simple carousel for any content passed to it.",
36
51
  "category": "Display",
37
- "tags": ["display"]
52
+ "tags": [
53
+ "display"
54
+ ]
38
55
  },
39
56
  {
40
57
  "name": "brick-classnames",
@@ -42,25 +59,29 @@
42
59
  "selector": "brick-classnames-v2",
43
60
  "description": "Utility method to create a safe string from a design name",
44
61
  "category": "Utilities",
45
- "tags": ["utilities"]
62
+ "tags": [
63
+ "utilities"
64
+ ]
46
65
  },
47
66
  {
48
67
  "name": "brick-countdown",
49
- "version": "2.0.12",
68
+ "version": "2.0.14",
50
69
  "selector": "brick-countdown-v2",
51
70
  "description": "brick-countdown component"
52
71
  },
53
72
  {
54
73
  "name": "brick-dialog",
55
- "version": "2.0.16",
74
+ "version": "2.0.18",
56
75
  "selector": "brick-dialog-v2",
57
76
  "description": "brick-dialog component",
58
77
  "category": "Feedback",
59
- "tags": ["feedback"]
78
+ "tags": [
79
+ "feedback"
80
+ ]
60
81
  },
61
82
  {
62
83
  "name": "brick-expand",
63
- "version": "0.0.2",
84
+ "version": "0.0.4",
64
85
  "selector": "brick-expand-v0",
65
86
  "description": "brick-expand component"
66
87
  },
@@ -70,20 +91,24 @@
70
91
  "selector": "brick-fonts-v2",
71
92
  "description": "Distribution of font files",
72
93
  "category": "Utilities",
73
- "tags": ["utilities"]
94
+ "tags": [
95
+ "utilities"
96
+ ]
74
97
  },
75
98
  {
76
99
  "name": "brick-helloworld",
77
- "version": "2.0.5",
100
+ "version": "2.0.7",
78
101
  "selector": "brick-helloworld-v2",
79
102
  "description": "Brick Hello World component"
80
103
  },
81
104
  {
82
105
  "name": "brick-icon",
83
- "version": "2.3.4",
106
+ "version": "2.3.6",
84
107
  "selector": "brick-icon-v2",
85
108
  "category": "Display",
86
- "tags": ["display"]
109
+ "tags": [
110
+ "display"
111
+ ]
87
112
  },
88
113
  {
89
114
  "name": "brick-illustrations",
@@ -93,18 +118,23 @@
93
118
  },
94
119
  {
95
120
  "name": "brick-image",
96
- "version": "6.0.8",
121
+ "version": "6.0.10",
97
122
  "selector": "brick-image-v6",
98
123
  "category": "Display",
99
- "tags": ["display"]
124
+ "tags": [
125
+ "display"
126
+ ]
100
127
  },
101
128
  {
102
129
  "name": "brick-input",
103
- "version": "3.0.12",
130
+ "version": "3.0.14",
104
131
  "selector": "brick-input-v3",
105
132
  "description": "brick-input component",
106
133
  "category": "Forms",
107
- "tags": ["forms", "interactive"]
134
+ "tags": [
135
+ "forms",
136
+ "interactive"
137
+ ]
108
138
  },
109
139
  {
110
140
  "name": "brick-nifs",
@@ -114,80 +144,88 @@
114
144
  },
115
145
  {
116
146
  "name": "brick-pill",
117
- "version": "9.0.5",
147
+ "version": "9.0.7",
118
148
  "selector": "brick-pill-v9"
119
149
  },
120
150
  {
121
151
  "name": "brick-player",
122
- "version": "1.27.20",
152
+ "version": "1.27.22",
123
153
  "selector": "brick-player-v1",
124
154
  "description": "Component for playing video and audio files"
125
155
  },
126
156
  {
127
157
  "name": "brick-published",
128
- "version": "4.0.4",
158
+ "version": "4.0.6",
129
159
  "selector": "brick-published-v4",
130
160
  "description": "brick-published"
131
161
  },
132
162
  {
133
163
  "name": "brick-share",
134
- "version": "0.3.7",
164
+ "version": "0.3.9",
135
165
  "selector": "brick-share-v0",
136
166
  "description": "brick-share component"
137
167
  },
138
168
  {
139
169
  "name": "brick-stepper",
140
- "version": "1.0.14",
170
+ "version": "1.0.16",
141
171
  "selector": "brick-stepper-v1",
142
172
  "description": "brick-stepper component"
143
173
  },
144
174
  {
145
175
  "name": "brick-tab",
146
- "version": "0.1.11",
176
+ "version": "0.1.13",
147
177
  "selector": "brick-tab-v0",
148
178
  "description": "brick-tab component"
149
179
  },
150
180
  {
151
181
  "name": "brick-tabs",
152
- "version": "0.1.12",
182
+ "version": "0.1.14",
153
183
  "selector": "brick-tabs-v0",
154
184
  "description": "brick-tabs component handling tablist, tabs and tabpanel",
155
185
  "category": "Navigation",
156
- "tags": ["navigation"]
186
+ "tags": [
187
+ "navigation"
188
+ ]
157
189
  },
158
190
  {
159
191
  "name": "brick-tag",
160
- "version": "0.0.11",
192
+ "version": "0.0.13",
161
193
  "selector": "brick-tag-v0",
162
194
  "description": "brick-tag component"
163
195
  },
164
196
  {
165
197
  "name": "brick-teaser",
166
- "version": "19.2.8",
167
- "selector": "brick-teaser-v19",
198
+ "version": "20.1.0",
199
+ "selector": "brick-teaser-v20",
168
200
  "description": "Teaser component.",
169
201
  "category": "Display",
170
- "tags": ["display"]
202
+ "tags": [
203
+ "display"
204
+ ]
171
205
  },
172
206
  {
173
207
  "name": "brick-teaser-player",
174
- "version": "1.0.25",
208
+ "version": "1.0.28",
175
209
  "selector": "brick-teaser-player-v1",
176
210
  "description": "brick-video-teaser component",
177
211
  "category": "Display",
178
- "tags": ["display"]
212
+ "tags": [
213
+ "display"
214
+ ]
179
215
  },
180
216
  {
181
217
  "name": "brick-teaser-reels",
182
- "version": "0.2.32",
218
+ "version": "0.4.2",
183
219
  "selector": "brick-teaser-reels-v0",
184
220
  "description": "brick-teaser-reels component",
185
221
  "category": "Display",
186
- "tags": ["display"]
222
+ "tags": [
223
+ "display"
224
+ ]
187
225
  },
188
226
  {
189
227
  "name": "brick-textarea",
190
- "version": "2.0.7",
228
+ "version": "2.0.9",
191
229
  "selector": "brick-textarea-v2",
192
230
  "description": "brick-textarea component"
193
231
  },
@@ -199,30 +237,34 @@
199
237
  },
200
238
  {
201
239
  "name": "brick-toast",
202
- "version": "0.1.23",
240
+ "version": "0.1.25",
203
241
  "selector": "brick-toast-v0",
204
242
  "description": "brick-toast component",
205
243
  "category": "Feedback",
206
- "tags": ["feedback"]
244
+ "tags": [
245
+ "feedback"
246
+ ]
207
247
  },
208
248
  {
209
249
  "name": "brick-toggle",
210
- "version": "3.1.10",
250
+ "version": "3.1.12",
211
251
  "selector": "brick-toggle-v3",
212
252
  "description": "brick-toggle component"
213
253
  },
214
254
  {
215
255
  "name": "brick-tokens",
216
- "version": "5.19.9",
256
+ "version": "5.21.0",
217
257
  "selector": "brick-tokens-v5",
218
258
  "description": "Tokens package",
219
259
  "category": "Utilities",
220
- "tags": ["utilities"]
260
+ "tags": [
261
+ "utilities"
262
+ ]
221
263
  },
222
264
  {
223
265
  "name": "brick-tooltip",
224
- "version": "1.0.13",
266
+ "version": "1.0.15",
225
267
  "selector": "brick-tooltip-v1",
226
268
  "description": "brick-tooltip component"
227
269
  }
228
- ]
270
+ ]
@@ -4,4 +4,4 @@
4
4
  "naming": "import { Meta, Canvas, Source } from '@storybook/addon-docs/blocks';\nimport { BrickStyle } from './brickStyle.js';\nimport Repo from './assets/repo.svg';\nimport Open from './assets/open.svg';\n\n<Meta title=\"Brick Tokens/Documentation/Naming\" />\n\n<brick-style></brick-style>\n\n# Naming\n\nA design token name in Figma can be transformed into different shapes based on the format.\nSee all the tokens available at the [tokens pages](?path=/story/brick-tokens-tokens--space)\n\n## Naming Conventions and examples\n\nDue to varying naming conventions and requirements across technologies, the naming format in **code** can differ.\n\nBelow are two examples illustrating the transformation of names into different formats:\n\n### Figma names:\n\n- `color.utility.primary.bg`\n- `spacing.x1`\n\n### CSS variable\n\n<Source\n language=\"css\"\n dark=\"true\"\n code={`\ncolor: var(--brick-colors-utilityPrimaryBg);\npadding: var(--brick-spacing-x1);\n `}\n/>\n\n### CSS-in-JS\n\nDeprecated - use css variables instead\n\n<Source\n language=\"javascript\"\n dark=\"true\"\n code={`\nconst heading = css({\n color: '$utilityPrimaryBg', //translates to 'var(--brick-colors-primaryBg)'\n padding:'$x1' //translates to 'var(--brick-spacing-x1)''\n})\n `}\n/>\n\n### For iOS\n\n**Spacing.swift**\n\n<Source\n language=\"other\"\n dark=\"true\"\n code={`\n //Example of name/value in the Spacing.swift file\nstruct Spacing {\n\tstatic let x1 : CGFloat = 5\n }\n `}\n/>\n\n**colors.json**\n\n<Source\n language=\"other\"\n dark=\"true\"\n code={`\n //Example of name/value in the colors.json file\n{\n \"color_utility_primary_fg\": \"#292827\",\n}\n `}\n/>\n\n## The taxonomy behind the names in themes\n\nWe need names that makes it as easy as possible to understand what the token should be used for, and when.\n\nGood names are predictable, unique, and understandable across disciplines.\n\nWhat is semantic to one, might not be semantic to a coworker. We need to agree on a common vocabulary.\n\nIn our themes, the design tokens are made up of semantic attributes that together form the token name. This ensures scalability and consistency. It covers both simple and more complex naming.\n\n<div className=\"token-name-steps\">\n <span className=\"step\">\n <strong>Scope*</strong>\n </span>\n <span>─</span>\n <span className=\"step\">\n <strong>[Context]</strong>\n </span>\n <span>─</span>\n <span className=\"step\">\n <strong>[Prominence]</strong>\n </span>\n <span>─</span>\n <span className=\"step\">\n <strong>[Sentiment]</strong>\n </span>\n <span>─</span>\n <span className=\"step\">\n <strong>[State]</strong>\n </span>\n <span></span>\n <span className=\"step\">\n <strong>Usage*</strong>\n </span>\n</div>\n*required parts. The optional parts are enclosed in brackets [].{' '}\n\n<div class=\"token-name-parts\">\n<div class=\"token-name-part\">\n **Scope**: \"Omfang\" The broadest category of the token, indicating its general\n purpose.\n Definerer hvilket \"navnerom\" tokenet tilhører.\n <ul>\n <li>\n <code>base</code>: General scope.\n </li>\n <li>\n <code>utility</code>: Interaction colors used for status messages and alerts.\n </li>\n <li>\n <code>supportive</code>: Supportive colors used in a theme on different elements\n </li>\n <li>\n <code>button</code>, <code>article</code>, <code>expand</code>:\n Component specific scope.\n </li>\n </ul>\n</div>\n\n<div class=\"token-name-part\">\n **[Context]**: Optional. Further refines the scope by specifying the\n particular area or genre the token applies to.\n <ul>\n <li>\n <code>opinion</code>, <code>reel</code>, <code>finance</code>,\n <code>lifestyle</code>\n </li>\n </ul>\n</div>\n\n<div class=\"token-name-part\">\n **[Prominence]** (Visuell Vekt) Optional. Describes the visual importance or\n emphasis of the element.\n <ul>\n <li>\n <code>primary</code>, <code>secondary</code>, <code>subtle</code>\n </li>\n </ul>\n</div>\n\n<div class=\"token-name-part\">\n **[Sentiment]**[ (Budskap/Status) Optional. Describes the emotional tone or\n status\n <ul>\n <li>\n <code>success</code>, <code>error</code>, <code>warning</code>,\n <code>breaking</code>, <code>live</code>, <code>beta</code>,\n <code>new</code>\n </li>\n </ul>\n</div>\n\n<div class=\"token-name-part\">\n **[State]** (Tilstand) Optional. Describes the interaction state of the\n element.\n <ul>\n <li>\n <code>hover</code>, <code>active</code>, <code>focus</code>,\n <code>disabled</code>\n </li>\n </ul>\n</div>\n\n<div class=\"token-name-part\">\n**Usage** (Bruk) Obligatorisk. Describing what the design decision applies to. If it is a color, it might be \"bg\", but if it is typography it might be \"body-s\" or \"heading-m\", including size to be responsive.\n <ul>\n <li>\n <code>bg</code>, <code>fg</code>, <code>border</code>, <code>body-s</code>, <code>heading-xl</code>\n </li>\n </ul>\n\n</div>\n</div>\n\n<div className=\"token-taxonomy-table\">\n <div>Token Navn</div>\n <div>Scope</div>\n <div>Context</div>\n <div>Prominence</div>\n <div>Sentiment</div>\n <div>State</div>\n <div>Usage</div>\n <div>Forklaring</div>\n\n<div>\n <strong>\n <code>base-page-bg</code>\n </strong>\n</div>\n<div>\n <code>base</code>\n</div>\n<div>-</div>\n<div>-</div>\n<div>-</div>\n<div>-</div>\n<div>\n <code>page-bg</code>\n</div>\n<div>Sidebakgrunn</div>\n\n<div>\n <strong>\n <code>button-primary-bg</code>\n </strong>\n</div>\n<div>\n <code>button</code>\n</div>\n<div>-</div>\n<div>\n <code>primary</code>\n</div>\n<div>-</div>\n<div>-</div>\n<div>\n <code>bg</code>\n</div>\n<div>Bakgrunn på knapp</div>\n\n<div>\n <strong>\n <code>button-primary-fg</code>\n </strong>\n</div>\n<div>\n <code>button</code>\n</div>\n<div>-</div>\n<div>\n <code>primary</code>\n</div>\n<div>-</div>\n<div>-</div>\n<div>\n <code>fg</code>\n</div>\n<div>Tekst/Ikon på knapp</div>\n<div>\n <strong>\n <code>utility-success-fg</code>\n </strong>\n</div>\n<div>\n <code>utility</code>\n</div>\n<div>-</div>\n<div>-</div>\n<div>\n <code>success</code>\n</div>\n<div>-</div>\n<div>\n <code>fg</code>\n</div>\n<div>Tekstfarge for suksess</div>\n\n<div><strong><code>utility-success-hover-bg</code></strong></div>\n<div><code>utility</code></div>\n<div>-</div>\n<div>-</div>\n<div><code>success</code></div>\n<div><code>hover</code></div>\n<div><code>bg</code></div>\n<div>Bakgrunn ved hover</div>{' '}\n<div><strong><code>article-opinion-body-s</code></strong></div>\n <div><code>article</code></div>\n <div><code>opinion</code></div>\n <div>-</div>\n <div>-</div>\n <div>-</div>\n <div><code>body-s</code></div>\n <div>Brødtekst for opinion artikler i liten størrelse for mindre skjermer</div>\n</div>\n",
5
5
  "themes": "import { Meta, Canvas, Source } from '@storybook/addon-docs/blocks';\nimport { BrickStyle } from './brickStyle.js';\n\n<Meta title=\"Brick Tokens/Documentation/Themes\" />\n\n<brick-style></brick-style>\n\n## Themes\n\nStyles are themeable using CSS Custom Properties.\n\nBrick ships currently 5 pre-built themes:\n\n- [Alfa](https://assets.acdn.no/pkg/@amedia/brick-tokens/5.7.2/css/theme-alfa.css)\n- [Bravo](https://assets.acdn.no/pkg/@amedia/brick-tokens/5.7.2/css/theme-bravo.css)\n- [Charlie](https://assets.acdn.no/pkg/@amedia/brick-tokens/5.7.2/css/theme-charlie.css)\n- [Nettavisen](https://assets.acdn.no/pkg/@amedia/brick-tokens/5.7.2/css/theme-nettavisen.css)\n- [Alt](https://assets.acdn.no/pkg/@amedia/brick-tokens/5.7.2/css/theme-alt.css)\n\nThemes are collections of design tokens, and the CSS Properties are scoped to a theme class. The design tokens **names** are the same across themes, but the value is unique for each theme.\n\nThis very page is using brick-tokens, and the theme Alfa!\n\n#### Example:\n\n<Source\n language=\"css\"\n dark=\"true\"\n code={`\n//Example\n.themeAlfa {\n --brick-colors-accesibilityFocusOutline:rgb(49, 111, 209);\n --brick-colors-baseBg:rgb(229, 229, 229);\n --brick-colors-baseDivider:rgb(89, 89, 89);\n --brick-colors-baseFg:rgb(41, 40, 39);\n }\n.themeOther {\n --brick-colors-accesibilityFocusOutline:hotpink;\n --brick-colors-baseBg:red;\n --brick-colors-baseDivider:black;\n --brick-colors-baseFg:purple;\n }\n `}\n/>\n\n### Usage\n\nUsing Brick’s themes is pretty straightforward.\n\nTo get started, add one of the following link tags to the `<head>` of your application:\n\n```\n<!-- Alfa theme -->\n<link rel=\"stylesheet\" href=\"https://assets.acdn.no/pkg/@amedia/brick-tokens/5.7.2/css/theme-alfa.css\" crossorigin=\"anonymous\" />\n<!-- Bravo theme -->\n<link rel=\"stylesheet\" href=\"https://assets.acdn.no/pkg/@amedia/brick-tokens/5.7.2/css/theme-bravo.css\" crossorigin=\"anonymous\" />\n<!-- Charlie theme -->\n<link rel=\"stylesheet\" href=\"https://assets.acdn.no/pkg/@amedia/brick-tokens/5.7.2/css/theme-charlie.css\" crossorigin=\"anonymous\" />\n<!-- Nettavisen theme -->\n<link rel=\"stylesheet\" href=\"https://assets.acdn.no/pkg/@amedia/brick-tokens/5.7.2/css/theme-nettavisen.css\" crossorigin=\"anonymous\" />\n<!-- ALT theme -->\n<link rel=\"stylesheet\" href=\"https://assets.acdn.no/pkg/@amedia/brick-tokens/5.7.2/css/theme-alt.css\" crossorigin=\"anonymous\" />\n```\n\n### How does it work?\n\nWhen the theme css file is loaded, you need to set the theme classname on a container, i.e the _body_ tag, since the theme is scoped to a classname.\n\nIt enables the use of multiple themes on the same page, even if there is one main theme for one page.\n\n<iframe\n height=\"300\"\n style={{ width: '100%' }}\n scrolling=\"no\"\n title=\"Untitled\"\n src=\"https://codepen.io/renatewr/embed/preview/MWRemoj?default-tab=html%2Cresult&editable=true\"\n loading=\"lazy\"\n allowtransparency=\"true\"\n allowFullScreen={true}\n>\n See the Pen <a href=\"https://codepen.io/renatewr/pen/MWRemoj\">Untitled</a> by\n Renate Winther Ravnaas (<a href=\"https://codepen.io/renatewr\">@renatewr</a>)\n on <a href=\"https://codepen.io\">CodePen</a>.\n</iframe>\n\n#### How to set correct theme classname?\n\n[brick-classnames](https://github.com/amedia/brick/tree/master/packages/brick-classnames) is a utility module to create CSS-safe strings from design names.\n\n### iOS\n\nFor use in iOS, the correct theme file can be loaded from `https://assets.acdn.no/pkg/@amedia/brick-tokens` for colors,spacing and radii.\nMore details at the [Formats page](?path=/docs/brick-tokens-documentation-formats--documentation#ios)\n",
6
6
  "usage": "import { Meta, Canvas, Source } from '@storybook/addon-docs/blocks';\nimport { BrickStyle } from './brickStyle.js';\n\n<Meta title=\"Brick Tokens/Documentation/Usage\" />\n<brick-style></brick-style>\n\n# Usage\n\nUsage may differ between technoloies. The examples below are focusing on web.\n\n#### Existing Brick Components\n\nWhenever possible, leverage or enhance existing brick components within your web app.\n\n#### Use Design Tokens for styling\n\nStyling with this approach facilitates the automatic adaptation of variable values based on the theme.\n\nRead more about the different [formats](?path=/docs/brick-tokens-documentation-formats--documentation), the tokens available at the [tokens pages](?path=/story/brick-tokens-tokens--space), and how to use [themes](?path=/docs/brick-tokens-documentation-themes--documentation).\n\n<div class=\"note\">\n\n#### Need help?\n\nIn a perfect scenario, it is clear wich token names to use.\nIf you find yourself wondering what token to use, reach out at the [#designsystem](https://app.slack.com/client/T02568FUD/C01PVHPQMRN) channel, or at [GitHub discussion](https://github.com/amedia/brick/discussions/new?category=brick-tokens).\nYou'll likely encounter things that don't seem right, or are missing. Please share your experiences, or ideas.\n\n</div>\n\n#### Usage and implementation\n\n- The consuming page of your web app should load the appropriate theme file and apply the corresponding theme class to the container (e.g., the body tag).\n- It is important to note that the variables are scoped to the theme class, ensuring encapsulation and consistency within the designated theme.\n\nThe CSS variables are prefixed with `--brick`, and then the category, i.ei `-colors-`, before the name, i.e. `utilityPrimaryBg`.\n\n#### Example of css variables for theme Alfa:\n\n<Source\n language=\"html\"\n dark=\"true\"\n code={`\n https://assets.acdn.no/pkg/@amedia/brick-tokens/5.7.2/css/theme-alfa.css\n `}\n/>\n\nAn example use case could be that you wish to use spacing tokens to add some spacing:\n\n<Source\n language=\"css\"\n dark=\"true\"\n code={`\n .my-awesome-selector {\n padding: var(--brick-space-x1)\n }\n `}\n/>\n\nAnother use case could be that you need to apply color to an element:\n\n<Source\n language=\"html\"\n dark=\"true\"\n code={`<html>\n <head><link rel=\"stylesheet\" href=\"https://assets.acdn.no/pkg/@amedia/brick-tokens/5.7.2/css/theme-alfa.css\" /></head>\n <style>\n .my-awesome-selector {\n color: var(--brick-colors-baseFg);\n }\n </style>\n\n <body class=\"themeAlfa\">\n <div class=\"my-awesome-selector\">\n The color will be the value of the theme Alfa css variable named '--brick-colors-baseFg'\n </div>\n </body>\n</html>\n\n`}\n/>\n\n<iframe\n height=\"300\"\n style={{ width: '100%' }}\n scrolling=\"no\"\n title=\"Brick theming\"\n src=\"https://codepen.io/renatewr/embed/preview/MWRemoj?default-tab=css%2Cresult&editable=true\"\n loading=\"lazy\"\n allowtransparency=\"true\"\n allowFullScreen={true}\n>\n See the Pen{' '}\n <a href=\"https://codepen.io/renatewr/pen/MWRemoj\">Brick Theming</a> by Renate\n Winther Ravnaas (<a href=\"https://codepen.io/renatewr\">@renatewr</a>) on{' '}\n <a href=\"https://codepen.io\">CodePen</a>.\n</iframe>\n\n### iOS\n\nOn build time, the correct theme file for the specific token category can be loaded.\n\n- Swift files with radii and spacing tokens\n `https://assets.acdn.no/pkg/@amedia/brick-tokens/5.7.2/theme/alfa/ios/Radius.swift`\n `https://assets.acdn.no/pkg/@amedia/brick-tokens/5.7.2/theme/alfa/ios/Spacing.swift`\n\n- JSON files with colors:\n `https://assets.acdn.no/pkg/@amedia/brick-tokens/5.7.2/theme/bravo/ios/colors.json`\n\nhttps://github.com/amedia/brick/tree/master/packages/brick-tokens/build/style-dictionary/alfa/ios\n\n### Javascript/typescript\n\nEx:\n\nhttps://assets.acdn.no/pkg/@amedia/brick-tokens/5.7.2/theme/bravo/web/borderWidths.ts\n\n### CSS-in-JS\n\nbrick-tokens also exports `{css}` for using CSS-in-JS\n\nAt **the time of writing**, brick is using CSS-in-JS with Stitches under the hood.\nThis way you can style your custom components with the confidence that your styles should never clash.\nThere are pros and cons using CSS-in-JS and vanilla CSS, but that is out of scope of this documentation page.\n\n```css-in-js\nconst buttonCss = css({\n background-color: '$buttonPrimaryBackground';\n borderWidth: '1px', //token missing, talk to your designer\n borderStyle: 'solid',\n borderColor: '$buttonPrimaryBorder',\n ..\n '&:hover': {\n backgroundColor: '$buttonPrimaryBackgroundHover',\n color: '$buttonPrimaryTextHover',\n borderColor: '$buttonPrimaryBorderHover',\n },\n variants: {\n version: {\n secondary: {\n backgroundColor: '$buttonSecondaryBackground',\n '&:hover': {\n backgroundColor: '$buttonSecondaryBackgroundHover',\n },\n }\n },\n size: {\n large: {\n fontSize: 'clamp($mainButtonS, 0.4vw + 1rem, $mainButtonL)',\n }\n }\n\n }\n defaultVariants: {\n version: 'secondary',\n size: 'large'\n },\n compoundVariants: [\n {\n variant: 'secondary',\n size: 'small',\n css: {\n backgroundColor: '$someOtherToken',\n },\n },\n ],\n});\n})\n\n\n```\n\n#### Apply the css classname\n\n```css-in-js\n<div class=\"${getThemeByDesign('bravo')}\"> //main container\n...\n<button class=\"${buttonStyle({variant: 'primary'})}\">Primary</button>\n<button class=\"${buttonStyle({variant: 'secondary', outlined: true, size: 'large'})}\">Secondary Outlined</button>\n...\n</div>\n```\n\n#### Utils/shorthands\n\nUtils are like custom CSS properties, but allows us to group certain multiple CSS properties, or make shorthands.\nThe util takes one argument - the designtoken you normally would use on all the properties, excluding the '$' prefix.\n\nExample of the `fontstyle` util:\n\n```js\nconst myElementClass = css({\n fontstyle: 'titleXl',\n});\n```\n\nResult:\n\n```js\nconst myElementClass = css({\n fontFamily: `$titleXl`,\n fontSize: `$titleXl`,\n fontWeight: `$titleXl`,\n lineHeight: `$titleXl`,\n letterSpacing: `$titleXl`,\n }),\n\n```\n\n#### Utility classes\n\n`brick-tokens` have a few utility classes that can be used in any app or component that uses brick-tokens.\nThe purpose of these classes is to have easily accessible, reusable, and consistent naming for styling that would otherwise get repeated in multiple places.\n\nSome of these you can find in the `utility` object in **stitches.ts** and can be used directly through the [css](https://stitches.dev/docs/api#css) method.\nOthers are exported outside this object and needs to be imported alongside css, for example like this: \n`import {css, sroStyle} from '@amedia/brick-tokens'`\n\nAnd you would use it like this: \n`<div class\"${sroStyle()}\"></div> `\n"
7
- }
7
+ }