@compilorama/compy 0.5.0 → 0.6.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/CHANGELOG.md +15 -0
- package/dist/cjs/components/banner/banner.css +1 -0
- package/dist/cjs/components/banner/banner.js +1 -0
- package/dist/cjs/components/banner/banner.md +38 -0
- package/dist/cjs/components/banner/tokens.md +56 -0
- package/dist/cjs/components/icon/icon.css +1 -0
- package/dist/cjs/components/icon/icon.js +1 -0
- package/dist/cjs/components/icon/icon.md +39 -0
- package/dist/cjs/components/icon/tokens.md +13 -0
- package/dist/cjs/docs/components.md +3 -0
- package/dist/cjs/docs/tokens.md +39 -0
- package/dist/cjs/icons/close/icon-close.js +1 -0
- package/dist/cjs/icons/close/icon-close.md +24 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/vars.css +1 -1
- package/dist/docs/components.md +3 -0
- package/dist/docs/tokens.md +39 -0
- package/dist/es6/components/banner/banner.css +1 -0
- package/dist/es6/components/banner/banner.js +1 -0
- package/dist/es6/components/banner/banner.md +38 -0
- package/dist/es6/components/banner/tokens.md +56 -0
- package/dist/es6/components/icon/icon.css +1 -0
- package/dist/es6/components/icon/icon.js +1 -0
- package/dist/es6/components/icon/icon.md +39 -0
- package/dist/es6/components/icon/tokens.md +13 -0
- package/dist/es6/docs/components.md +3 -0
- package/dist/es6/docs/tokens.md +39 -0
- package/dist/es6/icons/close/icon-close.js +1 -0
- package/dist/es6/icons/close/icon-close.md +24 -0
- package/dist/es6/index.js +1 -1
- package/dist/es6/vars.css +1 -1
- package/dist/index.d.ts +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# [0.6.0](https://github.com/compilorama/compy/compare/v0.5.0...v0.6.0) (2026-11-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **banner:** move close icon stroke width to the banner stylesheet ([6d83ad8](https://github.com/compilorama/compy/commit/6d83ad885c48ef50cae4bacb74860d6c236d1c12))
|
|
7
|
+
* **banner:** set close icon stroke width through the strokeWidth prop ([86e5b45](https://github.com/compilorama/compy/commit/86e5b4555e8dc557e9ceea8e6f483f3cc745fd09))
|
|
8
|
+
* **icon:** set default stroke width to 1px ([a606c3f](https://github.com/compilorama/compy/commit/a606c3f483c1d342f84bf4ee40c5b4eb51ba382c))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **banner:** add Banner component and color scales ([db5f324](https://github.com/compilorama/compy/commit/db5f3240383d338bb15339216afc6219196763e8))
|
|
14
|
+
* **icon:** add Icon component and IconClose ([ef3f1be](https://github.com/compilorama/compy/commit/ef3f1be92848e056be3af0fb0bc403d7fde9667a))
|
|
15
|
+
|
|
1
16
|
# [0.5.0](https://github.com/compilorama/compy/compare/v0.4.0...v0.5.0) (2026-11-22)
|
|
2
17
|
|
|
3
18
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.c-banner{--c-banner-background: var(--c-color-blue-95);--c-banner-content: var(--c-color-blue-50);--c-banner-close-icon: var(--c-color-blue-60);--c-banner-close-background-hover: var(--c-color-blue-90);--c-banner-radius: 15px;--c-banner-close-radius: 10px;--c-banner-close-size: 30px;display:block;position:relative;padding:10px 15px;min-height:40px;background:var(--c-banner-background);color:var(--c-banner-content);font-family:var(--c-font-family-primary);font-size:var(--c-font-size-sm);font-weight:400;line-height:20px;border-radius:var(--c-banner-radius);box-sizing:border-box}.c-banner.is-dismissable{padding-right:45px}.c-banner.is-warning{--c-banner-background: var(--c-color-orange-95);--c-banner-content: var(--c-color-orange-50);--c-banner-close-icon: var(--c-color-orange-50);--c-banner-close-background-hover: var(--c-color-orange-90)}.c-banner.is-success{--c-banner-background: var(--c-color-green-95);--c-banner-content: var(--c-color-green-30);--c-banner-close-icon: var(--c-color-green-30);--c-banner-close-background-hover: var(--c-color-green-85)}.c-banner.is-error{--c-banner-background: var(--c-color-red-95);--c-banner-content: var(--c-color-red-60);--c-banner-close-icon: var(--c-color-red-60);--c-banner-close-background-hover: var(--c-color-red-90)}.c-banner button.c-button.is-isometric{--c-button-width: var(--c-banner-close-size);--c-button-height: var(--c-banner-close-size);--c-button-radius: var(--c-banner-close-radius);--c-button-background: transparent;--c-button-background-hover: var(--c-banner-close-background-hover);--c-button-border-color: transparent;--c-button-box-shadow-color: transparent;position:absolute;top:5px;right:5px}.c-banner button.c-button.is-isometric:focus-visible{background:var(--c-banner-close-background-hover)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=require("react"),_button=_interopRequireDefault(require("../button/button.jsx")),_iconClose=_interopRequireDefault(require("../../icons/close/icon-close.jsx"));require("./banner.css");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const Banner=({theme:e,dismissable:r,closeButtonLabel:t,className:s,children:n,...o})=>{const[i,u]=(0,_react.useState)(!0),l=buildBannerClasses({theme:e,dismissable:r,className:s}),a=()=>u(!1);return i?(0,_jsxRuntime.jsxs)("div",{className:l,...o,children:[n,r&&renderCloseButton({closeButtonLabel:t,onClick:a})]}):null};function buildBannerClasses({theme:e,dismissable:r,className:t}){return["c-banner",e&&`is-${e}`,r&&"is-dismissable",t].filter(Boolean).join(" ")}function renderCloseButton({closeButtonLabel:e="Close",onClick:r}){return(0,_jsxRuntime.jsx)(_button.default,{type:"button","aria-label":e,onClick:r,isometric:!0,children:(0,_jsxRuntime.jsx)(_iconClose.default,{size:"20px",strokeWidth:4,strokeColor:"var(--c-banner-close-icon)"})})}var _default=exports.default=Banner;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Banner
|
|
3
|
+
description: A colored message box with four themes and an optional dismiss button.
|
|
4
|
+
purpose: Show tips and feedback messages with consistent styling, and let users dismiss them.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Banner
|
|
8
|
+
|
|
9
|
+
A block-level message box with rounded corners. The `children` are rendered inside it, so rich content such as links, buttons, and formatted text is accepted. Without a `theme`, the banner uses the default blue theme.
|
|
10
|
+
|
|
11
|
+
With `dismissable`, a dismiss button (an isometric `Button` with an `IconClose`) is rendered in the top-right corner, and the content never overlaps it. Clicking the button removes the banner from the DOM by itself: the banner is autonomous and has no dismiss callback, and the dismissed state is not persisted.
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
The Banner API extends the native HTML `div` attributes, which are forwarded to the container.
|
|
16
|
+
|
|
17
|
+
<!-- BEGIN GENERATED PROPS -->
|
|
18
|
+
_Also inherits all props from `HTMLAttributes<HTMLDivElement>`._
|
|
19
|
+
|
|
20
|
+
| Name | Type | Required | Default | Description |
|
|
21
|
+
| --- | --- | --- | --- | --- |
|
|
22
|
+
| children | `ReactNode` | No | `undefined` | Banner content. Accepts any React node, such as links, buttons, and formatted text. |
|
|
23
|
+
| closeButtonLabel | `string` | No | `"Close"` | Accessible name (`aria-label`) of the dismiss button. |
|
|
24
|
+
| dismissable | `boolean` | No | `false` | Renders a dismiss button in the top-right corner. Clicking it removes the banner from the DOM. |
|
|
25
|
+
| theme | `"success" \| "warning" \| "error"` | No | `undefined` | Color theme of the banner. When omitted, the default blue theme is used. |
|
|
26
|
+
<!-- END GENERATED PROPS -->
|
|
27
|
+
|
|
28
|
+
## When to use
|
|
29
|
+
|
|
30
|
+
- Showing tips, warnings, success feedback, or error messages inside the page flow
|
|
31
|
+
- Messages that the user may want to dismiss
|
|
32
|
+
- Messages with rich content, such as links or buttons
|
|
33
|
+
|
|
34
|
+
## When NOT to use
|
|
35
|
+
|
|
36
|
+
- **Blocking confirmations** — use a dialog or modal when the user must decide before continuing.
|
|
37
|
+
- **Field-level validation** — use the error message of `FormControl` next to the field.
|
|
38
|
+
- **Transient notifications** — a banner stays in the page until dismissed, so do not use it for toasts that disappear on their own.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Banner tokens
|
|
2
|
+
|
|
3
|
+
Generated from `src/components/banner/banner.css`.
|
|
4
|
+
|
|
5
|
+
## Base tokens
|
|
6
|
+
|
|
7
|
+
| Token | Declared value | Resolution |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| `--c-banner-background` | `var(--c-color-blue-95)` | `var(--c-color-blue-95) → hsl(220 100% 95%)` |
|
|
10
|
+
| `--c-banner-close-background-hover` | `var(--c-color-blue-90)` | `var(--c-color-blue-90) → hsl(220 100% 90%)` |
|
|
11
|
+
| `--c-banner-close-icon` | `var(--c-color-blue-60)` | `var(--c-color-blue-60) → hsl(220 100% 60%)` |
|
|
12
|
+
| `--c-banner-close-radius` | `10px` | `10px` |
|
|
13
|
+
| `--c-banner-close-size` | `30px` | `30px` |
|
|
14
|
+
| `--c-banner-content` | `var(--c-color-blue-50)` | `var(--c-color-blue-50) → hsl(220 100% 50%)` |
|
|
15
|
+
| `--c-banner-radius` | `15px` | `15px` |
|
|
16
|
+
|
|
17
|
+
## Modifier overrides
|
|
18
|
+
|
|
19
|
+
### `.c-banner.is-warning`
|
|
20
|
+
|
|
21
|
+
| Token | Declared value | Resolution |
|
|
22
|
+
| --- | --- | --- |
|
|
23
|
+
| `--c-banner-background` | `var(--c-color-orange-95)` | `var(--c-color-orange-95) → hsl(30 100% 95%)` |
|
|
24
|
+
| `--c-banner-close-background-hover` | `var(--c-color-orange-90)` | `var(--c-color-orange-90) → hsl(30 100% 90%)` |
|
|
25
|
+
| `--c-banner-close-icon` | `var(--c-color-orange-50)` | `var(--c-color-orange-50) → hsl(30 100% 50%)` |
|
|
26
|
+
| `--c-banner-content` | `var(--c-color-orange-50)` | `var(--c-color-orange-50) → hsl(30 100% 50%)` |
|
|
27
|
+
|
|
28
|
+
### `.c-banner.is-success`
|
|
29
|
+
|
|
30
|
+
| Token | Declared value | Resolution |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| `--c-banner-background` | `var(--c-color-green-95)` | `var(--c-color-green-95) → hsl(145 100% 95%)` |
|
|
33
|
+
| `--c-banner-close-background-hover` | `var(--c-color-green-85)` | `var(--c-color-green-85) → hsl(145 100% 85%)` |
|
|
34
|
+
| `--c-banner-close-icon` | `var(--c-color-green-30)` | `var(--c-color-green-30) → hsl(145 100% 30%)` |
|
|
35
|
+
| `--c-banner-content` | `var(--c-color-green-30)` | `var(--c-color-green-30) → hsl(145 100% 30%)` |
|
|
36
|
+
|
|
37
|
+
### `.c-banner.is-error`
|
|
38
|
+
|
|
39
|
+
| Token | Declared value | Resolution |
|
|
40
|
+
| --- | --- | --- |
|
|
41
|
+
| `--c-banner-background` | `var(--c-color-red-95)` | `var(--c-color-red-95) → hsl(0 100% 95%)` |
|
|
42
|
+
| `--c-banner-close-background-hover` | `var(--c-color-red-90)` | `var(--c-color-red-90) → hsl(0 100% 90%)` |
|
|
43
|
+
| `--c-banner-close-icon` | `var(--c-color-red-60)` | `var(--c-color-red-60) → hsl(0 100% 60%)` |
|
|
44
|
+
| `--c-banner-content` | `var(--c-color-red-60)` | `var(--c-color-red-60) → hsl(0 100% 60%)` |
|
|
45
|
+
|
|
46
|
+
### `.c-banner button.c-button.is-isometric`
|
|
47
|
+
|
|
48
|
+
| Token | Declared value | Resolution |
|
|
49
|
+
| --- | --- | --- |
|
|
50
|
+
| `--c-button-background` | `transparent` | `transparent` |
|
|
51
|
+
| `--c-button-background-hover` | `var(--c-banner-close-background-hover)` | `var(--c-banner-close-background-hover) → var(--c-color-blue-90) → hsl(220 100% 90%)` |
|
|
52
|
+
| `--c-button-border-color` | `transparent` | `transparent` |
|
|
53
|
+
| `--c-button-box-shadow-color` | `transparent` | `transparent` |
|
|
54
|
+
| `--c-button-height` | `var(--c-banner-close-size)` | `var(--c-banner-close-size) → 30px` |
|
|
55
|
+
| `--c-button-radius` | `var(--c-banner-close-radius)` | `var(--c-banner-close-radius) → 10px` |
|
|
56
|
+
| `--c-button-width` | `var(--c-banner-close-size)` | `var(--c-banner-close-size) → 30px` |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.c-icon{--c-icon-stroke-color: var(--c-color-gray-10);--c-icon-stroke-width: 1px;--c-icon-shape-color: var(--c-color-gray-10);--c-icon-width: 40px;--c-icon-height: 40px;display:inline-flex;width:var(--c-icon-width);height:var(--c-icon-height)}.c-icon svg{width:100%;height:100%}.c-icon [data-stroke]{fill:none;stroke:var(--c-icon-stroke-color);stroke-width:var(--c-icon-stroke-width);stroke-linecap:round;stroke-linejoin:round}.c-icon [data-shape]{fill:var(--c-icon-shape-color)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,require("./icon.css");var _jsxRuntime=require("react/jsx-runtime");const Icon=({name:r,strokeColor:i,strokeWidth:t,size:e,style:o,className:c,children:s,...n})=>{const u=["c-icon",`c-icon-${r}`,c].filter(Boolean).join(" "),d=buildCustomProperties({strokeColor:i,strokeWidth:t,size:e});return(0,_jsxRuntime.jsx)("div",{className:u,style:{...d,...o},"aria-hidden":"true",...n,children:(0,_jsxRuntime.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 40",children:s})})};function buildCustomProperties({strokeColor:r,strokeWidth:i,size:t}){return Object.entries({"--c-icon-stroke-color":r,"--c-icon-stroke-width":i,"--c-icon-width":t,"--c-icon-height":t}).filter(([,e])=>e!==void 0).reduce((e,[o,c])=>({...e,[o]:c}),{})}var _default=exports.default=Icon;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Icon
|
|
3
|
+
description: A base container that renders inline SVG shapes in a 40×40 viewBox, themeable through design tokens.
|
|
4
|
+
purpose: Build icon components with a consistent size, stroke, and color strategy.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Icon
|
|
8
|
+
|
|
9
|
+
The base of every icon in the library. It renders a decorative container (`aria-hidden="true"`) with an inline `<svg>` that uses a `0 0 40 40` viewBox, and the `children` are the SVG shapes. Icons ready to use live in `src/icons/` (for example `IconClose`) and are built on top of `Icon`.
|
|
10
|
+
|
|
11
|
+
Shapes must not carry presentational attributes. Mark outlines with `data-stroke` (no fill, round line caps and joins) and filled shapes with `data-shape`. The default color of both is `--c-color-gray-10`: it is never inherited from the parent. Only `strokeColor` (or the `--c-icon-stroke-color` custom property) changes the stroke color. The default stroke width is 1px and the default size is 40px.
|
|
12
|
+
|
|
13
|
+
`strokeColor`, `strokeWidth`, and `size` are applied as `--c-icon-*` custom properties on the container, only when given. Values passed in `style` take precedence over them.
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
The Icon API extends the native HTML `div` attributes, which are forwarded to the container.
|
|
18
|
+
|
|
19
|
+
<!-- BEGIN GENERATED PROPS -->
|
|
20
|
+
_Also inherits all props from `HTMLAttributes<HTMLDivElement>`._
|
|
21
|
+
|
|
22
|
+
| Name | Type | Required | Default | Description |
|
|
23
|
+
| --- | --- | --- | --- | --- |
|
|
24
|
+
| children | `ReactNode` | No | `undefined` | SVG shapes drawn inside the 40×40 viewBox. Use `data-stroke` for outlines and `data-shape` for filled shapes. |
|
|
25
|
+
| name | `string` | Yes | | Name of the icon. Builds the `c-icon-<name>` css class of the container. |
|
|
26
|
+
| size | `string` | No | `undefined` | Width and height of the icon (for example `20px`), applied as `--c-icon-width` and `--c-icon-height`. |
|
|
27
|
+
| strokeColor | `string` | No | `undefined` | Stroke color of the outlines, applied as `--c-icon-stroke-color`. |
|
|
28
|
+
| strokeWidth | `string \| number` | No | `undefined` | Stroke width of the outlines in viewBox units, applied as `--c-icon-stroke-width`. |
|
|
29
|
+
<!-- END GENERATED PROPS -->
|
|
30
|
+
|
|
31
|
+
## When to use
|
|
32
|
+
|
|
33
|
+
- Building a new icon component for `src/icons/`
|
|
34
|
+
- Rendering a one-off SVG that must follow the library's stroke, shape, and size tokens
|
|
35
|
+
|
|
36
|
+
## When NOT to use
|
|
37
|
+
|
|
38
|
+
- **Existing icons** — import the ready-made icon component (for example `IconClose`) instead of drawing its shapes again.
|
|
39
|
+
- **Images and illustrations** — use an `<img>` or an inline SVG for artwork that is not an icon.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Icon tokens
|
|
2
|
+
|
|
3
|
+
Generated from `src/components/icon/icon.css`.
|
|
4
|
+
|
|
5
|
+
## Base tokens
|
|
6
|
+
|
|
7
|
+
| Token | Declared value | Resolution |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| `--c-icon-height` | `40px` | `40px` |
|
|
10
|
+
| `--c-icon-shape-color` | `var(--c-color-gray-10)` | `var(--c-color-gray-10) → hsl(0 0% 10%)` |
|
|
11
|
+
| `--c-icon-stroke-color` | `var(--c-color-gray-10)` | `var(--c-color-gray-10) → hsl(0 0% 10%)` |
|
|
12
|
+
| `--c-icon-stroke-width` | `1px` | `1px` |
|
|
13
|
+
| `--c-icon-width` | `40px` | `40px` |
|
|
@@ -4,9 +4,12 @@ Generated from component frontmatter. Human usage sections live in each componen
|
|
|
4
4
|
|
|
5
5
|
| Component | Description | Purpose | Doc path |
|
|
6
6
|
| --- | --- | --- | --- |
|
|
7
|
+
| Banner | A colored message box with four themes and an optional dismiss button. | Show tips and feedback messages with consistent styling, and let users dismiss them. | [`../components/banner/banner.md`](../components/banner/banner.md) |
|
|
7
8
|
| Button | A native button element with variant styles driven by design tokens. | Trigger actions and submit forms with consistent visual variants. | [`../components/button/button.md`](../components/button/button.md) |
|
|
8
9
|
| Checkbox | A native checkbox input with the library look and an optional built-in label. | Let the user turn an option on or off, or pick several options from a list. | [`../components/checkbox/checkbox.md`](../components/checkbox/checkbox.md) |
|
|
9
10
|
| FormControl | A wrapper that places a label above a form field and an optional error message below it. | Compose a label, a field, and an error message with consistent spacing, so consumers do not do it by hand. | [`../components/form-control/form-control.md`](../components/form-control/form-control.md) |
|
|
11
|
+
| Icon | A base container that renders inline SVG shapes in a 40×40 viewBox, themeable through design tokens. | Build icon components with a consistent size, stroke, and color strategy. | [`../components/icon/icon.md`](../components/icon/icon.md) |
|
|
12
|
+
| IconClose | A close icon made of two crossing lines, built on top of Icon. | Represent closing, dismissing, or removing something. | [`../icons/close/icon-close.md`](../icons/close/icon-close.md) |
|
|
10
13
|
| Input | A single-line text field that extends the native HTML input element. | Collect short text values in forms with consistent field styling and error indication. | [`../components/input/input.md`](../components/input/input.md) |
|
|
11
14
|
| Label | A text label that extends the native HTML label element. | Name a form control with consistent label typography, on its own or next to any control. | [`../components/label/label.md`](../components/label/label.md) |
|
|
12
15
|
| Radio | A native radio input with the library look and an optional built-in label. | Let the user pick exactly one option from a small group of mutually exclusive options. | [`../components/radio/radio.md`](../components/radio/radio.md) |
|
package/dist/cjs/docs/tokens.md
CHANGED
|
@@ -17,6 +17,19 @@ Generated from `src/vars.css`. Values show the declared token and the resolved r
|
|
|
17
17
|
| `--c-color-accented-85` | `var(--c-color-gray-85)` | `var(--c-color-gray-85) → hsl(0 0% 85%)` |
|
|
18
18
|
| `--c-color-accented-90` | `var(--c-color-gray-90)` | `var(--c-color-gray-90) → hsl(0 0% 90%)` |
|
|
19
19
|
| `--c-color-accented-95` | `var(--c-color-gray-95)` | `var(--c-color-gray-95) → hsl(0 0% 95%)` |
|
|
20
|
+
| `--c-color-blue-10` | `hsl(220 100% 10%)` | `hsl(220 100% 10%)` |
|
|
21
|
+
| `--c-color-blue-15` | `hsl(220 100% 15%)` | `hsl(220 100% 15%)` |
|
|
22
|
+
| `--c-color-blue-20` | `hsl(220 100% 20%)` | `hsl(220 100% 20%)` |
|
|
23
|
+
| `--c-color-blue-30` | `hsl(220 100% 30%)` | `hsl(220 100% 30%)` |
|
|
24
|
+
| `--c-color-blue-40` | `hsl(220 100% 40%)` | `hsl(220 100% 40%)` |
|
|
25
|
+
| `--c-color-blue-5` | `hsl(220 100% 5%)` | `hsl(220 100% 5%)` |
|
|
26
|
+
| `--c-color-blue-50` | `hsl(220 100% 50%)` | `hsl(220 100% 50%)` |
|
|
27
|
+
| `--c-color-blue-60` | `hsl(220 100% 60%)` | `hsl(220 100% 60%)` |
|
|
28
|
+
| `--c-color-blue-70` | `hsl(220 100% 70%)` | `hsl(220 100% 70%)` |
|
|
29
|
+
| `--c-color-blue-80` | `hsl(220 100% 80%)` | `hsl(220 100% 80%)` |
|
|
30
|
+
| `--c-color-blue-85` | `hsl(220 100% 85%)` | `hsl(220 100% 85%)` |
|
|
31
|
+
| `--c-color-blue-90` | `hsl(220 100% 90%)` | `hsl(220 100% 90%)` |
|
|
32
|
+
| `--c-color-blue-95` | `hsl(220 100% 95%)` | `hsl(220 100% 95%)` |
|
|
20
33
|
| `--c-color-gray-10` | `hsl(0 0% 10%)` | `hsl(0 0% 10%)` |
|
|
21
34
|
| `--c-color-gray-15` | `hsl(0 0% 15%)` | `hsl(0 0% 15%)` |
|
|
22
35
|
| `--c-color-gray-20` | `hsl(0 0% 20%)` | `hsl(0 0% 20%)` |
|
|
@@ -30,6 +43,32 @@ Generated from `src/vars.css`. Values show the declared token and the resolved r
|
|
|
30
43
|
| `--c-color-gray-85` | `hsl(0 0% 85%)` | `hsl(0 0% 85%)` |
|
|
31
44
|
| `--c-color-gray-90` | `hsl(0 0% 90%)` | `hsl(0 0% 90%)` |
|
|
32
45
|
| `--c-color-gray-95` | `hsl(0 0% 95%)` | `hsl(0 0% 95%)` |
|
|
46
|
+
| `--c-color-green-10` | `hsl(145 100% 10%)` | `hsl(145 100% 10%)` |
|
|
47
|
+
| `--c-color-green-15` | `hsl(145 100% 15%)` | `hsl(145 100% 15%)` |
|
|
48
|
+
| `--c-color-green-20` | `hsl(145 100% 20%)` | `hsl(145 100% 20%)` |
|
|
49
|
+
| `--c-color-green-30` | `hsl(145 100% 30%)` | `hsl(145 100% 30%)` |
|
|
50
|
+
| `--c-color-green-40` | `hsl(145 100% 40%)` | `hsl(145 100% 40%)` |
|
|
51
|
+
| `--c-color-green-5` | `hsl(145 100% 5%)` | `hsl(145 100% 5%)` |
|
|
52
|
+
| `--c-color-green-50` | `hsl(145 100% 50%)` | `hsl(145 100% 50%)` |
|
|
53
|
+
| `--c-color-green-60` | `hsl(145 100% 60%)` | `hsl(145 100% 60%)` |
|
|
54
|
+
| `--c-color-green-70` | `hsl(145 100% 70%)` | `hsl(145 100% 70%)` |
|
|
55
|
+
| `--c-color-green-80` | `hsl(145 100% 80%)` | `hsl(145 100% 80%)` |
|
|
56
|
+
| `--c-color-green-85` | `hsl(145 100% 85%)` | `hsl(145 100% 85%)` |
|
|
57
|
+
| `--c-color-green-90` | `hsl(145 100% 90%)` | `hsl(145 100% 90%)` |
|
|
58
|
+
| `--c-color-green-95` | `hsl(145 100% 95%)` | `hsl(145 100% 95%)` |
|
|
59
|
+
| `--c-color-orange-10` | `hsl(30 100% 10%)` | `hsl(30 100% 10%)` |
|
|
60
|
+
| `--c-color-orange-15` | `hsl(30 100% 15%)` | `hsl(30 100% 15%)` |
|
|
61
|
+
| `--c-color-orange-20` | `hsl(30 100% 20%)` | `hsl(30 100% 20%)` |
|
|
62
|
+
| `--c-color-orange-30` | `hsl(30 100% 30%)` | `hsl(30 100% 30%)` |
|
|
63
|
+
| `--c-color-orange-40` | `hsl(30 100% 40%)` | `hsl(30 100% 40%)` |
|
|
64
|
+
| `--c-color-orange-5` | `hsl(30 100% 5%)` | `hsl(30 100% 5%)` |
|
|
65
|
+
| `--c-color-orange-50` | `hsl(30 100% 50%)` | `hsl(30 100% 50%)` |
|
|
66
|
+
| `--c-color-orange-60` | `hsl(30 100% 60%)` | `hsl(30 100% 60%)` |
|
|
67
|
+
| `--c-color-orange-70` | `hsl(30 100% 70%)` | `hsl(30 100% 70%)` |
|
|
68
|
+
| `--c-color-orange-80` | `hsl(30 100% 80%)` | `hsl(30 100% 80%)` |
|
|
69
|
+
| `--c-color-orange-85` | `hsl(30 100% 85%)` | `hsl(30 100% 85%)` |
|
|
70
|
+
| `--c-color-orange-90` | `hsl(30 100% 90%)` | `hsl(30 100% 90%)` |
|
|
71
|
+
| `--c-color-orange-95` | `hsl(30 100% 95%)` | `hsl(30 100% 95%)` |
|
|
33
72
|
| `--c-color-red-10` | `hsl(0 100% 10%)` | `hsl(0 100% 10%)` |
|
|
34
73
|
| `--c-color-red-15` | `hsl(0 100% 15%)` | `hsl(0 100% 15%)` |
|
|
35
74
|
| `--c-color-red-20` | `hsl(0 100% 20%)` | `hsl(0 100% 20%)` |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _icon=_interopRequireDefault(require("../../components/icon/icon.jsx")),_jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const IconClose=e=>(0,_jsxRuntime.jsxs)(_icon.default,{...e,name:"close",children:[(0,_jsxRuntime.jsx)("path",{"data-stroke":!0,d:"M12,28L28,12"}),(0,_jsxRuntime.jsx)("path",{"data-stroke":!0,d:"M28,28L12,12"})]});var _default=exports.default=IconClose;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: IconClose
|
|
3
|
+
description: A close icon made of two crossing lines, built on top of Icon.
|
|
4
|
+
purpose: Represent closing, dismissing, or removing something.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# IconClose
|
|
8
|
+
|
|
9
|
+
Two crossing lines drawn through [`Icon`](../../components/icon/icon.md), with the class `c-icon-close`. It accepts and forwards every `Icon` prop (`size`, `strokeColor`, `strokeWidth`, `className`, etc.), except `name` and `children`, which are fixed.
|
|
10
|
+
|
|
11
|
+
## Props
|
|
12
|
+
|
|
13
|
+
<!-- BEGIN GENERATED PROPS -->
|
|
14
|
+
_Also inherits all props from `Omit<IconProps, 'name' | 'children'>`._
|
|
15
|
+
<!-- END GENERATED PROPS -->
|
|
16
|
+
|
|
17
|
+
## When to use
|
|
18
|
+
|
|
19
|
+
- Dismiss or close buttons (for example inside an isometric `Button`)
|
|
20
|
+
- Removing an item from a list
|
|
21
|
+
|
|
22
|
+
## When NOT to use
|
|
23
|
+
|
|
24
|
+
- **Text-only actions** — use a `Button` with a text label when the action needs words to be clear.
|
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Button",{enumerable:!0,get:function(){return _button.default}}),Object.defineProperty(exports,"Checkbox",{enumerable:!0,get:function(){return _checkbox.default}}),Object.defineProperty(exports,"FormControl",{enumerable:!0,get:function(){return _formControl.default}}),Object.defineProperty(exports,"Input",{enumerable:!0,get:function(){return _input.default}}),Object.defineProperty(exports,"Label",{enumerable:!0,get:function(){return _label.default}}),Object.defineProperty(exports,"Radio",{enumerable:!0,get:function(){return _radio.default}}),Object.defineProperty(exports,"Select",{enumerable:!0,get:function(){return _select.default}}),Object.defineProperty(exports,"Textarea",{enumerable:!0,get:function(){return _textarea.default}}),require("./index.css");var _button=_interopRequireDefault(require("./components/button/button.jsx")),_checkbox=_interopRequireDefault(require("./components/checkbox/checkbox.jsx")),_formControl=_interopRequireDefault(require("./components/form-control/form-control.jsx")),_input=_interopRequireDefault(require("./components/input/input.jsx")),_label=_interopRequireDefault(require("./components/label/label.jsx")),_radio=_interopRequireDefault(require("./components/radio/radio.jsx")),_select=_interopRequireDefault(require("./components/select/select.jsx")),_textarea=_interopRequireDefault(require("./components/textarea/textarea.jsx"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Banner",{enumerable:!0,get:function(){return _banner.default}}),Object.defineProperty(exports,"Button",{enumerable:!0,get:function(){return _button.default}}),Object.defineProperty(exports,"Checkbox",{enumerable:!0,get:function(){return _checkbox.default}}),Object.defineProperty(exports,"FormControl",{enumerable:!0,get:function(){return _formControl.default}}),Object.defineProperty(exports,"Icon",{enumerable:!0,get:function(){return _icon.default}}),Object.defineProperty(exports,"IconClose",{enumerable:!0,get:function(){return _iconClose.default}}),Object.defineProperty(exports,"Input",{enumerable:!0,get:function(){return _input.default}}),Object.defineProperty(exports,"Label",{enumerable:!0,get:function(){return _label.default}}),Object.defineProperty(exports,"Radio",{enumerable:!0,get:function(){return _radio.default}}),Object.defineProperty(exports,"Select",{enumerable:!0,get:function(){return _select.default}}),Object.defineProperty(exports,"Textarea",{enumerable:!0,get:function(){return _textarea.default}}),require("./index.css");var _banner=_interopRequireDefault(require("./components/banner/banner.jsx")),_button=_interopRequireDefault(require("./components/button/button.jsx")),_checkbox=_interopRequireDefault(require("./components/checkbox/checkbox.jsx")),_formControl=_interopRequireDefault(require("./components/form-control/form-control.jsx")),_icon=_interopRequireDefault(require("./components/icon/icon.jsx")),_iconClose=_interopRequireDefault(require("./icons/close/icon-close.jsx")),_input=_interopRequireDefault(require("./components/input/input.jsx")),_label=_interopRequireDefault(require("./components/label/label.jsx")),_radio=_interopRequireDefault(require("./components/radio/radio.jsx")),_select=_interopRequireDefault(require("./components/select/select.jsx")),_textarea=_interopRequireDefault(require("./components/textarea/textarea.jsx"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}
|
package/dist/cjs/vars.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--c-font-family-primary: "Inter", sans-serif;--c-font-size-xxxs: .625rem;--c-font-size-xxs: .75rem;--c-font-size-xs: .875rem;--c-font-size-sm: 1rem;--c-font-size-md: 1.125rem;--c-font-size-lg: 1.25rem;--c-font-size-xl: 1.5rem;--c-font-size-xxl: 2.25rem;--c-font-size-xxxl: 3rem;--c-color-gray-95: hsl(0 0% 95%);--c-color-gray-90: hsl(0 0% 90%);--c-color-gray-85: hsl(0 0% 85%);--c-color-gray-80: hsl(0 0% 80%);--c-color-gray-70: hsl(0 0% 70%);--c-color-gray-60: hsl(0 0% 60%);--c-color-gray-50: hsl(0 0% 50%);--c-color-gray-40: hsl(0 0% 40%);--c-color-gray-30: hsl(0 0% 30%);--c-color-gray-20: hsl(0 0% 20%);--c-color-gray-15: hsl(0 0% 15%);--c-color-gray-10: hsl(0 0% 10%);--c-color-gray-5: hsl(0 0% 5%);--c-color-red-95: hsl(0 100% 95%);--c-color-red-90: hsl(0 100% 90%);--c-color-red-85: hsl(0 100% 85%);--c-color-red-80: hsl(0 100% 80%);--c-color-red-70: hsl(0 100% 70%);--c-color-red-60: hsl(0 100% 60%);--c-color-red-50: hsl(0 100% 50%);--c-color-red-40: hsl(0 100% 40%);--c-color-red-30: hsl(0 100% 30%);--c-color-red-20: hsl(0 100% 20%);--c-color-red-15: hsl(0 100% 15%);--c-color-red-10: hsl(0 100% 10%);--c-color-red-5: hsl(0 100% 5%);--c-color-accented-95: var(--c-color-gray-95);--c-color-accented-90: var(--c-color-gray-90);--c-color-accented-85: var(--c-color-gray-85);--c-color-accented-80: var(--c-color-gray-80);--c-color-accented-70: var(--c-color-gray-70);--c-color-accented-60: var(--c-color-gray-60);--c-color-accented-50: var(--c-color-gray-50);--c-color-accented-40: var(--c-color-gray-40);--c-color-accented-30: var(--c-color-gray-30);--c-color-accented-20: var(--c-color-gray-20);--c-color-accented-15: var(--c-color-gray-15);--c-color-accented-10: var(--c-color-gray-10);--c-color-accented-5: var(--c-color-gray-5)}
|
|
1
|
+
:root{--c-font-family-primary: "Inter", sans-serif;--c-font-size-xxxs: .625rem;--c-font-size-xxs: .75rem;--c-font-size-xs: .875rem;--c-font-size-sm: 1rem;--c-font-size-md: 1.125rem;--c-font-size-lg: 1.25rem;--c-font-size-xl: 1.5rem;--c-font-size-xxl: 2.25rem;--c-font-size-xxxl: 3rem;--c-color-gray-95: hsl(0 0% 95%);--c-color-gray-90: hsl(0 0% 90%);--c-color-gray-85: hsl(0 0% 85%);--c-color-gray-80: hsl(0 0% 80%);--c-color-gray-70: hsl(0 0% 70%);--c-color-gray-60: hsl(0 0% 60%);--c-color-gray-50: hsl(0 0% 50%);--c-color-gray-40: hsl(0 0% 40%);--c-color-gray-30: hsl(0 0% 30%);--c-color-gray-20: hsl(0 0% 20%);--c-color-gray-15: hsl(0 0% 15%);--c-color-gray-10: hsl(0 0% 10%);--c-color-gray-5: hsl(0 0% 5%);--c-color-red-95: hsl(0 100% 95%);--c-color-red-90: hsl(0 100% 90%);--c-color-red-85: hsl(0 100% 85%);--c-color-red-80: hsl(0 100% 80%);--c-color-red-70: hsl(0 100% 70%);--c-color-red-60: hsl(0 100% 60%);--c-color-red-50: hsl(0 100% 50%);--c-color-red-40: hsl(0 100% 40%);--c-color-red-30: hsl(0 100% 30%);--c-color-red-20: hsl(0 100% 20%);--c-color-red-15: hsl(0 100% 15%);--c-color-red-10: hsl(0 100% 10%);--c-color-red-5: hsl(0 100% 5%);--c-color-blue-95: hsl(220 100% 95%);--c-color-blue-90: hsl(220 100% 90%);--c-color-blue-85: hsl(220 100% 85%);--c-color-blue-80: hsl(220 100% 80%);--c-color-blue-70: hsl(220 100% 70%);--c-color-blue-60: hsl(220 100% 60%);--c-color-blue-50: hsl(220 100% 50%);--c-color-blue-40: hsl(220 100% 40%);--c-color-blue-30: hsl(220 100% 30%);--c-color-blue-20: hsl(220 100% 20%);--c-color-blue-15: hsl(220 100% 15%);--c-color-blue-10: hsl(220 100% 10%);--c-color-blue-5: hsl(220 100% 5%);--c-color-orange-95: hsl(30 100% 95%);--c-color-orange-90: hsl(30 100% 90%);--c-color-orange-85: hsl(30 100% 85%);--c-color-orange-80: hsl(30 100% 80%);--c-color-orange-70: hsl(30 100% 70%);--c-color-orange-60: hsl(30 100% 60%);--c-color-orange-50: hsl(30 100% 50%);--c-color-orange-40: hsl(30 100% 40%);--c-color-orange-30: hsl(30 100% 30%);--c-color-orange-20: hsl(30 100% 20%);--c-color-orange-15: hsl(30 100% 15%);--c-color-orange-10: hsl(30 100% 10%);--c-color-orange-5: hsl(30 100% 5%);--c-color-green-95: hsl(145 100% 95%);--c-color-green-90: hsl(145 100% 90%);--c-color-green-85: hsl(145 100% 85%);--c-color-green-80: hsl(145 100% 80%);--c-color-green-70: hsl(145 100% 70%);--c-color-green-60: hsl(145 100% 60%);--c-color-green-50: hsl(145 100% 50%);--c-color-green-40: hsl(145 100% 40%);--c-color-green-30: hsl(145 100% 30%);--c-color-green-20: hsl(145 100% 20%);--c-color-green-15: hsl(145 100% 15%);--c-color-green-10: hsl(145 100% 10%);--c-color-green-5: hsl(145 100% 5%);--c-color-accented-95: var(--c-color-gray-95);--c-color-accented-90: var(--c-color-gray-90);--c-color-accented-85: var(--c-color-gray-85);--c-color-accented-80: var(--c-color-gray-80);--c-color-accented-70: var(--c-color-gray-70);--c-color-accented-60: var(--c-color-gray-60);--c-color-accented-50: var(--c-color-gray-50);--c-color-accented-40: var(--c-color-gray-40);--c-color-accented-30: var(--c-color-gray-30);--c-color-accented-20: var(--c-color-gray-20);--c-color-accented-15: var(--c-color-gray-15);--c-color-accented-10: var(--c-color-gray-10);--c-color-accented-5: var(--c-color-gray-5)}
|
package/dist/docs/components.md
CHANGED
|
@@ -4,9 +4,12 @@ Generated from component frontmatter. Human usage sections live in each componen
|
|
|
4
4
|
|
|
5
5
|
| Component | Description | Purpose | Doc path |
|
|
6
6
|
| --- | --- | --- | --- |
|
|
7
|
+
| Banner | A colored message box with four themes and an optional dismiss button. | Show tips and feedback messages with consistent styling, and let users dismiss them. | [`../components/banner/banner.md`](../components/banner/banner.md) |
|
|
7
8
|
| Button | A native button element with variant styles driven by design tokens. | Trigger actions and submit forms with consistent visual variants. | [`../components/button/button.md`](../components/button/button.md) |
|
|
8
9
|
| Checkbox | A native checkbox input with the library look and an optional built-in label. | Let the user turn an option on or off, or pick several options from a list. | [`../components/checkbox/checkbox.md`](../components/checkbox/checkbox.md) |
|
|
9
10
|
| FormControl | A wrapper that places a label above a form field and an optional error message below it. | Compose a label, a field, and an error message with consistent spacing, so consumers do not do it by hand. | [`../components/form-control/form-control.md`](../components/form-control/form-control.md) |
|
|
11
|
+
| Icon | A base container that renders inline SVG shapes in a 40×40 viewBox, themeable through design tokens. | Build icon components with a consistent size, stroke, and color strategy. | [`../components/icon/icon.md`](../components/icon/icon.md) |
|
|
12
|
+
| IconClose | A close icon made of two crossing lines, built on top of Icon. | Represent closing, dismissing, or removing something. | [`../icons/close/icon-close.md`](../icons/close/icon-close.md) |
|
|
10
13
|
| Input | A single-line text field that extends the native HTML input element. | Collect short text values in forms with consistent field styling and error indication. | [`../components/input/input.md`](../components/input/input.md) |
|
|
11
14
|
| Label | A text label that extends the native HTML label element. | Name a form control with consistent label typography, on its own or next to any control. | [`../components/label/label.md`](../components/label/label.md) |
|
|
12
15
|
| Radio | A native radio input with the library look and an optional built-in label. | Let the user pick exactly one option from a small group of mutually exclusive options. | [`../components/radio/radio.md`](../components/radio/radio.md) |
|
package/dist/docs/tokens.md
CHANGED
|
@@ -17,6 +17,19 @@ Generated from `src/vars.css`. Values show the declared token and the resolved r
|
|
|
17
17
|
| `--c-color-accented-85` | `var(--c-color-gray-85)` | `var(--c-color-gray-85) → hsl(0 0% 85%)` |
|
|
18
18
|
| `--c-color-accented-90` | `var(--c-color-gray-90)` | `var(--c-color-gray-90) → hsl(0 0% 90%)` |
|
|
19
19
|
| `--c-color-accented-95` | `var(--c-color-gray-95)` | `var(--c-color-gray-95) → hsl(0 0% 95%)` |
|
|
20
|
+
| `--c-color-blue-10` | `hsl(220 100% 10%)` | `hsl(220 100% 10%)` |
|
|
21
|
+
| `--c-color-blue-15` | `hsl(220 100% 15%)` | `hsl(220 100% 15%)` |
|
|
22
|
+
| `--c-color-blue-20` | `hsl(220 100% 20%)` | `hsl(220 100% 20%)` |
|
|
23
|
+
| `--c-color-blue-30` | `hsl(220 100% 30%)` | `hsl(220 100% 30%)` |
|
|
24
|
+
| `--c-color-blue-40` | `hsl(220 100% 40%)` | `hsl(220 100% 40%)` |
|
|
25
|
+
| `--c-color-blue-5` | `hsl(220 100% 5%)` | `hsl(220 100% 5%)` |
|
|
26
|
+
| `--c-color-blue-50` | `hsl(220 100% 50%)` | `hsl(220 100% 50%)` |
|
|
27
|
+
| `--c-color-blue-60` | `hsl(220 100% 60%)` | `hsl(220 100% 60%)` |
|
|
28
|
+
| `--c-color-blue-70` | `hsl(220 100% 70%)` | `hsl(220 100% 70%)` |
|
|
29
|
+
| `--c-color-blue-80` | `hsl(220 100% 80%)` | `hsl(220 100% 80%)` |
|
|
30
|
+
| `--c-color-blue-85` | `hsl(220 100% 85%)` | `hsl(220 100% 85%)` |
|
|
31
|
+
| `--c-color-blue-90` | `hsl(220 100% 90%)` | `hsl(220 100% 90%)` |
|
|
32
|
+
| `--c-color-blue-95` | `hsl(220 100% 95%)` | `hsl(220 100% 95%)` |
|
|
20
33
|
| `--c-color-gray-10` | `hsl(0 0% 10%)` | `hsl(0 0% 10%)` |
|
|
21
34
|
| `--c-color-gray-15` | `hsl(0 0% 15%)` | `hsl(0 0% 15%)` |
|
|
22
35
|
| `--c-color-gray-20` | `hsl(0 0% 20%)` | `hsl(0 0% 20%)` |
|
|
@@ -30,6 +43,32 @@ Generated from `src/vars.css`. Values show the declared token and the resolved r
|
|
|
30
43
|
| `--c-color-gray-85` | `hsl(0 0% 85%)` | `hsl(0 0% 85%)` |
|
|
31
44
|
| `--c-color-gray-90` | `hsl(0 0% 90%)` | `hsl(0 0% 90%)` |
|
|
32
45
|
| `--c-color-gray-95` | `hsl(0 0% 95%)` | `hsl(0 0% 95%)` |
|
|
46
|
+
| `--c-color-green-10` | `hsl(145 100% 10%)` | `hsl(145 100% 10%)` |
|
|
47
|
+
| `--c-color-green-15` | `hsl(145 100% 15%)` | `hsl(145 100% 15%)` |
|
|
48
|
+
| `--c-color-green-20` | `hsl(145 100% 20%)` | `hsl(145 100% 20%)` |
|
|
49
|
+
| `--c-color-green-30` | `hsl(145 100% 30%)` | `hsl(145 100% 30%)` |
|
|
50
|
+
| `--c-color-green-40` | `hsl(145 100% 40%)` | `hsl(145 100% 40%)` |
|
|
51
|
+
| `--c-color-green-5` | `hsl(145 100% 5%)` | `hsl(145 100% 5%)` |
|
|
52
|
+
| `--c-color-green-50` | `hsl(145 100% 50%)` | `hsl(145 100% 50%)` |
|
|
53
|
+
| `--c-color-green-60` | `hsl(145 100% 60%)` | `hsl(145 100% 60%)` |
|
|
54
|
+
| `--c-color-green-70` | `hsl(145 100% 70%)` | `hsl(145 100% 70%)` |
|
|
55
|
+
| `--c-color-green-80` | `hsl(145 100% 80%)` | `hsl(145 100% 80%)` |
|
|
56
|
+
| `--c-color-green-85` | `hsl(145 100% 85%)` | `hsl(145 100% 85%)` |
|
|
57
|
+
| `--c-color-green-90` | `hsl(145 100% 90%)` | `hsl(145 100% 90%)` |
|
|
58
|
+
| `--c-color-green-95` | `hsl(145 100% 95%)` | `hsl(145 100% 95%)` |
|
|
59
|
+
| `--c-color-orange-10` | `hsl(30 100% 10%)` | `hsl(30 100% 10%)` |
|
|
60
|
+
| `--c-color-orange-15` | `hsl(30 100% 15%)` | `hsl(30 100% 15%)` |
|
|
61
|
+
| `--c-color-orange-20` | `hsl(30 100% 20%)` | `hsl(30 100% 20%)` |
|
|
62
|
+
| `--c-color-orange-30` | `hsl(30 100% 30%)` | `hsl(30 100% 30%)` |
|
|
63
|
+
| `--c-color-orange-40` | `hsl(30 100% 40%)` | `hsl(30 100% 40%)` |
|
|
64
|
+
| `--c-color-orange-5` | `hsl(30 100% 5%)` | `hsl(30 100% 5%)` |
|
|
65
|
+
| `--c-color-orange-50` | `hsl(30 100% 50%)` | `hsl(30 100% 50%)` |
|
|
66
|
+
| `--c-color-orange-60` | `hsl(30 100% 60%)` | `hsl(30 100% 60%)` |
|
|
67
|
+
| `--c-color-orange-70` | `hsl(30 100% 70%)` | `hsl(30 100% 70%)` |
|
|
68
|
+
| `--c-color-orange-80` | `hsl(30 100% 80%)` | `hsl(30 100% 80%)` |
|
|
69
|
+
| `--c-color-orange-85` | `hsl(30 100% 85%)` | `hsl(30 100% 85%)` |
|
|
70
|
+
| `--c-color-orange-90` | `hsl(30 100% 90%)` | `hsl(30 100% 90%)` |
|
|
71
|
+
| `--c-color-orange-95` | `hsl(30 100% 95%)` | `hsl(30 100% 95%)` |
|
|
33
72
|
| `--c-color-red-10` | `hsl(0 100% 10%)` | `hsl(0 100% 10%)` |
|
|
34
73
|
| `--c-color-red-15` | `hsl(0 100% 15%)` | `hsl(0 100% 15%)` |
|
|
35
74
|
| `--c-color-red-20` | `hsl(0 100% 20%)` | `hsl(0 100% 20%)` |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.c-banner{--c-banner-background: var(--c-color-blue-95);--c-banner-content: var(--c-color-blue-50);--c-banner-close-icon: var(--c-color-blue-60);--c-banner-close-background-hover: var(--c-color-blue-90);--c-banner-radius: 15px;--c-banner-close-radius: 10px;--c-banner-close-size: 30px;display:block;position:relative;padding:10px 15px;min-height:40px;background:var(--c-banner-background);color:var(--c-banner-content);font-family:var(--c-font-family-primary);font-size:var(--c-font-size-sm);font-weight:400;line-height:20px;border-radius:var(--c-banner-radius);box-sizing:border-box}.c-banner.is-dismissable{padding-right:45px}.c-banner.is-warning{--c-banner-background: var(--c-color-orange-95);--c-banner-content: var(--c-color-orange-50);--c-banner-close-icon: var(--c-color-orange-50);--c-banner-close-background-hover: var(--c-color-orange-90)}.c-banner.is-success{--c-banner-background: var(--c-color-green-95);--c-banner-content: var(--c-color-green-30);--c-banner-close-icon: var(--c-color-green-30);--c-banner-close-background-hover: var(--c-color-green-85)}.c-banner.is-error{--c-banner-background: var(--c-color-red-95);--c-banner-content: var(--c-color-red-60);--c-banner-close-icon: var(--c-color-red-60);--c-banner-close-background-hover: var(--c-color-red-90)}.c-banner button.c-button.is-isometric{--c-button-width: var(--c-banner-close-size);--c-button-height: var(--c-banner-close-size);--c-button-radius: var(--c-banner-close-radius);--c-button-background: transparent;--c-button-background-hover: var(--c-banner-close-background-hover);--c-button-border-color: transparent;--c-button-box-shadow-color: transparent;position:absolute;top:5px;right:5px}.c-banner button.c-button.is-isometric:focus-visible{background:var(--c-banner-close-background-hover)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useState as f}from"react";import m from"../button/button.js";import d from"../../icons/close/icon-close.js";import"./banner.css";import{jsxs as p,jsx as r}from"react/jsx-runtime";const C=({theme:e,dismissable:s,closeButtonLabel:o,className:n,children:t,...i})=>{const[l,a]=f(!0),c=b({theme:e,dismissable:s,className:n}),u=()=>a(!1);return l?p("div",{className:c,...i,children:[t,s&&x({closeButtonLabel:o,onClick:u})]}):null};function b({theme:e,dismissable:s,className:o}){return["c-banner",e&&`is-${e}`,s&&"is-dismissable",o].filter(Boolean).join(" ")}function x({closeButtonLabel:e="Close",onClick:s}){return r(m,{type:"button","aria-label":e,onClick:s,isometric:!0,children:r(d,{size:"20px",strokeWidth:4,strokeColor:"var(--c-banner-close-icon)"})})}export default C;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Banner
|
|
3
|
+
description: A colored message box with four themes and an optional dismiss button.
|
|
4
|
+
purpose: Show tips and feedback messages with consistent styling, and let users dismiss them.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Banner
|
|
8
|
+
|
|
9
|
+
A block-level message box with rounded corners. The `children` are rendered inside it, so rich content such as links, buttons, and formatted text is accepted. Without a `theme`, the banner uses the default blue theme.
|
|
10
|
+
|
|
11
|
+
With `dismissable`, a dismiss button (an isometric `Button` with an `IconClose`) is rendered in the top-right corner, and the content never overlaps it. Clicking the button removes the banner from the DOM by itself: the banner is autonomous and has no dismiss callback, and the dismissed state is not persisted.
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
The Banner API extends the native HTML `div` attributes, which are forwarded to the container.
|
|
16
|
+
|
|
17
|
+
<!-- BEGIN GENERATED PROPS -->
|
|
18
|
+
_Also inherits all props from `HTMLAttributes<HTMLDivElement>`._
|
|
19
|
+
|
|
20
|
+
| Name | Type | Required | Default | Description |
|
|
21
|
+
| --- | --- | --- | --- | --- |
|
|
22
|
+
| children | `ReactNode` | No | `undefined` | Banner content. Accepts any React node, such as links, buttons, and formatted text. |
|
|
23
|
+
| closeButtonLabel | `string` | No | `"Close"` | Accessible name (`aria-label`) of the dismiss button. |
|
|
24
|
+
| dismissable | `boolean` | No | `false` | Renders a dismiss button in the top-right corner. Clicking it removes the banner from the DOM. |
|
|
25
|
+
| theme | `"success" \| "warning" \| "error"` | No | `undefined` | Color theme of the banner. When omitted, the default blue theme is used. |
|
|
26
|
+
<!-- END GENERATED PROPS -->
|
|
27
|
+
|
|
28
|
+
## When to use
|
|
29
|
+
|
|
30
|
+
- Showing tips, warnings, success feedback, or error messages inside the page flow
|
|
31
|
+
- Messages that the user may want to dismiss
|
|
32
|
+
- Messages with rich content, such as links or buttons
|
|
33
|
+
|
|
34
|
+
## When NOT to use
|
|
35
|
+
|
|
36
|
+
- **Blocking confirmations** — use a dialog or modal when the user must decide before continuing.
|
|
37
|
+
- **Field-level validation** — use the error message of `FormControl` next to the field.
|
|
38
|
+
- **Transient notifications** — a banner stays in the page until dismissed, so do not use it for toasts that disappear on their own.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Banner tokens
|
|
2
|
+
|
|
3
|
+
Generated from `src/components/banner/banner.css`.
|
|
4
|
+
|
|
5
|
+
## Base tokens
|
|
6
|
+
|
|
7
|
+
| Token | Declared value | Resolution |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| `--c-banner-background` | `var(--c-color-blue-95)` | `var(--c-color-blue-95) → hsl(220 100% 95%)` |
|
|
10
|
+
| `--c-banner-close-background-hover` | `var(--c-color-blue-90)` | `var(--c-color-blue-90) → hsl(220 100% 90%)` |
|
|
11
|
+
| `--c-banner-close-icon` | `var(--c-color-blue-60)` | `var(--c-color-blue-60) → hsl(220 100% 60%)` |
|
|
12
|
+
| `--c-banner-close-radius` | `10px` | `10px` |
|
|
13
|
+
| `--c-banner-close-size` | `30px` | `30px` |
|
|
14
|
+
| `--c-banner-content` | `var(--c-color-blue-50)` | `var(--c-color-blue-50) → hsl(220 100% 50%)` |
|
|
15
|
+
| `--c-banner-radius` | `15px` | `15px` |
|
|
16
|
+
|
|
17
|
+
## Modifier overrides
|
|
18
|
+
|
|
19
|
+
### `.c-banner.is-warning`
|
|
20
|
+
|
|
21
|
+
| Token | Declared value | Resolution |
|
|
22
|
+
| --- | --- | --- |
|
|
23
|
+
| `--c-banner-background` | `var(--c-color-orange-95)` | `var(--c-color-orange-95) → hsl(30 100% 95%)` |
|
|
24
|
+
| `--c-banner-close-background-hover` | `var(--c-color-orange-90)` | `var(--c-color-orange-90) → hsl(30 100% 90%)` |
|
|
25
|
+
| `--c-banner-close-icon` | `var(--c-color-orange-50)` | `var(--c-color-orange-50) → hsl(30 100% 50%)` |
|
|
26
|
+
| `--c-banner-content` | `var(--c-color-orange-50)` | `var(--c-color-orange-50) → hsl(30 100% 50%)` |
|
|
27
|
+
|
|
28
|
+
### `.c-banner.is-success`
|
|
29
|
+
|
|
30
|
+
| Token | Declared value | Resolution |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| `--c-banner-background` | `var(--c-color-green-95)` | `var(--c-color-green-95) → hsl(145 100% 95%)` |
|
|
33
|
+
| `--c-banner-close-background-hover` | `var(--c-color-green-85)` | `var(--c-color-green-85) → hsl(145 100% 85%)` |
|
|
34
|
+
| `--c-banner-close-icon` | `var(--c-color-green-30)` | `var(--c-color-green-30) → hsl(145 100% 30%)` |
|
|
35
|
+
| `--c-banner-content` | `var(--c-color-green-30)` | `var(--c-color-green-30) → hsl(145 100% 30%)` |
|
|
36
|
+
|
|
37
|
+
### `.c-banner.is-error`
|
|
38
|
+
|
|
39
|
+
| Token | Declared value | Resolution |
|
|
40
|
+
| --- | --- | --- |
|
|
41
|
+
| `--c-banner-background` | `var(--c-color-red-95)` | `var(--c-color-red-95) → hsl(0 100% 95%)` |
|
|
42
|
+
| `--c-banner-close-background-hover` | `var(--c-color-red-90)` | `var(--c-color-red-90) → hsl(0 100% 90%)` |
|
|
43
|
+
| `--c-banner-close-icon` | `var(--c-color-red-60)` | `var(--c-color-red-60) → hsl(0 100% 60%)` |
|
|
44
|
+
| `--c-banner-content` | `var(--c-color-red-60)` | `var(--c-color-red-60) → hsl(0 100% 60%)` |
|
|
45
|
+
|
|
46
|
+
### `.c-banner button.c-button.is-isometric`
|
|
47
|
+
|
|
48
|
+
| Token | Declared value | Resolution |
|
|
49
|
+
| --- | --- | --- |
|
|
50
|
+
| `--c-button-background` | `transparent` | `transparent` |
|
|
51
|
+
| `--c-button-background-hover` | `var(--c-banner-close-background-hover)` | `var(--c-banner-close-background-hover) → var(--c-color-blue-90) → hsl(220 100% 90%)` |
|
|
52
|
+
| `--c-button-border-color` | `transparent` | `transparent` |
|
|
53
|
+
| `--c-button-box-shadow-color` | `transparent` | `transparent` |
|
|
54
|
+
| `--c-button-height` | `var(--c-banner-close-size)` | `var(--c-banner-close-size) → 30px` |
|
|
55
|
+
| `--c-button-radius` | `var(--c-banner-close-radius)` | `var(--c-banner-close-radius) → 10px` |
|
|
56
|
+
| `--c-button-width` | `var(--c-banner-close-size)` | `var(--c-banner-close-size) → 30px` |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.c-icon{--c-icon-stroke-color: var(--c-color-gray-10);--c-icon-stroke-width: 1px;--c-icon-shape-color: var(--c-color-gray-10);--c-icon-width: 40px;--c-icon-height: 40px;display:inline-flex;width:var(--c-icon-width);height:var(--c-icon-height)}.c-icon svg{width:100%;height:100%}.c-icon [data-stroke]{fill:none;stroke:var(--c-icon-stroke-color);stroke-width:var(--c-icon-stroke-width);stroke-linecap:round;stroke-linejoin:round}.c-icon [data-shape]{fill:var(--c-icon-shape-color)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./icon.css";import{jsx as n}from"react/jsx-runtime";const a=({name:t,strokeColor:c,strokeWidth:o,size:e,style:i,className:r,children:s,...d})=>{const l=["c-icon",`c-icon-${t}`,r].filter(Boolean).join(" "),u=h({strokeColor:c,strokeWidth:o,size:e});return n("div",{className:l,style:{...u,...i},"aria-hidden":"true",...d,children:n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 40",children:s})})};function h({strokeColor:t,strokeWidth:c,size:o}){return Object.entries({"--c-icon-stroke-color":t,"--c-icon-stroke-width":c,"--c-icon-width":o,"--c-icon-height":o}).filter(([,e])=>e!==void 0).reduce((e,[i,r])=>({...e,[i]:r}),{})}export default a;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Icon
|
|
3
|
+
description: A base container that renders inline SVG shapes in a 40×40 viewBox, themeable through design tokens.
|
|
4
|
+
purpose: Build icon components with a consistent size, stroke, and color strategy.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Icon
|
|
8
|
+
|
|
9
|
+
The base of every icon in the library. It renders a decorative container (`aria-hidden="true"`) with an inline `<svg>` that uses a `0 0 40 40` viewBox, and the `children` are the SVG shapes. Icons ready to use live in `src/icons/` (for example `IconClose`) and are built on top of `Icon`.
|
|
10
|
+
|
|
11
|
+
Shapes must not carry presentational attributes. Mark outlines with `data-stroke` (no fill, round line caps and joins) and filled shapes with `data-shape`. The default color of both is `--c-color-gray-10`: it is never inherited from the parent. Only `strokeColor` (or the `--c-icon-stroke-color` custom property) changes the stroke color. The default stroke width is 1px and the default size is 40px.
|
|
12
|
+
|
|
13
|
+
`strokeColor`, `strokeWidth`, and `size` are applied as `--c-icon-*` custom properties on the container, only when given. Values passed in `style` take precedence over them.
|
|
14
|
+
|
|
15
|
+
## Props
|
|
16
|
+
|
|
17
|
+
The Icon API extends the native HTML `div` attributes, which are forwarded to the container.
|
|
18
|
+
|
|
19
|
+
<!-- BEGIN GENERATED PROPS -->
|
|
20
|
+
_Also inherits all props from `HTMLAttributes<HTMLDivElement>`._
|
|
21
|
+
|
|
22
|
+
| Name | Type | Required | Default | Description |
|
|
23
|
+
| --- | --- | --- | --- | --- |
|
|
24
|
+
| children | `ReactNode` | No | `undefined` | SVG shapes drawn inside the 40×40 viewBox. Use `data-stroke` for outlines and `data-shape` for filled shapes. |
|
|
25
|
+
| name | `string` | Yes | | Name of the icon. Builds the `c-icon-<name>` css class of the container. |
|
|
26
|
+
| size | `string` | No | `undefined` | Width and height of the icon (for example `20px`), applied as `--c-icon-width` and `--c-icon-height`. |
|
|
27
|
+
| strokeColor | `string` | No | `undefined` | Stroke color of the outlines, applied as `--c-icon-stroke-color`. |
|
|
28
|
+
| strokeWidth | `string \| number` | No | `undefined` | Stroke width of the outlines in viewBox units, applied as `--c-icon-stroke-width`. |
|
|
29
|
+
<!-- END GENERATED PROPS -->
|
|
30
|
+
|
|
31
|
+
## When to use
|
|
32
|
+
|
|
33
|
+
- Building a new icon component for `src/icons/`
|
|
34
|
+
- Rendering a one-off SVG that must follow the library's stroke, shape, and size tokens
|
|
35
|
+
|
|
36
|
+
## When NOT to use
|
|
37
|
+
|
|
38
|
+
- **Existing icons** — import the ready-made icon component (for example `IconClose`) instead of drawing its shapes again.
|
|
39
|
+
- **Images and illustrations** — use an `<img>` or an inline SVG for artwork that is not an icon.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Icon tokens
|
|
2
|
+
|
|
3
|
+
Generated from `src/components/icon/icon.css`.
|
|
4
|
+
|
|
5
|
+
## Base tokens
|
|
6
|
+
|
|
7
|
+
| Token | Declared value | Resolution |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| `--c-icon-height` | `40px` | `40px` |
|
|
10
|
+
| `--c-icon-shape-color` | `var(--c-color-gray-10)` | `var(--c-color-gray-10) → hsl(0 0% 10%)` |
|
|
11
|
+
| `--c-icon-stroke-color` | `var(--c-color-gray-10)` | `var(--c-color-gray-10) → hsl(0 0% 10%)` |
|
|
12
|
+
| `--c-icon-stroke-width` | `1px` | `1px` |
|
|
13
|
+
| `--c-icon-width` | `40px` | `40px` |
|
|
@@ -4,9 +4,12 @@ Generated from component frontmatter. Human usage sections live in each componen
|
|
|
4
4
|
|
|
5
5
|
| Component | Description | Purpose | Doc path |
|
|
6
6
|
| --- | --- | --- | --- |
|
|
7
|
+
| Banner | A colored message box with four themes and an optional dismiss button. | Show tips and feedback messages with consistent styling, and let users dismiss them. | [`../components/banner/banner.md`](../components/banner/banner.md) |
|
|
7
8
|
| Button | A native button element with variant styles driven by design tokens. | Trigger actions and submit forms with consistent visual variants. | [`../components/button/button.md`](../components/button/button.md) |
|
|
8
9
|
| Checkbox | A native checkbox input with the library look and an optional built-in label. | Let the user turn an option on or off, or pick several options from a list. | [`../components/checkbox/checkbox.md`](../components/checkbox/checkbox.md) |
|
|
9
10
|
| FormControl | A wrapper that places a label above a form field and an optional error message below it. | Compose a label, a field, and an error message with consistent spacing, so consumers do not do it by hand. | [`../components/form-control/form-control.md`](../components/form-control/form-control.md) |
|
|
11
|
+
| Icon | A base container that renders inline SVG shapes in a 40×40 viewBox, themeable through design tokens. | Build icon components with a consistent size, stroke, and color strategy. | [`../components/icon/icon.md`](../components/icon/icon.md) |
|
|
12
|
+
| IconClose | A close icon made of two crossing lines, built on top of Icon. | Represent closing, dismissing, or removing something. | [`../icons/close/icon-close.md`](../icons/close/icon-close.md) |
|
|
10
13
|
| Input | A single-line text field that extends the native HTML input element. | Collect short text values in forms with consistent field styling and error indication. | [`../components/input/input.md`](../components/input/input.md) |
|
|
11
14
|
| Label | A text label that extends the native HTML label element. | Name a form control with consistent label typography, on its own or next to any control. | [`../components/label/label.md`](../components/label/label.md) |
|
|
12
15
|
| Radio | A native radio input with the library look and an optional built-in label. | Let the user pick exactly one option from a small group of mutually exclusive options. | [`../components/radio/radio.md`](../components/radio/radio.md) |
|
package/dist/es6/docs/tokens.md
CHANGED
|
@@ -17,6 +17,19 @@ Generated from `src/vars.css`. Values show the declared token and the resolved r
|
|
|
17
17
|
| `--c-color-accented-85` | `var(--c-color-gray-85)` | `var(--c-color-gray-85) → hsl(0 0% 85%)` |
|
|
18
18
|
| `--c-color-accented-90` | `var(--c-color-gray-90)` | `var(--c-color-gray-90) → hsl(0 0% 90%)` |
|
|
19
19
|
| `--c-color-accented-95` | `var(--c-color-gray-95)` | `var(--c-color-gray-95) → hsl(0 0% 95%)` |
|
|
20
|
+
| `--c-color-blue-10` | `hsl(220 100% 10%)` | `hsl(220 100% 10%)` |
|
|
21
|
+
| `--c-color-blue-15` | `hsl(220 100% 15%)` | `hsl(220 100% 15%)` |
|
|
22
|
+
| `--c-color-blue-20` | `hsl(220 100% 20%)` | `hsl(220 100% 20%)` |
|
|
23
|
+
| `--c-color-blue-30` | `hsl(220 100% 30%)` | `hsl(220 100% 30%)` |
|
|
24
|
+
| `--c-color-blue-40` | `hsl(220 100% 40%)` | `hsl(220 100% 40%)` |
|
|
25
|
+
| `--c-color-blue-5` | `hsl(220 100% 5%)` | `hsl(220 100% 5%)` |
|
|
26
|
+
| `--c-color-blue-50` | `hsl(220 100% 50%)` | `hsl(220 100% 50%)` |
|
|
27
|
+
| `--c-color-blue-60` | `hsl(220 100% 60%)` | `hsl(220 100% 60%)` |
|
|
28
|
+
| `--c-color-blue-70` | `hsl(220 100% 70%)` | `hsl(220 100% 70%)` |
|
|
29
|
+
| `--c-color-blue-80` | `hsl(220 100% 80%)` | `hsl(220 100% 80%)` |
|
|
30
|
+
| `--c-color-blue-85` | `hsl(220 100% 85%)` | `hsl(220 100% 85%)` |
|
|
31
|
+
| `--c-color-blue-90` | `hsl(220 100% 90%)` | `hsl(220 100% 90%)` |
|
|
32
|
+
| `--c-color-blue-95` | `hsl(220 100% 95%)` | `hsl(220 100% 95%)` |
|
|
20
33
|
| `--c-color-gray-10` | `hsl(0 0% 10%)` | `hsl(0 0% 10%)` |
|
|
21
34
|
| `--c-color-gray-15` | `hsl(0 0% 15%)` | `hsl(0 0% 15%)` |
|
|
22
35
|
| `--c-color-gray-20` | `hsl(0 0% 20%)` | `hsl(0 0% 20%)` |
|
|
@@ -30,6 +43,32 @@ Generated from `src/vars.css`. Values show the declared token and the resolved r
|
|
|
30
43
|
| `--c-color-gray-85` | `hsl(0 0% 85%)` | `hsl(0 0% 85%)` |
|
|
31
44
|
| `--c-color-gray-90` | `hsl(0 0% 90%)` | `hsl(0 0% 90%)` |
|
|
32
45
|
| `--c-color-gray-95` | `hsl(0 0% 95%)` | `hsl(0 0% 95%)` |
|
|
46
|
+
| `--c-color-green-10` | `hsl(145 100% 10%)` | `hsl(145 100% 10%)` |
|
|
47
|
+
| `--c-color-green-15` | `hsl(145 100% 15%)` | `hsl(145 100% 15%)` |
|
|
48
|
+
| `--c-color-green-20` | `hsl(145 100% 20%)` | `hsl(145 100% 20%)` |
|
|
49
|
+
| `--c-color-green-30` | `hsl(145 100% 30%)` | `hsl(145 100% 30%)` |
|
|
50
|
+
| `--c-color-green-40` | `hsl(145 100% 40%)` | `hsl(145 100% 40%)` |
|
|
51
|
+
| `--c-color-green-5` | `hsl(145 100% 5%)` | `hsl(145 100% 5%)` |
|
|
52
|
+
| `--c-color-green-50` | `hsl(145 100% 50%)` | `hsl(145 100% 50%)` |
|
|
53
|
+
| `--c-color-green-60` | `hsl(145 100% 60%)` | `hsl(145 100% 60%)` |
|
|
54
|
+
| `--c-color-green-70` | `hsl(145 100% 70%)` | `hsl(145 100% 70%)` |
|
|
55
|
+
| `--c-color-green-80` | `hsl(145 100% 80%)` | `hsl(145 100% 80%)` |
|
|
56
|
+
| `--c-color-green-85` | `hsl(145 100% 85%)` | `hsl(145 100% 85%)` |
|
|
57
|
+
| `--c-color-green-90` | `hsl(145 100% 90%)` | `hsl(145 100% 90%)` |
|
|
58
|
+
| `--c-color-green-95` | `hsl(145 100% 95%)` | `hsl(145 100% 95%)` |
|
|
59
|
+
| `--c-color-orange-10` | `hsl(30 100% 10%)` | `hsl(30 100% 10%)` |
|
|
60
|
+
| `--c-color-orange-15` | `hsl(30 100% 15%)` | `hsl(30 100% 15%)` |
|
|
61
|
+
| `--c-color-orange-20` | `hsl(30 100% 20%)` | `hsl(30 100% 20%)` |
|
|
62
|
+
| `--c-color-orange-30` | `hsl(30 100% 30%)` | `hsl(30 100% 30%)` |
|
|
63
|
+
| `--c-color-orange-40` | `hsl(30 100% 40%)` | `hsl(30 100% 40%)` |
|
|
64
|
+
| `--c-color-orange-5` | `hsl(30 100% 5%)` | `hsl(30 100% 5%)` |
|
|
65
|
+
| `--c-color-orange-50` | `hsl(30 100% 50%)` | `hsl(30 100% 50%)` |
|
|
66
|
+
| `--c-color-orange-60` | `hsl(30 100% 60%)` | `hsl(30 100% 60%)` |
|
|
67
|
+
| `--c-color-orange-70` | `hsl(30 100% 70%)` | `hsl(30 100% 70%)` |
|
|
68
|
+
| `--c-color-orange-80` | `hsl(30 100% 80%)` | `hsl(30 100% 80%)` |
|
|
69
|
+
| `--c-color-orange-85` | `hsl(30 100% 85%)` | `hsl(30 100% 85%)` |
|
|
70
|
+
| `--c-color-orange-90` | `hsl(30 100% 90%)` | `hsl(30 100% 90%)` |
|
|
71
|
+
| `--c-color-orange-95` | `hsl(30 100% 95%)` | `hsl(30 100% 95%)` |
|
|
33
72
|
| `--c-color-red-10` | `hsl(0 100% 10%)` | `hsl(0 100% 10%)` |
|
|
34
73
|
| `--c-color-red-15` | `hsl(0 100% 15%)` | `hsl(0 100% 15%)` |
|
|
35
74
|
| `--c-color-red-20` | `hsl(0 100% 20%)` | `hsl(0 100% 20%)` |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"../../components/icon/icon.js";import{jsx as t,jsxs as r}from"react/jsx-runtime";const e=s=>r(o,{...s,name:"close",children:[t("path",{"data-stroke":!0,d:"M12,28L28,12"}),t("path",{"data-stroke":!0,d:"M28,28L12,12"})]});export default e;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: IconClose
|
|
3
|
+
description: A close icon made of two crossing lines, built on top of Icon.
|
|
4
|
+
purpose: Represent closing, dismissing, or removing something.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# IconClose
|
|
8
|
+
|
|
9
|
+
Two crossing lines drawn through [`Icon`](../../components/icon/icon.md), with the class `c-icon-close`. It accepts and forwards every `Icon` prop (`size`, `strokeColor`, `strokeWidth`, `className`, etc.), except `name` and `children`, which are fixed.
|
|
10
|
+
|
|
11
|
+
## Props
|
|
12
|
+
|
|
13
|
+
<!-- BEGIN GENERATED PROPS -->
|
|
14
|
+
_Also inherits all props from `Omit<IconProps, 'name' | 'children'>`._
|
|
15
|
+
<!-- END GENERATED PROPS -->
|
|
16
|
+
|
|
17
|
+
## When to use
|
|
18
|
+
|
|
19
|
+
- Dismiss or close buttons (for example inside an isometric `Button`)
|
|
20
|
+
- Removing an item from a list
|
|
21
|
+
|
|
22
|
+
## When NOT to use
|
|
23
|
+
|
|
24
|
+
- **Text-only actions** — use a `Button` with a text label when the action needs words to be clear.
|
package/dist/es6/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./index.css";export{default as Button}from"./components/button/button.js";export{default as Checkbox}from"./components/checkbox/checkbox.js";export{default as FormControl}from"./components/form-control/form-control.js";export{default as Input}from"./components/input/input.js";export{default as Label}from"./components/label/label.js";export{default as Radio}from"./components/radio/radio.js";export{default as Select}from"./components/select/select.js";export{default as Textarea}from"./components/textarea/textarea.js";
|
|
1
|
+
import"./index.css";export{default as Banner}from"./components/banner/banner.js";export{default as Button}from"./components/button/button.js";export{default as Checkbox}from"./components/checkbox/checkbox.js";export{default as FormControl}from"./components/form-control/form-control.js";export{default as Icon}from"./components/icon/icon.js";export{default as IconClose}from"./icons/close/icon-close.js";export{default as Input}from"./components/input/input.js";export{default as Label}from"./components/label/label.js";export{default as Radio}from"./components/radio/radio.js";export{default as Select}from"./components/select/select.js";export{default as Textarea}from"./components/textarea/textarea.js";
|
package/dist/es6/vars.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--c-font-family-primary: "Inter", sans-serif;--c-font-size-xxxs: .625rem;--c-font-size-xxs: .75rem;--c-font-size-xs: .875rem;--c-font-size-sm: 1rem;--c-font-size-md: 1.125rem;--c-font-size-lg: 1.25rem;--c-font-size-xl: 1.5rem;--c-font-size-xxl: 2.25rem;--c-font-size-xxxl: 3rem;--c-color-gray-95: hsl(0 0% 95%);--c-color-gray-90: hsl(0 0% 90%);--c-color-gray-85: hsl(0 0% 85%);--c-color-gray-80: hsl(0 0% 80%);--c-color-gray-70: hsl(0 0% 70%);--c-color-gray-60: hsl(0 0% 60%);--c-color-gray-50: hsl(0 0% 50%);--c-color-gray-40: hsl(0 0% 40%);--c-color-gray-30: hsl(0 0% 30%);--c-color-gray-20: hsl(0 0% 20%);--c-color-gray-15: hsl(0 0% 15%);--c-color-gray-10: hsl(0 0% 10%);--c-color-gray-5: hsl(0 0% 5%);--c-color-red-95: hsl(0 100% 95%);--c-color-red-90: hsl(0 100% 90%);--c-color-red-85: hsl(0 100% 85%);--c-color-red-80: hsl(0 100% 80%);--c-color-red-70: hsl(0 100% 70%);--c-color-red-60: hsl(0 100% 60%);--c-color-red-50: hsl(0 100% 50%);--c-color-red-40: hsl(0 100% 40%);--c-color-red-30: hsl(0 100% 30%);--c-color-red-20: hsl(0 100% 20%);--c-color-red-15: hsl(0 100% 15%);--c-color-red-10: hsl(0 100% 10%);--c-color-red-5: hsl(0 100% 5%);--c-color-accented-95: var(--c-color-gray-95);--c-color-accented-90: var(--c-color-gray-90);--c-color-accented-85: var(--c-color-gray-85);--c-color-accented-80: var(--c-color-gray-80);--c-color-accented-70: var(--c-color-gray-70);--c-color-accented-60: var(--c-color-gray-60);--c-color-accented-50: var(--c-color-gray-50);--c-color-accented-40: var(--c-color-gray-40);--c-color-accented-30: var(--c-color-gray-30);--c-color-accented-20: var(--c-color-gray-20);--c-color-accented-15: var(--c-color-gray-15);--c-color-accented-10: var(--c-color-gray-10);--c-color-accented-5: var(--c-color-gray-5)}
|
|
1
|
+
:root{--c-font-family-primary: "Inter", sans-serif;--c-font-size-xxxs: .625rem;--c-font-size-xxs: .75rem;--c-font-size-xs: .875rem;--c-font-size-sm: 1rem;--c-font-size-md: 1.125rem;--c-font-size-lg: 1.25rem;--c-font-size-xl: 1.5rem;--c-font-size-xxl: 2.25rem;--c-font-size-xxxl: 3rem;--c-color-gray-95: hsl(0 0% 95%);--c-color-gray-90: hsl(0 0% 90%);--c-color-gray-85: hsl(0 0% 85%);--c-color-gray-80: hsl(0 0% 80%);--c-color-gray-70: hsl(0 0% 70%);--c-color-gray-60: hsl(0 0% 60%);--c-color-gray-50: hsl(0 0% 50%);--c-color-gray-40: hsl(0 0% 40%);--c-color-gray-30: hsl(0 0% 30%);--c-color-gray-20: hsl(0 0% 20%);--c-color-gray-15: hsl(0 0% 15%);--c-color-gray-10: hsl(0 0% 10%);--c-color-gray-5: hsl(0 0% 5%);--c-color-red-95: hsl(0 100% 95%);--c-color-red-90: hsl(0 100% 90%);--c-color-red-85: hsl(0 100% 85%);--c-color-red-80: hsl(0 100% 80%);--c-color-red-70: hsl(0 100% 70%);--c-color-red-60: hsl(0 100% 60%);--c-color-red-50: hsl(0 100% 50%);--c-color-red-40: hsl(0 100% 40%);--c-color-red-30: hsl(0 100% 30%);--c-color-red-20: hsl(0 100% 20%);--c-color-red-15: hsl(0 100% 15%);--c-color-red-10: hsl(0 100% 10%);--c-color-red-5: hsl(0 100% 5%);--c-color-blue-95: hsl(220 100% 95%);--c-color-blue-90: hsl(220 100% 90%);--c-color-blue-85: hsl(220 100% 85%);--c-color-blue-80: hsl(220 100% 80%);--c-color-blue-70: hsl(220 100% 70%);--c-color-blue-60: hsl(220 100% 60%);--c-color-blue-50: hsl(220 100% 50%);--c-color-blue-40: hsl(220 100% 40%);--c-color-blue-30: hsl(220 100% 30%);--c-color-blue-20: hsl(220 100% 20%);--c-color-blue-15: hsl(220 100% 15%);--c-color-blue-10: hsl(220 100% 10%);--c-color-blue-5: hsl(220 100% 5%);--c-color-orange-95: hsl(30 100% 95%);--c-color-orange-90: hsl(30 100% 90%);--c-color-orange-85: hsl(30 100% 85%);--c-color-orange-80: hsl(30 100% 80%);--c-color-orange-70: hsl(30 100% 70%);--c-color-orange-60: hsl(30 100% 60%);--c-color-orange-50: hsl(30 100% 50%);--c-color-orange-40: hsl(30 100% 40%);--c-color-orange-30: hsl(30 100% 30%);--c-color-orange-20: hsl(30 100% 20%);--c-color-orange-15: hsl(30 100% 15%);--c-color-orange-10: hsl(30 100% 10%);--c-color-orange-5: hsl(30 100% 5%);--c-color-green-95: hsl(145 100% 95%);--c-color-green-90: hsl(145 100% 90%);--c-color-green-85: hsl(145 100% 85%);--c-color-green-80: hsl(145 100% 80%);--c-color-green-70: hsl(145 100% 70%);--c-color-green-60: hsl(145 100% 60%);--c-color-green-50: hsl(145 100% 50%);--c-color-green-40: hsl(145 100% 40%);--c-color-green-30: hsl(145 100% 30%);--c-color-green-20: hsl(145 100% 20%);--c-color-green-15: hsl(145 100% 15%);--c-color-green-10: hsl(145 100% 10%);--c-color-green-5: hsl(145 100% 5%);--c-color-accented-95: var(--c-color-gray-95);--c-color-accented-90: var(--c-color-gray-90);--c-color-accented-85: var(--c-color-gray-85);--c-color-accented-80: var(--c-color-gray-80);--c-color-accented-70: var(--c-color-gray-70);--c-color-accented-60: var(--c-color-gray-60);--c-color-accented-50: var(--c-color-gray-50);--c-color-accented-40: var(--c-color-gray-40);--c-color-accented-30: var(--c-color-gray-30);--c-color-accented-20: var(--c-color-gray-20);--c-color-accented-15: var(--c-color-gray-15);--c-color-accented-10: var(--c-color-gray-10);--c-color-accented-5: var(--c-color-gray-5)}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
export type { BannerProps } from './components/banner/banner.d.ts';
|
|
2
|
+
export { default as Banner } from './components/banner/banner.d.ts';
|
|
1
3
|
export type { ButtonProps } from './components/button/button.d.ts';
|
|
2
4
|
export { default as Button } from './components/button/button.d.ts';
|
|
3
5
|
export type { CheckboxProps } from './components/checkbox/checkbox.d.ts';
|
|
4
6
|
export { default as Checkbox } from './components/checkbox/checkbox.d.ts';
|
|
5
7
|
export type { FormControlProps } from './components/form-control/form-control.d.ts';
|
|
6
8
|
export { default as FormControl } from './components/form-control/form-control.d.ts';
|
|
9
|
+
export type { IconProps } from './components/icon/icon.d.ts';
|
|
10
|
+
export { default as Icon } from './components/icon/icon.d.ts';
|
|
11
|
+
export type { IconCloseProps } from './icons/close/icon-close.d.ts';
|
|
12
|
+
export { default as IconClose } from './icons/close/icon-close.d.ts';
|
|
7
13
|
export type { InputProps } from './components/input/input.d.ts';
|
|
8
14
|
export { default as Input } from './components/input/input.d.ts';
|
|
9
15
|
export type { LabelProps } from './components/label/label.d.ts';
|