@oneli8/react 1.0.0-beta.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.
- package/LICENSE +202 -0
- package/NOTICE +8 -0
- package/README.md +101 -0
- package/package.json +39 -0
- package/src/Button.d.ts +20 -0
- package/src/Button.js +1 -0
- package/src/Icon.d.ts +4 -0
- package/src/Icon.js +1 -0
- package/src/IconButton.d.ts +20 -0
- package/src/IconButton.js +1 -0
- package/src/Link.d.ts +16 -0
- package/src/Link.js +1 -0
- package/src/atoms/AnchorControl.js +7 -0
- package/src/atoms/BusyIndicator.js +6 -0
- package/src/atoms/ButtonControl.js +14 -0
- package/src/atoms/Icon.js +32 -0
- package/src/atoms/IconFrame.js +19 -0
- package/src/atoms/Label.js +5 -0
- package/src/foundations/collection.js +13 -0
- package/src/foundations/runtime.js +44 -0
- package/src/index.d.ts +4 -0
- package/src/index.js +4 -0
- package/src/molecules/Button.js +21 -0
- package/src/molecules/IconButton.js +18 -0
- package/src/molecules/Link.js +14 -0
- package/styles/accessibility.css +1 -0
- package/styles/button.css +176 -0
- package/styles/gem-control-focus.css +33 -0
- package/styles/icon-button.css +42 -0
- package/styles/icon-frame.css +1 -0
- package/styles/link.css +20 -0
- package/styles.css +7 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
OneLi8 Design System (One-Li8)
|
|
2
|
+
Copyright 2026 Akshay Dhore
|
|
3
|
+
|
|
4
|
+
Created by Akshay Dhore. Includes OneLi8's Gem Morphism material treatment.
|
|
5
|
+
Inspired by Guruji Shrii Arnav and the 9x12 Way.
|
|
6
|
+
|
|
7
|
+
This product is licensed under the Apache License, Version 2.0.
|
|
8
|
+
These attribution notices are informational and do not modify the license.
|
package/README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# OneLi8 Design System
|
|
2
|
+
|
|
3
|
+
September 9, 2026 · Apache-2.0 · `1.0.0-beta.2`
|
|
4
|
+
|
|
5
|
+
OneLi8 means One Light: a modular design system created by Akshay Dhore,
|
|
6
|
+
inspired by Guruji Shrii Arnav and the 9×12 Way. This is a deliberately small
|
|
7
|
+
public beta, not a completed SaaS suite or a claim of full Figma/code certification.
|
|
8
|
+
|
|
9
|
+
## Included
|
|
10
|
+
|
|
11
|
+
- React `Icon`, `iconNames`, `Button`, `IconButton`, and `Link`.
|
|
12
|
+
- Existing Regular and Gem button treatments, without redesigning their source.
|
|
13
|
+
- Canonical editable tokens, CSS variables, JavaScript, and Tailwind adapters.
|
|
14
|
+
- Three AI skills, design principles, and explicit Button/IconButton/Link property mappings.
|
|
15
|
+
|
|
16
|
+
Other component families are not exported. The complete token vocabulary is
|
|
17
|
+
retained so its reference graph stays intact; tokens for another family do not
|
|
18
|
+
mean that family's component implementation is included. Internal shared helpers
|
|
19
|
+
are implementation details, not additional public components.
|
|
20
|
+
|
|
21
|
+
## Install into an existing React project
|
|
22
|
+
|
|
23
|
+
Requires Node 20+ and React 18+. React 18.3.1 is the tested version.
|
|
24
|
+
Unzip this bundle, then use the two local archives in `tarballs/`:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
npm install /absolute/path/to/tarballs/oneli8-tokens-1.0.0-beta.2.tgz /absolute/path/to/tarballs/oneli8-react-1.0.0-beta.2.tgz
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
These are local packages, not a claim that this version is on npm.
|
|
31
|
+
|
|
32
|
+
```jsx
|
|
33
|
+
import {Button, IconButton, Icon, Link} from '@oneli8/react';
|
|
34
|
+
import '@oneli8/react/styles.css';
|
|
35
|
+
|
|
36
|
+
export function Actions() {
|
|
37
|
+
return <div data-ol8-color-scheme="light" data-ol8-primary="blue">
|
|
38
|
+
<Button leadingIcon={<Icon name="add" />}>Add item</Button>
|
|
39
|
+
<IconButton accessibleName="Search" icon={<Icon name="search" />} />
|
|
40
|
+
<Link href="/help">Help</Link>
|
|
41
|
+
</div>;
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
This is a usage snippet, not an approved composed page. Use existing component
|
|
46
|
+
properties and tokens when arranging your product. `material="gem"` is available
|
|
47
|
+
on Button and IconButton, not Link. Test Gem content against its actual backdrop;
|
|
48
|
+
near-white content alone cannot guarantee readable contrast.
|
|
49
|
+
|
|
50
|
+
## API and tokens
|
|
51
|
+
|
|
52
|
+
The declaration files in `packages/react/src/` describe the API. Button variants
|
|
53
|
+
are primary/secondary/quiet/destructive; sizes are compact/standard/comfortable/large.
|
|
54
|
+
IconButton supports rounded/circle and requires an accessible name. Icons are
|
|
55
|
+
decorative; give meaning to their parent control. Do not pass an invented icon
|
|
56
|
+
name: choose from `iconNames`. Buttons select their shared icon size internally.
|
|
57
|
+
|
|
58
|
+
Read `packages/tokens/README.md` for theme attributes and Tailwind adapters.
|
|
59
|
+
Change editable `packages/tokens/src/` values, then run:
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
node packages/tokens/scripts/build.mjs --standalone
|
|
63
|
+
node packages/tokens/scripts/test.mjs --standalone
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
This regenerates token files, not Figma. Repack/reinstall the packages after edits.
|
|
67
|
+
Token status records describe development maturity, not public beta certification.
|
|
68
|
+
|
|
69
|
+
## AI use and free Figma mapping
|
|
70
|
+
|
|
71
|
+
Start with `AGENTS.md` and choose a task-specific skill in `skills/`. AI tools
|
|
72
|
+
that do not discover skills can read those Markdown instructions explicitly.
|
|
73
|
+
Skills guide agents; they do not force arbitrary AI tools to comply automatically.
|
|
74
|
+
|
|
75
|
+
`mappings/` contains offline translators and dated canonical property tables.
|
|
76
|
+
They accept inspected observations and return a component plan or explicit gaps.
|
|
77
|
+
No Code Connect subscription, credentials, or network access is required to run
|
|
78
|
+
them. They do not extract Figma automatically or certify visual parity. Copied
|
|
79
|
+
Figma libraries can have different IDs: inspect and update mappings, never guess.
|
|
80
|
+
|
|
81
|
+
## Validation and limits
|
|
82
|
+
|
|
83
|
+
See `BUILD-REPORT.json` and `SMOKE-REPORT.json` for this artifact's checks.
|
|
84
|
+
`SOURCE-MANIFEST.json` records hashes of reused source files. The React source
|
|
85
|
+
owners and CSS are copied unchanged; package entry points are scoped to this release.
|
|
86
|
+
|
|
87
|
+
Passing packaging, import, rendering, or mapping tests does not certify every
|
|
88
|
+
browser state, screen-reader interaction, visual match, background, or XR device.
|
|
89
|
+
Full-system synchronization remains incomplete. Report gaps rather than silently
|
|
90
|
+
recreating components. This bundle has no backend, analytics, or credentials.
|
|
91
|
+
|
|
92
|
+
## Ownership and evolution
|
|
93
|
+
|
|
94
|
+
Akshay Dhore is currently the sole creator and approver of canonical OneLi8
|
|
95
|
+
components. Apache-2.0 permits reuse and forks; upstream design approval is separate.
|
|
96
|
+
Feedback and proposals are welcome, but no contribution process or additional
|
|
97
|
+
maintainer is implied. Future releases can add fixed families incrementally.
|
|
98
|
+
See `PRINCIPLES.md`, `LICENSE` and `NOTICE`. Preserve applicable copyright and
|
|
99
|
+
attribution notices when redistributing under Apache-2.0. This does not require
|
|
100
|
+
a visible badge in your product or imply OneLi8 endorsement. Earlier MIT releases
|
|
101
|
+
retain their original permissions. This license update changes no component designs.
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@oneli8/react",
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"files": [
|
|
7
|
+
"src",
|
|
8
|
+
"styles",
|
|
9
|
+
"styles.css",
|
|
10
|
+
"README.md",
|
|
11
|
+
"LICENSE",
|
|
12
|
+
"NOTICE"
|
|
13
|
+
],
|
|
14
|
+
"sideEffects": [
|
|
15
|
+
"./styles.css",
|
|
16
|
+
"./styles/*.css"
|
|
17
|
+
],
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./src/index.d.ts",
|
|
21
|
+
"import": "./src/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./styles.css": "./styles.css",
|
|
24
|
+
"./styles/accessibility.css": "./styles/accessibility.css",
|
|
25
|
+
"./styles/icon-frame.css": "./styles/icon-frame.css",
|
|
26
|
+
"./styles/button.css": "./styles/button.css",
|
|
27
|
+
"./styles/icon-button.css": "./styles/icon-button.css",
|
|
28
|
+
"./styles/gem-control-focus.css": "./styles/gem-control-focus.css",
|
|
29
|
+
"./styles/link.css": "./styles/link.css"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"react": ">=18"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@oneli8/tokens": "1.0.0-beta.2"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {"access":"public","tag":"beta"},
|
|
38
|
+
"repository": {"type":"git","url":"git+https://github.com/Akshay007ad/OneLi8-Design-System.git","directory":"packages/react"}
|
|
39
|
+
}
|
package/src/Button.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type {ButtonHTMLAttributes, ReactNode} from "react";
|
|
2
|
+
|
|
3
|
+
export type ButtonVariant="primary"|"secondary"|"quiet"|"destructive";
|
|
4
|
+
export type ButtonSize="compact"|"standard"|"comfortable"|"large";
|
|
5
|
+
export type ButtonIconMotion="none"|"rotate"|"forward"|"backward";
|
|
6
|
+
export type ButtonMaterial="regular"|"gem";
|
|
7
|
+
|
|
8
|
+
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>,"size">{
|
|
9
|
+
variant?:ButtonVariant;
|
|
10
|
+
size?:ButtonSize;
|
|
11
|
+
material?:ButtonMaterial;
|
|
12
|
+
loading?:boolean;
|
|
13
|
+
pressed?:boolean;
|
|
14
|
+
leadingIcon?:ReactNode;
|
|
15
|
+
trailingIcon?:ReactNode;
|
|
16
|
+
iconMotion?:ButtonIconMotion;
|
|
17
|
+
fullWidth?:boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps&import("react").RefAttributes<HTMLButtonElement>>;
|
package/src/Button.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {Button} from "./molecules/Button.js";
|
package/src/Icon.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type IconName="add"|"forward"|"critical"|"visibility-open"|"loading"|"caution"|"positive"|"informative"|"visibility-closed"|"chevron-down"|"chevron-up"|"search"|"clear"|"close"|"selection-check"|"selection-mixed"|"selection-dot";
|
|
2
|
+
export interface IconProps{name:IconName;className?:string}
|
|
3
|
+
export declare const iconNames:readonly IconName[];
|
|
4
|
+
export declare function Icon(props:IconProps):import("react").ReactNode;
|
package/src/Icon.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {Icon,iconNames} from "./atoms/Icon.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type {ButtonHTMLAttributes,ReactNode} from "react";
|
|
2
|
+
import type {ButtonSize,ButtonVariant} from "./Button.js";
|
|
3
|
+
|
|
4
|
+
export type IconButtonShape="rounded"|"circle";
|
|
5
|
+
export type IconButtonMaterial="regular"|"gem";
|
|
6
|
+
export type IconButtonMotion="system"|"none";
|
|
7
|
+
|
|
8
|
+
export interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>,"children"|"size">{
|
|
9
|
+
icon:ReactNode;
|
|
10
|
+
accessibleName:string;
|
|
11
|
+
variant?:ButtonVariant;
|
|
12
|
+
size?:ButtonSize;
|
|
13
|
+
shape?:IconButtonShape;
|
|
14
|
+
material?:IconButtonMaterial;
|
|
15
|
+
loading?:boolean;
|
|
16
|
+
pressed?:boolean;
|
|
17
|
+
motion?:IconButtonMotion;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export declare const IconButton:import("react").ForwardRefExoticComponent<IconButtonProps&import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {IconButton} from "./molecules/IconButton.js";
|
package/src/Link.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type {AnchorHTMLAttributes,HTMLAttributes,ReactNode} from "react";
|
|
2
|
+
|
|
3
|
+
export type LinkForm="inline"|"standalone"|"navigation";
|
|
4
|
+
export type LinkSize="small"|"standard"|"large"|"inherit";
|
|
5
|
+
export type LinkCurrent="page"|"step"|"location"|"date"|"time"|"true"|boolean;
|
|
6
|
+
export type LinkMotion="system"|"none";
|
|
7
|
+
|
|
8
|
+
export interface LinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>,"href">{
|
|
9
|
+
href:string;
|
|
10
|
+
form?:LinkForm;
|
|
11
|
+
size?:LinkSize;
|
|
12
|
+
current?:LinkCurrent;
|
|
13
|
+
motion?:LinkMotion;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export declare const Link:import("react").ForwardRefExoticComponent<LinkProps&import("react").RefAttributes<HTMLAnchorElement>>;
|
package/src/Link.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {Link} from "./molecules/Link.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import {createElement,forwardRef} from "react";
|
|
2
|
+
import {cx} from "../foundations/runtime.js";
|
|
3
|
+
|
|
4
|
+
export const AnchorControl=forwardRef(function AnchorControl({href,current,className="",children,...rest},ref){
|
|
5
|
+
if(typeof href!=="string"||!href.trim())throw new TypeError("Link requires a non-empty href.");
|
|
6
|
+
return createElement("a",{...rest,ref,href,"aria-current":current||undefined,className:cx("ol8-AnchorControl",className)},children);
|
|
7
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {createElement,forwardRef} from "react";
|
|
2
|
+
import {cx,valid} from "../foundations/runtime.js";
|
|
3
|
+
|
|
4
|
+
export const buttonVariants=new Set(["primary","secondary","quiet","destructive"]);
|
|
5
|
+
export const buttonSizes=new Set(["compact","standard","comfortable","large"]);
|
|
6
|
+
export const buttonMaterials=new Set(["regular","gem"]);
|
|
7
|
+
|
|
8
|
+
export const ButtonControl=forwardRef(function ButtonControl({as="button",baseClass,variant="primary",size="comfortable",material="regular",loading=false,disabled=false,pressed,className="",type="button",onClick,children,...rest},ref){
|
|
9
|
+
const toggleProps=typeof pressed==="boolean"?{"aria-pressed":pressed}:{};
|
|
10
|
+
const handleClick=event=>{if(loading){event.preventDefault();event.stopPropagation();return;}onClick?.(event)};
|
|
11
|
+
return createElement(as,{...rest,...toggleProps,ref,type,disabled,"aria-busy":loading||undefined,"aria-disabled":loading||disabled||undefined,
|
|
12
|
+
"data-ol8-variant":valid(buttonVariants,variant,"primary"),"data-ol8-size":valid(buttonSizes,size,"comfortable"),"data-ol8-material":valid(buttonMaterials,material,"regular"),
|
|
13
|
+
className:cx(baseClass,className),onClick:handleClick},children);
|
|
14
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {createElement} from "react";
|
|
2
|
+
|
|
3
|
+
const definitions={
|
|
4
|
+
"add":[["path",{d:"M12 5V19M5 12H19"}]],
|
|
5
|
+
"forward":[["path",{d:"M3 12H21M15 18L21 12L15 6"}]],
|
|
6
|
+
"critical":[["circle",{cx:12,cy:12,r:9}],["path",{d:"M9 9L15 15M15 9L9 15"}]],
|
|
7
|
+
"visibility-open":[["path",{d:"M3 12C5.25 8.25 8.25 6.375 12 6.375C15.75 6.375 18.75 8.25 21 12C18.75 15.75 15.75 17.625 12 17.625C8.25 17.625 5.25 15.75 3 12Z"}],["circle",{cx:12,cy:12,r:2.625}]],
|
|
8
|
+
"loading":[["path",{d:"M12 3C14.082 2.998 16.101 3.718 17.712 5.038C19.322 6.358 20.426 8.195 20.834 10.237C21.241 12.279 20.929 14.399 19.949 16.236C18.968 18.074 17.382 19.514 15.458 20.312C13.535 21.111 11.395 21.217 9.402 20.614C7.409 20.011 5.686 18.736 4.528 17.005C3.37 15.275 2.848 13.196 3.051 11.124C3.253 9.051 4.169 7.113 5.64 5.64"}]],
|
|
9
|
+
"caution":[["circle",{cx:12,cy:12,r:9}],["path",{d:"M12 7V13"}],["circle",{cx:12,cy:16.6,r:1,fill:"currentColor",stroke:"none"}]],
|
|
10
|
+
"positive":[["circle",{cx:12,cy:12,r:9}],["path",{d:"M7.6 12.2L10.6 15.2L16.6 9.2"}]],
|
|
11
|
+
"informative":[["circle",{cx:12,cy:12,r:9}],["path",{d:"M12 11V16"}],["circle",{cx:12,cy:7.6,r:1,fill:"currentColor",stroke:"none"}]],
|
|
12
|
+
"visibility-closed":[["path",{d:"M4.5 10.5C6.75 13.5 9.25 15 12 15C14.75 15 17.25 13.5 19.5 10.5M6.75 13.05L5.4 15M9.75 14.55L9.3 16.8M14.25 14.55L14.7 16.8M17.25 13.05L18.6 15"}]],
|
|
13
|
+
"chevron-down":[["path",{d:"M5 8.5L12 15.5L19 8.5"}]],
|
|
14
|
+
"chevron-up":[["path",{d:"M5 15.5L12 8.5L19 15.5"}]],
|
|
15
|
+
"search":[["path",{d:"M15 15L20 20M10 3C6.134 3 3 6.134 3 10C3 13.866 6.134 17 10 17C13.866 17 17 13.866 17 10C17 6.134 13.866 3 10 3Z"}]],
|
|
16
|
+
"clear":[["path",{d:"M5 5L19 19M19 5L5 19"}]],
|
|
17
|
+
"close":[["path",{d:"M6 6L18 18M18 6L6 18"}]],
|
|
18
|
+
"selection-check":[["path",{d:"M6.9 12.15L10.2 15.45L17.1 8.55"}]],
|
|
19
|
+
"selection-mixed":[["path",{d:"M7.5 12H16.5"}]],
|
|
20
|
+
"selection-dot":[["circle",{cx:12,cy:12,r:6,fill:"currentColor",stroke:"none"}]]
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const iconNames=Object.freeze(Object.keys(definitions));
|
|
24
|
+
|
|
25
|
+
export function Icon({name,className=""}){
|
|
26
|
+
const definition=definitions[name];
|
|
27
|
+
if(!definition)return null;
|
|
28
|
+
return createElement("svg",{className:["ol8-Icon",className].filter(Boolean).join(" "),viewBox:"0 0 24 24",fill:"none",
|
|
29
|
+
stroke:"currentColor",strokeWidth:"var(--ol8-component-icon-stroke)",strokeLinecap:"round",strokeLinejoin:"round",
|
|
30
|
+
"data-ol8-icon":name,"aria-hidden":"true",focusable:"false"},
|
|
31
|
+
...definition.map(([element,props],index)=>createElement(element,{vectorEffect:props.stroke==="none"?undefined:"non-scaling-stroke",...props,key:index})));
|
|
32
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {createElement} from "react";
|
|
2
|
+
|
|
3
|
+
const presentations=new Set(["micro","compact","small","standard","medium","large","xlarge","spacious","display","hero","landmark"]);
|
|
4
|
+
|
|
5
|
+
export function iconFrameSizeForControl(size,{large="standard"}={}){
|
|
6
|
+
if(size==="compact"||size==="standard")return "small";
|
|
7
|
+
if(size==="large")return large;
|
|
8
|
+
return "standard";
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function iconFrameSizeForChoice(size){
|
|
12
|
+
return size==="comfortable"||size==="large"?"compact":"micro";
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function IconFrame({children,className="ol8-NavigationItem__icon",size="standard"}){
|
|
16
|
+
if(!children)return null;
|
|
17
|
+
const resolvedSize=presentations.has(size)?size:"standard";
|
|
18
|
+
return createElement("span",{className:["ol8-IconFrame",className].filter(Boolean).join(" "),"data-ol8-icon-size":resolvedSize,"aria-hidden":"true"},children);
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const enabledIndexes=items=>items.map((item,index)=>item.disabled?null:index).filter(index=>index!==null);
|
|
2
|
+
|
|
3
|
+
export const nextEnabled=(items,current,direction)=>{
|
|
4
|
+
const enabled=enabledIndexes(items);
|
|
5
|
+
if(!enabled.length)return current;
|
|
6
|
+
const position=Math.max(0,enabled.indexOf(current));
|
|
7
|
+
return enabled[(position+direction+enabled.length)%enabled.length];
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const rovingIndex=(items,value)=>{
|
|
11
|
+
const selected=items.findIndex(item=>item.value===value&&!item.disabled);
|
|
12
|
+
return selected>=0?selected:(enabledIndexes(items)[0]??-1);
|
|
13
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {useEffect,useState} from "react";
|
|
2
|
+
export {enabledIndexes,nextEnabled,rovingIndex} from "./collection.js";
|
|
3
|
+
|
|
4
|
+
export const navigationSizes=new Set(["compact","standard","comfortable","large"]);
|
|
5
|
+
export const navigationMaterials=new Set(["regular","gem"]);
|
|
6
|
+
export const tabHierarchies=new Set(["primary","secondary","tertiary"]);
|
|
7
|
+
export const tabOrientations=new Set(["horizontal","vertical"]);
|
|
8
|
+
export const tabActivations=new Set(["automatic","manual"]);
|
|
9
|
+
export const tabOverflows=new Set(["none","scroll"]);
|
|
10
|
+
export const segmentBehaviors=new Set(["single","multi","momentary"]);
|
|
11
|
+
export const segmentPresentations=new Set(["fill","line","outline","pill","icons","stacked"]);
|
|
12
|
+
export const segmentWidths=new Set(["equal","content"]);
|
|
13
|
+
export const tabBarPresentations=new Set(["bottom","inline","sidebar","spatial"]);
|
|
14
|
+
export const choiceSizes=navigationSizes;
|
|
15
|
+
export const choiceMaterials=navigationMaterials;
|
|
16
|
+
|
|
17
|
+
export const valid=(set,value,fallback)=>set.has(value)?value:fallback;
|
|
18
|
+
export const cx=(...values)=>values.filter(Boolean).join(" ");
|
|
19
|
+
export const assignRef=(ref,value)=>{if(typeof ref==="function")ref(value);else if(ref)ref.current=value;};
|
|
20
|
+
export function useControllableValue(value,defaultValue,onValueChange){
|
|
21
|
+
const [internal,setInternal]=useState(defaultValue);
|
|
22
|
+
const controlled=value!==undefined;
|
|
23
|
+
const selected=controlled?value:internal;
|
|
24
|
+
const setSelected=next=>{
|
|
25
|
+
if(!controlled)setInternal(next);
|
|
26
|
+
onValueChange?.(next);
|
|
27
|
+
};
|
|
28
|
+
return [selected,setSelected];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function useNativeCheckedState(checked,defaultChecked,inputRef){
|
|
32
|
+
const controlled=checked!==undefined;
|
|
33
|
+
const [internal,setInternal]=useState(Boolean(defaultChecked));
|
|
34
|
+
useEffect(()=>{
|
|
35
|
+
if(controlled)return;
|
|
36
|
+
const input=inputRef.current;
|
|
37
|
+
const form=input?.form;
|
|
38
|
+
if(!form)return;
|
|
39
|
+
const synchronize=()=>queueMicrotask(()=>setInternal(Boolean(input.checked)));
|
|
40
|
+
form.addEventListener("reset",synchronize);
|
|
41
|
+
return ()=>form.removeEventListener("reset",synchronize);
|
|
42
|
+
},[controlled,inputRef]);
|
|
43
|
+
return [controlled?Boolean(checked):internal,next=>{if(!controlled)setInternal(Boolean(next))}];
|
|
44
|
+
}
|
package/src/index.d.ts
ADDED
package/src/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {createElement,forwardRef} from "react";
|
|
2
|
+
import {BusyIndicator} from "../atoms/BusyIndicator.js";
|
|
3
|
+
import {ButtonControl} from "../atoms/ButtonControl.js";
|
|
4
|
+
import {IconFrame,iconFrameSizeForControl} from "../atoms/IconFrame.js";
|
|
5
|
+
|
|
6
|
+
const motions=new Set(["none","rotate","forward","backward"]);
|
|
7
|
+
|
|
8
|
+
export const Button=forwardRef(function Button({
|
|
9
|
+
children,variant="primary",size="comfortable",material="regular",loading=false,disabled=false,pressed,
|
|
10
|
+
leadingIcon,trailingIcon,iconMotion="none",fullWidth=false,className="",type="button",onClick,...rest
|
|
11
|
+
},ref){
|
|
12
|
+
const resolvedMotion=motions.has(iconMotion)?iconMotion:"none";
|
|
13
|
+
const iconSize=iconFrameSizeForControl(size);
|
|
14
|
+
const content=[];
|
|
15
|
+
if(leadingIcon)content.push(createElement(IconFrame,{className:"ol8-Button__icon",size:iconSize,key:"leading"},leadingIcon));
|
|
16
|
+
if(loading)content.push(createElement(BusyIndicator,{className:"ol8-Button__status",key:"status"}));
|
|
17
|
+
content.push(createElement("span",{className:"ol8-Button__label",key:"label"},children));
|
|
18
|
+
if(trailingIcon)content.push(createElement(IconFrame,{className:"ol8-Button__icon",size:iconSize,key:"trailing"},trailingIcon));
|
|
19
|
+
return createElement(ButtonControl,{...rest,ref,type,disabled,loading,pressed,variant,size,material,className,baseClass:"ol8-Button",onClick,
|
|
20
|
+
"data-ol8-icon-motion":resolvedMotion,"data-ol8-full-width":fullWidth||undefined},content);
|
|
21
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {createElement,forwardRef} from "react";
|
|
2
|
+
import {BusyIndicator} from "../atoms/BusyIndicator.js";
|
|
3
|
+
import {ButtonControl} from "../atoms/ButtonControl.js";
|
|
4
|
+
import {IconFrame,iconFrameSizeForControl} from "../atoms/IconFrame.js";
|
|
5
|
+
|
|
6
|
+
const shapes=new Set(["rounded","circle"]);
|
|
7
|
+
const motions=new Set(["system","none"]);
|
|
8
|
+
|
|
9
|
+
export const IconButton=forwardRef(function IconButton({icon,accessibleName,variant="quiet",size="comfortable",shape="rounded",material="regular",loading=false,disabled=false,pressed,motion="system",className="",...rest},ref){
|
|
10
|
+
if(typeof accessibleName!=="string"||!accessibleName.trim())throw new TypeError("IconButton requires a non-empty accessibleName.");
|
|
11
|
+
if(!icon&&!loading)throw new TypeError("IconButton requires icon artwork when it is not loading.");
|
|
12
|
+
const iconSize=iconFrameSizeForControl(size,{large:"large"});
|
|
13
|
+
const content=loading?createElement(BusyIndicator,{className:"ol8-IconButton__status"}):createElement(IconFrame,{className:"ol8-IconButton__icon",size:iconSize},icon);
|
|
14
|
+
return createElement(ButtonControl,{...rest,ref,baseClass:"ol8-IconButton",variant,size,material,loading,disabled,pressed,className,"aria-label":accessibleName,
|
|
15
|
+
"data-ol8-shape":shapes.has(shape)?shape:"rounded","data-ol8-motion":motions.has(motion)?motion:"system"},
|
|
16
|
+
createElement("span",{className:"ol8-IconButton__surface","aria-hidden":"true"},content)
|
|
17
|
+
);
|
|
18
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {createElement,forwardRef} from "react";
|
|
2
|
+
import {AnchorControl} from "../atoms/AnchorControl.js";
|
|
3
|
+
import {Label} from "../atoms/Label.js";
|
|
4
|
+
|
|
5
|
+
const forms=new Set(["inline","standalone","navigation"]);
|
|
6
|
+
const sizes=new Set(["small","standard","large","inherit"]);
|
|
7
|
+
const motions=new Set(["system","none"]);
|
|
8
|
+
|
|
9
|
+
export const Link=forwardRef(function Link({children,href,form="inline",size="standard",current,motion="system",className="",...rest},ref){
|
|
10
|
+
return createElement(AnchorControl,{...rest,ref,href,current,className:["ol8-Link",className].filter(Boolean).join(" "),
|
|
11
|
+
"data-ol8-form":forms.has(form)?form:"inline","data-ol8-size":sizes.has(size)?size:"standard","data-ol8-motion":motions.has(motion)?motion:"system"},
|
|
12
|
+
createElement(Label,{className:"ol8-Link__label"},children)
|
|
13
|
+
);
|
|
14
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ol8-LiveRegion{position:absolute;inline-size:var(--ol8-border-width-hairline);block-size:var(--ol8-border-width-hairline);margin:calc(var(--ol8-border-width-hairline)*-1);overflow:hidden;clip-path:inset(50%);white-space:nowrap}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
|
|
2
|
+
.ol8-Button{
|
|
3
|
+
position:relative;
|
|
4
|
+
display:inline-flex;
|
|
5
|
+
align-items:center;
|
|
6
|
+
justify-content:center;
|
|
7
|
+
gap:var(--ol8-component-button-gap-comfortable);
|
|
8
|
+
min-inline-size:var(--ol8-component-button-target-comfortable);
|
|
9
|
+
border-style:solid;
|
|
10
|
+
border-color:transparent;
|
|
11
|
+
font-family:var(--ol8-font-family-functional);
|
|
12
|
+
font-weight:var(--ol8-font-weight-semibold);
|
|
13
|
+
text-align:center;
|
|
14
|
+
text-decoration:none;
|
|
15
|
+
white-space:nowrap;
|
|
16
|
+
cursor:pointer;
|
|
17
|
+
box-shadow:var(--ol8-elevation-surface-flat);
|
|
18
|
+
transition-property:background-color,border-color,color,box-shadow;
|
|
19
|
+
transition-duration:var(--ol8-motion-interaction-hover-duration);
|
|
20
|
+
transition-timing-function:var(--ol8-motion-interaction-hover-timing-function);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ol8-Button::before{
|
|
24
|
+
content:"";
|
|
25
|
+
position:absolute;
|
|
26
|
+
inset-block-start:50%;
|
|
27
|
+
inset-inline-start:50%;
|
|
28
|
+
inline-size:max(100%,var(--ol8-component-button-target-comfortable));
|
|
29
|
+
block-size:max(100%,var(--ol8-component-button-target-comfortable));
|
|
30
|
+
transform:translate(-50%,-50%);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.ol8-Button[data-ol8-size="compact"]{
|
|
34
|
+
min-block-size:var(--ol8-component-button-height-compact);
|
|
35
|
+
padding-inline:var(--ol8-component-button-padding-inline-compact);
|
|
36
|
+
border-radius:var(--ol8-component-button-radius-compact);
|
|
37
|
+
gap:var(--ol8-component-button-gap-compact);
|
|
38
|
+
font-size:var(--ol8-typography-body-small-font-size);
|
|
39
|
+
line-height:var(--ol8-typography-body-small-line-height);
|
|
40
|
+
letter-spacing:var(--ol8-typography-body-small-letter-spacing);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ol8-Button[data-ol8-size="standard"]{
|
|
44
|
+
gap:var(--ol8-component-button-gap-compact);
|
|
45
|
+
min-block-size:var(--ol8-component-button-height-standard);
|
|
46
|
+
padding-inline:var(--ol8-component-button-padding-inline-standard);
|
|
47
|
+
border-radius:var(--ol8-component-button-radius-standard);
|
|
48
|
+
font-size:var(--ol8-typography-body-medium-font-size);
|
|
49
|
+
line-height:var(--ol8-typography-body-medium-line-height);
|
|
50
|
+
letter-spacing:var(--ol8-typography-body-medium-letter-spacing);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ol8-Button[data-ol8-size="comfortable"]{
|
|
54
|
+
min-block-size:var(--ol8-component-button-height-comfortable);
|
|
55
|
+
padding-inline:var(--ol8-component-button-padding-inline-comfortable);
|
|
56
|
+
border-radius:var(--ol8-component-button-radius-comfortable);
|
|
57
|
+
font-size:var(--ol8-typography-body-medium-font-size);
|
|
58
|
+
line-height:var(--ol8-typography-body-medium-line-height);
|
|
59
|
+
letter-spacing:var(--ol8-typography-body-medium-letter-spacing);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ol8-Button[data-ol8-size="large"]{
|
|
63
|
+
min-block-size:var(--ol8-component-button-height-large);
|
|
64
|
+
min-inline-size:var(--ol8-component-button-target-large);
|
|
65
|
+
padding-inline:var(--ol8-component-button-padding-inline-large);
|
|
66
|
+
border-radius:var(--ol8-component-button-radius-large);
|
|
67
|
+
font-size:var(--ol8-typography-body-large-font-size);
|
|
68
|
+
line-height:var(--ol8-typography-body-large-line-height);
|
|
69
|
+
letter-spacing:var(--ol8-typography-body-large-letter-spacing);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.ol8-Button[data-ol8-size="large"]::before{
|
|
73
|
+
inline-size:max(100%,var(--ol8-component-button-target-large));
|
|
74
|
+
block-size:max(100%,var(--ol8-component-button-target-large));
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.ol8-Button[data-ol8-full-width="true"]{inline-size:100%}
|
|
78
|
+
|
|
79
|
+
.ol8-Button[data-ol8-variant="primary"]{
|
|
80
|
+
border-width:var(--ol8-border-width-none);
|
|
81
|
+
background:var(--ol8-color-action-primary-default);
|
|
82
|
+
color:var(--ol8-color-action-primary-content);
|
|
83
|
+
}
|
|
84
|
+
.ol8-Button[data-ol8-variant="secondary"]{
|
|
85
|
+
border-width:var(--ol8-component-button-secondary-boundary);
|
|
86
|
+
background:var(--ol8-color-action-secondary-surface-default);
|
|
87
|
+
border-color:var(--ol8-color-action-secondary-content-default);
|
|
88
|
+
color:var(--ol8-color-action-secondary-content-default);
|
|
89
|
+
}
|
|
90
|
+
.ol8-Button[data-ol8-variant="quiet"]{
|
|
91
|
+
border-width:var(--ol8-border-width-none);
|
|
92
|
+
background:var(--ol8-color-action-quiet-surface-default);
|
|
93
|
+
color:var(--ol8-color-action-quiet-content-default);
|
|
94
|
+
}
|
|
95
|
+
.ol8-Button[data-ol8-variant="destructive"]{
|
|
96
|
+
border-width:var(--ol8-border-width-none);
|
|
97
|
+
background:var(--ol8-color-action-destructive-default);
|
|
98
|
+
color:var(--ol8-color-action-destructive-content);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.ol8-Button[data-ol8-variant="primary"]:hover:not(:disabled):not([aria-busy="true"]){background:var(--ol8-color-action-primary-hover);box-shadow:var(--ol8-elevation-surface-raised)}
|
|
102
|
+
.ol8-Button[data-ol8-variant="secondary"]:hover:not(:disabled):not([aria-busy="true"]){background:var(--ol8-color-action-secondary-surface-hover);border-color:var(--ol8-color-action-secondary-content-hover);color:var(--ol8-color-action-secondary-content-hover);box-shadow:var(--ol8-elevation-surface-raised)}
|
|
103
|
+
.ol8-Button[data-ol8-variant="quiet"]:hover:not(:disabled):not([aria-busy="true"]){background:var(--ol8-color-action-quiet-surface-hover);color:var(--ol8-color-action-quiet-content-hover)}
|
|
104
|
+
.ol8-Button[data-ol8-variant="destructive"]:hover:not(:disabled):not([aria-busy="true"]){background:var(--ol8-color-action-destructive-hover);box-shadow:var(--ol8-elevation-surface-raised)}
|
|
105
|
+
|
|
106
|
+
.ol8-Button[data-ol8-variant="primary"]:active:not(:disabled):not([aria-busy="true"]){background:var(--ol8-color-action-primary-pressed);box-shadow:var(--ol8-elevation-surface-flat)}
|
|
107
|
+
.ol8-Button[data-ol8-variant="secondary"]:active:not(:disabled):not([aria-busy="true"]){background:var(--ol8-color-action-secondary-surface-pressed);border-color:var(--ol8-color-action-secondary-content-pressed);color:var(--ol8-color-action-secondary-content-pressed);box-shadow:var(--ol8-elevation-surface-flat)}
|
|
108
|
+
.ol8-Button[data-ol8-variant="quiet"]:active:not(:disabled):not([aria-busy="true"]){background:var(--ol8-color-action-quiet-surface-pressed);color:var(--ol8-color-action-quiet-content-pressed)}
|
|
109
|
+
.ol8-Button[data-ol8-variant="destructive"]:active:not(:disabled):not([aria-busy="true"]){background:var(--ol8-color-action-destructive-pressed);box-shadow:var(--ol8-elevation-surface-flat)}
|
|
110
|
+
|
|
111
|
+
.ol8-Button:focus-visible{
|
|
112
|
+
outline:none;
|
|
113
|
+
box-shadow:inset 0 0 0 var(--ol8-focus-ring-inner-width) var(--ol8-color-focus-inner),inset 0 0 0 var(--ol8-focus-ring-total-width) var(--ol8-color-focus-outer);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.ol8-Button[data-ol8-material="gem"][data-ol8-variant="primary"]{border-width:0;background:linear-gradient(135deg,var(--ol8-material-control-gem-primary-start),var(--ol8-material-control-gem-primary-mid),var(--ol8-material-control-gem-primary-end));color:var(--ol8-material-control-gem-primary-content);box-shadow:inset 0 0 0 var(--ol8-component-choice-optical-stroke) var(--ol8-material-control-gem-rim-default),var(--ol8-elevation-surface-raised);backdrop-filter:blur(var(--ol8-material-control-gem-blur))}
|
|
117
|
+
.ol8-Button[data-ol8-material="gem"][data-ol8-variant="secondary"]{border-width:0;background:linear-gradient(135deg,var(--ol8-material-control-gem-secondary-high),var(--ol8-material-control-gem-secondary-mid),var(--ol8-material-control-gem-secondary-low));color:var(--ol8-material-control-gem-secondary-content);box-shadow:inset 0 0 0 var(--ol8-component-choice-optical-stroke) var(--ol8-material-control-gem-rim-default),var(--ol8-elevation-surface-raised);backdrop-filter:blur(var(--ol8-material-control-gem-blur))}
|
|
118
|
+
.ol8-Button[data-ol8-material="gem"][data-ol8-variant="primary"]:hover:not(:disabled):not([aria-busy="true"]){background:linear-gradient(135deg,var(--ol8-material-control-gem-primary-hover-start),var(--ol8-material-control-gem-primary-hover-mid),var(--ol8-material-control-gem-primary-hover-end))}
|
|
119
|
+
.ol8-Button[data-ol8-material="gem"][data-ol8-variant="secondary"]:hover:not(:disabled):not([aria-busy="true"]){background:linear-gradient(135deg,var(--ol8-material-control-gem-secondary-hover-high),var(--ol8-material-control-gem-secondary-hover-mid),var(--ol8-material-control-gem-secondary-hover-low));color:var(--ol8-material-control-gem-secondary-content)}
|
|
120
|
+
.ol8-Button[data-ol8-material="gem"][data-ol8-variant="primary"][aria-busy="true"]{background:linear-gradient(135deg,var(--ol8-material-control-gem-primary-loading-start),var(--ol8-material-control-gem-primary-loading-mid),var(--ol8-material-control-gem-primary-loading-end));color:var(--ol8-material-control-gem-primary-content)}
|
|
121
|
+
.ol8-Button[data-ol8-material="gem"][data-ol8-variant="secondary"][aria-busy="true"]{background:linear-gradient(135deg,var(--ol8-material-control-gem-secondary-loading-high),var(--ol8-material-control-gem-secondary-loading-mid),var(--ol8-material-control-gem-secondary-loading-low));color:var(--ol8-material-control-gem-secondary-content)}
|
|
122
|
+
|
|
123
|
+
.ol8-Button:disabled,.ol8-Button[aria-busy="true"]{cursor:not-allowed;box-shadow:var(--ol8-elevation-surface-flat)}
|
|
124
|
+
.ol8-Button[aria-busy="true"]{cursor:wait}
|
|
125
|
+
.ol8-Button[data-ol8-variant="primary"]:disabled,.ol8-Button[data-ol8-variant="primary"][aria-busy="true"]{background:var(--ol8-color-action-primary-disabled);color:var(--ol8-color-action-primary-disabled-content)}
|
|
126
|
+
.ol8-Button[data-ol8-variant="secondary"]:disabled,.ol8-Button[data-ol8-variant="secondary"][aria-busy="true"]{background:var(--ol8-color-action-secondary-surface-disabled);border-color:var(--ol8-color-action-secondary-content-disabled);color:var(--ol8-color-action-secondary-content-disabled)}
|
|
127
|
+
.ol8-Button[data-ol8-variant="quiet"]:disabled,.ol8-Button[data-ol8-variant="quiet"][aria-busy="true"]{background:var(--ol8-color-action-quiet-surface-disabled);color:var(--ol8-color-action-quiet-content-disabled)}
|
|
128
|
+
.ol8-Button[data-ol8-variant="destructive"]:disabled,.ol8-Button[data-ol8-variant="destructive"][aria-busy="true"]{background:var(--ol8-color-action-destructive-disabled);color:var(--ol8-color-action-destructive-disabled-content)}
|
|
129
|
+
|
|
130
|
+
/* Canonical Gem masters use the hover recipe for Pressed, including keyboard
|
|
131
|
+
activation without pointer hover. Disabled wins over material and loading. */
|
|
132
|
+
.ol8-Button[data-ol8-material="gem"][data-ol8-variant="primary"]:active:not(:disabled):not([aria-busy="true"]){background:linear-gradient(135deg,var(--ol8-material-control-gem-primary-hover-start),var(--ol8-material-control-gem-primary-hover-mid),var(--ol8-material-control-gem-primary-hover-end))}
|
|
133
|
+
.ol8-Button[data-ol8-material="gem"][data-ol8-variant="secondary"]:active:not(:disabled):not([aria-busy="true"]){background:linear-gradient(135deg,var(--ol8-material-control-gem-secondary-hover-high),var(--ol8-material-control-gem-secondary-hover-mid),var(--ol8-material-control-gem-secondary-hover-low))}
|
|
134
|
+
.ol8-Button[data-ol8-material="gem"][data-ol8-variant="primary"]:disabled{background:var(--ol8-color-action-primary-disabled);color:var(--ol8-color-action-primary-disabled-content);box-shadow:var(--ol8-elevation-surface-flat);backdrop-filter:none}
|
|
135
|
+
.ol8-Button[data-ol8-material="gem"][data-ol8-variant="secondary"]:disabled{background:var(--ol8-color-action-secondary-surface-disabled);color:var(--ol8-color-action-secondary-content-disabled);box-shadow:var(--ol8-elevation-surface-flat);backdrop-filter:none}
|
|
136
|
+
|
|
137
|
+
.ol8-Button__icon{
|
|
138
|
+
display:inline-grid;
|
|
139
|
+
place-items:center;
|
|
140
|
+
flex:none;
|
|
141
|
+
inline-size:var(--ol8-component-button-icon-compact);
|
|
142
|
+
block-size:var(--ol8-component-button-icon-compact);
|
|
143
|
+
transition:transform var(--ol8-motion-interaction-hover-duration) var(--ol8-motion-interaction-hover-timing-function);
|
|
144
|
+
}
|
|
145
|
+
.ol8-Button[data-ol8-size="comfortable"] .ol8-Button__icon,.ol8-Button[data-ol8-size="large"] .ol8-Button__icon{inline-size:var(--ol8-component-button-icon-comfortable);block-size:var(--ol8-component-button-icon-comfortable)}
|
|
146
|
+
.ol8-Button__icon>svg{inline-size:100%;block-size:100%}
|
|
147
|
+
.ol8-Button[data-ol8-icon-motion="rotate"]:hover:not(:disabled):not([aria-busy="true"]) .ol8-Button__icon{transform:rotate(-30deg)}
|
|
148
|
+
.ol8-Button[data-ol8-icon-motion="forward"]:hover:not(:disabled):not([aria-busy="true"]) .ol8-Button__icon{transform:translateX(var(--ol8-motion-distance-minimal))}
|
|
149
|
+
.ol8-Button[data-ol8-icon-motion="backward"]:hover:not(:disabled):not([aria-busy="true"]) .ol8-Button__icon{transform:translateX(calc(var(--ol8-motion-distance-minimal) * -1))}
|
|
150
|
+
.ol8-Button:dir(rtl)[data-ol8-icon-motion="forward"]:hover:not(:disabled):not([aria-busy="true"]) .ol8-Button__icon{transform:translateX(calc(var(--ol8-motion-distance-minimal) * -1))}
|
|
151
|
+
.ol8-Button:dir(rtl)[data-ol8-icon-motion="backward"]:hover:not(:disabled):not([aria-busy="true"]) .ol8-Button__icon{transform:translateX(var(--ol8-motion-distance-minimal))}
|
|
152
|
+
|
|
153
|
+
.ol8-Button__status{
|
|
154
|
+
flex:none;
|
|
155
|
+
inline-size:var(--ol8-component-button-icon-compact);
|
|
156
|
+
block-size:var(--ol8-component-button-icon-compact);
|
|
157
|
+
animation:ol8-Button-spin var(--ol8-motion-duration-deliberate) var(--ol8-motion-easing-linear) infinite;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@keyframes ol8-Button-spin{to{transform:rotate(1turn)}}
|
|
161
|
+
.ol8-Button[data-ol8-size="comfortable"] .ol8-Button__status,.ol8-Button[data-ol8-size="large"] .ol8-Button__status{inline-size:var(--ol8-component-button-icon-comfortable);block-size:var(--ol8-component-button-icon-comfortable)}
|
|
162
|
+
|
|
163
|
+
@media (prefers-reduced-motion:reduce){
|
|
164
|
+
.ol8-Button,.ol8-Button__icon{transition-duration:var(--ol8-motion-duration-instant)}
|
|
165
|
+
.ol8-Button__status{animation:none}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@media (prefers-reduced-transparency:reduce){
|
|
169
|
+
.ol8-Button[data-ol8-material="gem"][data-ol8-variant="primary"]{background:var(--ol8-color-action-primary-default);backdrop-filter:none}
|
|
170
|
+
.ol8-Button[data-ol8-material="gem"][data-ol8-variant="secondary"]{background:var(--ol8-color-surface-raised);border:var(--ol8-component-button-secondary-boundary) solid var(--ol8-color-action-secondary-content-default);color:var(--ol8-color-action-secondary-content-default);backdrop-filter:none}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
@media (forced-colors:active){
|
|
174
|
+
.ol8-Button{forced-color-adjust:auto}
|
|
175
|
+
.ol8-Button:focus-visible{outline:var(--ol8-focus-ring-inner-width) solid Highlight;outline-offset:var(--ol8-focus-ring-offset);box-shadow:none}
|
|
176
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* Shared private material treatment for ButtonControl consumers.
|
|
2
|
+
Figma angular stroke: 3px INSIDE, stops 0/18/39/60/81/100%.
|
|
3
|
+
The mask removes the centre without adding an opaque inner surface. */
|
|
4
|
+
.ol8-IconButton__surface{position:relative}
|
|
5
|
+
.ol8-Button[data-ol8-material="gem"]:focus-visible,
|
|
6
|
+
.ol8-IconButton[data-ol8-material="gem"]:focus-visible .ol8-IconButton__surface{
|
|
7
|
+
box-shadow:var(--ol8-elevation-surface-raised);
|
|
8
|
+
}
|
|
9
|
+
.ol8-Button[data-ol8-material="gem"]:focus-visible::after,
|
|
10
|
+
.ol8-IconButton[data-ol8-material="gem"]:focus-visible .ol8-IconButton__surface::after{
|
|
11
|
+
content:"";
|
|
12
|
+
position:absolute;
|
|
13
|
+
inset:0;
|
|
14
|
+
box-sizing:border-box;
|
|
15
|
+
padding:var(--ol8-focus-ring-inner-width);
|
|
16
|
+
border-radius:inherit;
|
|
17
|
+
pointer-events:none;
|
|
18
|
+
background:conic-gradient(from 90deg,var(--ol8-color-focus-outer) 0%,var(--ol8-color-focus-inner) 18%,var(--ol8-color-focus-outer) 39%,var(--ol8-color-focus-inner) 60%,var(--ol8-color-focus-outer) 81%,var(--ol8-color-focus-outer) 100%);
|
|
19
|
+
-webkit-mask:linear-gradient(currentColor,currentColor) content-box,linear-gradient(currentColor,currentColor);
|
|
20
|
+
mask:linear-gradient(currentColor,currentColor) content-box,linear-gradient(currentColor,currentColor);
|
|
21
|
+
-webkit-mask-composite:xor;
|
|
22
|
+
mask-composite:exclude;
|
|
23
|
+
}
|
|
24
|
+
@media (forced-colors:active){
|
|
25
|
+
.ol8-Button[data-ol8-material="gem"]:focus-visible,
|
|
26
|
+
.ol8-IconButton[data-ol8-material="gem"]:focus-visible .ol8-IconButton__surface{
|
|
27
|
+
outline:var(--ol8-focus-ring-inner-width) solid Highlight;
|
|
28
|
+
outline-offset:calc(var(--ol8-focus-ring-inner-width) * -1);
|
|
29
|
+
box-shadow:none;
|
|
30
|
+
}
|
|
31
|
+
.ol8-Button[data-ol8-material="gem"]:focus-visible::after,
|
|
32
|
+
.ol8-IconButton[data-ol8-material="gem"]:focus-visible .ol8-IconButton__surface::after{display:none}
|
|
33
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.ol8-IconButton{display:inline-grid;place-items:center;inline-size:var(--ol8-component-icon-button-target-comfortable);block-size:var(--ol8-component-icon-button-target-comfortable);padding:0;border:0;background:transparent;color:var(--ol8-color-action-quiet-content-default);cursor:pointer}
|
|
2
|
+
.ol8-IconButton[data-ol8-size="large"]{inline-size:var(--ol8-component-icon-button-target-large);block-size:var(--ol8-component-icon-button-target-large)}
|
|
3
|
+
.ol8-IconButton__surface{display:grid;place-items:center;box-sizing:border-box;inline-size:var(--ol8-component-icon-button-box-comfortable);block-size:var(--ol8-component-icon-button-box-comfortable);border-style:solid;border-color:transparent;border-radius:var(--ol8-component-icon-button-radius-comfortable);background:transparent;box-shadow:var(--ol8-elevation-surface-flat);transition-property:background-color,border-color,color,box-shadow;transition-duration:var(--ol8-motion-interaction-hover-duration);transition-timing-function:var(--ol8-motion-interaction-hover-timing-function)}
|
|
4
|
+
.ol8-IconButton[data-ol8-size="compact"] .ol8-IconButton__surface{inline-size:var(--ol8-component-icon-button-box-compact);block-size:var(--ol8-component-icon-button-box-compact);border-radius:var(--ol8-component-icon-button-radius-compact)}
|
|
5
|
+
.ol8-IconButton[data-ol8-size="standard"] .ol8-IconButton__surface{inline-size:var(--ol8-component-icon-button-box-standard);block-size:var(--ol8-component-icon-button-box-standard);border-radius:var(--ol8-component-icon-button-radius-standard)}
|
|
6
|
+
.ol8-IconButton[data-ol8-size="large"] .ol8-IconButton__surface{inline-size:var(--ol8-component-icon-button-box-large);block-size:var(--ol8-component-icon-button-box-large);border-radius:var(--ol8-component-icon-button-radius-large)}
|
|
7
|
+
.ol8-IconButton[data-ol8-shape="circle"] .ol8-IconButton__surface{border-radius:var(--ol8-component-icon-button-radius-circle)}
|
|
8
|
+
.ol8-IconButton__icon{display:grid;place-items:center;inline-size:var(--ol8-component-icon-button-artwork-comfortable);block-size:var(--ol8-component-icon-button-artwork-comfortable)}
|
|
9
|
+
.ol8-IconButton[data-ol8-size="compact"] .ol8-IconButton__icon{inline-size:var(--ol8-component-icon-button-artwork-compact);block-size:var(--ol8-component-icon-button-artwork-compact)}
|
|
10
|
+
.ol8-IconButton[data-ol8-size="standard"] .ol8-IconButton__icon{inline-size:var(--ol8-component-icon-button-artwork-standard);block-size:var(--ol8-component-icon-button-artwork-standard)}
|
|
11
|
+
.ol8-IconButton[data-ol8-size="large"] .ol8-IconButton__icon{inline-size:var(--ol8-component-icon-button-artwork-large);block-size:var(--ol8-component-icon-button-artwork-large)}
|
|
12
|
+
.ol8-IconButton__icon>svg,.ol8-IconButton__icon>img{inline-size:100%;block-size:100%}
|
|
13
|
+
.ol8-IconButton[data-ol8-variant="primary"] .ol8-IconButton__surface{border-width:0;background:var(--ol8-color-action-primary-default);color:var(--ol8-color-action-primary-content)}
|
|
14
|
+
.ol8-IconButton[data-ol8-variant="secondary"] .ol8-IconButton__surface{border-width:var(--ol8-component-button-secondary-boundary);background:var(--ol8-color-action-secondary-surface-default);border-color:var(--ol8-color-action-secondary-content-default);color:var(--ol8-color-action-secondary-content-default)}
|
|
15
|
+
.ol8-IconButton[data-ol8-variant="quiet"] .ol8-IconButton__surface{border-width:0;background:var(--ol8-color-action-quiet-surface-default);color:var(--ol8-color-action-quiet-content-default)}
|
|
16
|
+
.ol8-IconButton[data-ol8-variant="destructive"] .ol8-IconButton__surface{border-width:0;background:var(--ol8-color-action-destructive-default);color:var(--ol8-color-action-destructive-content)}
|
|
17
|
+
.ol8-IconButton[data-ol8-variant="primary"]:hover:not(:disabled):not([aria-busy="true"]) .ol8-IconButton__surface{background:var(--ol8-color-action-primary-hover);box-shadow:var(--ol8-elevation-surface-raised)}
|
|
18
|
+
.ol8-IconButton[data-ol8-variant="secondary"]:hover:not(:disabled):not([aria-busy="true"]) .ol8-IconButton__surface{background:var(--ol8-color-icon-button-secondary-hover-surface);border-color:var(--ol8-color-action-secondary-content-hover);color:var(--ol8-color-action-secondary-content-hover);box-shadow:var(--ol8-elevation-surface-raised)}
|
|
19
|
+
.ol8-IconButton[data-ol8-variant="quiet"]:hover:not(:disabled):not([aria-busy="true"]) .ol8-IconButton__surface{background:var(--ol8-color-icon-button-quiet-hover-surface);color:var(--ol8-color-action-quiet-content-hover);box-shadow:var(--ol8-elevation-surface-raised)}
|
|
20
|
+
.ol8-IconButton[data-ol8-variant="destructive"]:hover:not(:disabled):not([aria-busy="true"]) .ol8-IconButton__surface{background:var(--ol8-color-action-destructive-hover);box-shadow:var(--ol8-elevation-surface-raised)}
|
|
21
|
+
.ol8-IconButton[data-ol8-variant="primary"]:active:not(:disabled):not([aria-busy="true"]) .ol8-IconButton__surface{background:var(--ol8-color-action-primary-pressed);box-shadow:var(--ol8-elevation-surface-flat)}
|
|
22
|
+
.ol8-IconButton[data-ol8-variant="secondary"]:active:not(:disabled):not([aria-busy="true"]) .ol8-IconButton__surface{background:var(--ol8-color-action-secondary-surface-pressed);border-color:var(--ol8-color-action-secondary-content-pressed);color:var(--ol8-color-action-secondary-content-pressed);box-shadow:var(--ol8-elevation-surface-flat)}
|
|
23
|
+
.ol8-IconButton[data-ol8-variant="quiet"]:active:not(:disabled):not([aria-busy="true"]) .ol8-IconButton__surface{background:var(--ol8-color-action-quiet-surface-pressed);color:var(--ol8-color-action-quiet-content-pressed)}
|
|
24
|
+
.ol8-IconButton[data-ol8-variant="destructive"]:active:not(:disabled):not([aria-busy="true"]) .ol8-IconButton__surface{background:var(--ol8-color-action-destructive-pressed);box-shadow:var(--ol8-elevation-surface-flat)}
|
|
25
|
+
.ol8-IconButton:focus-visible{outline:0}.ol8-IconButton:focus-visible .ol8-IconButton__surface{box-shadow:inset 0 0 0 var(--ol8-focus-ring-inner-width) var(--ol8-color-focus-inner),inset 0 0 0 var(--ol8-focus-ring-total-width) var(--ol8-color-focus-outer)}
|
|
26
|
+
.ol8-IconButton[aria-pressed="true"] .ol8-IconButton__surface{box-shadow:inset 0 0 0 var(--ol8-component-choice-optical-stroke) currentColor;background:var(--ol8-color-selection-surface);color:var(--ol8-color-selection-content)}
|
|
27
|
+
.ol8-IconButton:disabled,.ol8-IconButton[aria-busy="true"]{cursor:not-allowed}
|
|
28
|
+
.ol8-IconButton[data-ol8-variant="primary"]:disabled .ol8-IconButton__surface,.ol8-IconButton[data-ol8-variant="primary"][aria-busy="true"] .ol8-IconButton__surface{background:var(--ol8-color-action-primary-disabled);color:var(--ol8-color-action-primary-disabled-content)}
|
|
29
|
+
.ol8-IconButton[data-ol8-variant="secondary"]:disabled .ol8-IconButton__surface,.ol8-IconButton[data-ol8-variant="secondary"][aria-busy="true"] .ol8-IconButton__surface{background:var(--ol8-color-action-secondary-surface-disabled);border-color:var(--ol8-color-action-secondary-content-disabled);color:var(--ol8-color-action-secondary-content-disabled)}
|
|
30
|
+
.ol8-IconButton[data-ol8-variant="quiet"]:disabled .ol8-IconButton__surface,.ol8-IconButton[data-ol8-variant="quiet"][aria-busy="true"] .ol8-IconButton__surface{background:var(--ol8-color-action-quiet-surface-disabled);color:var(--ol8-color-action-quiet-content-disabled)}
|
|
31
|
+
.ol8-IconButton[data-ol8-variant="destructive"]:disabled .ol8-IconButton__surface,.ol8-IconButton[data-ol8-variant="destructive"][aria-busy="true"] .ol8-IconButton__surface{background:var(--ol8-color-action-destructive-disabled);color:var(--ol8-color-action-destructive-disabled-content)}
|
|
32
|
+
.ol8-IconButton[data-ol8-material="gem"][data-ol8-variant="primary"] .ol8-IconButton__surface{background:linear-gradient(135deg,var(--ol8-material-control-gem-primary-start),var(--ol8-material-control-gem-primary-mid),var(--ol8-material-control-gem-primary-end));color:var(--ol8-color-icon-on-gem);box-shadow:inset 0 0 0 var(--ol8-component-choice-optical-stroke) var(--ol8-material-control-gem-rim-default),var(--ol8-elevation-surface-raised);backdrop-filter:blur(var(--ol8-material-control-gem-blur))}
|
|
33
|
+
.ol8-IconButton[data-ol8-material="gem"][data-ol8-variant="secondary"] .ol8-IconButton__surface{border-width:0;background:linear-gradient(135deg,var(--ol8-material-control-gem-secondary-high),var(--ol8-material-control-gem-secondary-mid),var(--ol8-material-control-gem-secondary-low));color:var(--ol8-color-icon-on-gem);box-shadow:inset 0 0 0 var(--ol8-component-choice-optical-stroke) var(--ol8-material-control-gem-rim-default),var(--ol8-elevation-surface-raised);backdrop-filter:blur(var(--ol8-material-control-gem-blur))}
|
|
34
|
+
.ol8-IconButton[data-ol8-material="gem"][data-ol8-variant="primary"][aria-busy="true"] .ol8-IconButton__surface{background:linear-gradient(135deg,var(--ol8-material-control-gem-primary-loading-start),var(--ol8-material-control-gem-primary-loading-mid),var(--ol8-material-control-gem-primary-loading-end))}
|
|
35
|
+
.ol8-IconButton[data-ol8-material="gem"][data-ol8-variant="secondary"][aria-busy="true"] .ol8-IconButton__surface{background:linear-gradient(135deg,var(--ol8-material-control-gem-secondary-loading-high),var(--ol8-material-control-gem-secondary-loading-mid),var(--ol8-material-control-gem-secondary-loading-low));color:var(--ol8-color-icon-on-gem)}
|
|
36
|
+
.ol8-IconButton__status{inline-size:var(--ol8-component-icon-button-artwork-compact);block-size:var(--ol8-component-icon-button-artwork-compact);animation:ol8-IconButton-spin var(--ol8-motion-duration-deliberate) var(--ol8-motion-easing-linear) infinite}
|
|
37
|
+
@keyframes ol8-IconButton-spin{to{transform:rotate(1turn)}}
|
|
38
|
+
.ol8-IconButton[data-ol8-size="comfortable"] .ol8-IconButton__status,.ol8-IconButton[data-ol8-size="large"] .ol8-IconButton__status{inline-size:var(--ol8-component-icon-button-artwork-comfortable);block-size:var(--ol8-component-icon-button-artwork-comfortable)}
|
|
39
|
+
@media (prefers-reduced-motion:reduce){.ol8-IconButton__surface{transition-duration:var(--ol8-motion-duration-instant)}.ol8-IconButton__status{animation:none}}
|
|
40
|
+
.ol8-IconButton[data-ol8-motion="none"] .ol8-IconButton__surface{transition-duration:var(--ol8-motion-duration-instant)}
|
|
41
|
+
@media (prefers-reduced-transparency:reduce){.ol8-IconButton[data-ol8-material="gem"][data-ol8-variant="primary"] .ol8-IconButton__surface{background:var(--ol8-color-action-primary-default);backdrop-filter:none}.ol8-IconButton[data-ol8-material="gem"][data-ol8-variant="secondary"] .ol8-IconButton__surface{background:var(--ol8-color-surface-raised);border:var(--ol8-component-button-secondary-boundary) solid var(--ol8-color-action-secondary-content-default);color:var(--ol8-color-action-secondary-content-default);backdrop-filter:none}}
|
|
42
|
+
@media (forced-colors:active){.ol8-IconButton{forced-color-adjust:auto}.ol8-IconButton:focus-visible .ol8-IconButton__surface{outline:var(--ol8-focus-ring-inner-width) solid Highlight;outline-offset:calc(var(--ol8-focus-ring-inner-width)*-1);box-shadow:none}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ol8-IconFrame>svg{stroke-width:var(--ol8-component-icon-stroke)}
|
package/styles/link.css
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.ol8-Link{position:relative;color:var(--ol8-color-text-link-default);font-family:var(--ol8-font-family-functional);font-weight:var(--ol8-font-weight-semibold);text-decoration-line:underline;text-decoration-thickness:var(--ol8-component-link-underline-default);text-underline-offset:var(--ol8-component-link-underline-offset);transition-property:color,text-decoration-thickness,background-color,box-shadow;transition-duration:var(--ol8-motion-interaction-hover-duration);transition-timing-function:var(--ol8-motion-interaction-hover-timing-function)}
|
|
2
|
+
.ol8-Link[data-ol8-size="small"]{font-size:var(--ol8-typography-body-small-font-size);line-height:var(--ol8-typography-body-small-line-height);letter-spacing:var(--ol8-typography-body-small-letter-spacing)}
|
|
3
|
+
.ol8-Link[data-ol8-size="standard"]{font-size:var(--ol8-typography-body-medium-font-size);line-height:var(--ol8-typography-body-medium-line-height);letter-spacing:var(--ol8-typography-body-medium-letter-spacing)}
|
|
4
|
+
.ol8-Link[data-ol8-size="large"]{font-size:var(--ol8-typography-body-large-font-size);line-height:var(--ol8-typography-body-large-line-height);letter-spacing:var(--ol8-typography-body-large-letter-spacing)}
|
|
5
|
+
.ol8-Link[data-ol8-size="inherit"]{font-size:inherit;line-height:inherit;letter-spacing:inherit}
|
|
6
|
+
.ol8-Link:hover{color:var(--ol8-color-text-link-hover);text-decoration-thickness:var(--ol8-component-link-underline-emphasis)}
|
|
7
|
+
.ol8-Link:active{color:var(--ol8-color-text-link-pressed);text-decoration-thickness:var(--ol8-component-link-underline-emphasis)}
|
|
8
|
+
.ol8-Link[data-ol8-form="inline"]:visited,.ol8-Link[data-ol8-form="standalone"]:visited{color:var(--ol8-color-text-link-visited)}
|
|
9
|
+
.ol8-Link:focus-visible{outline:0;color:var(--ol8-color-text-primary);box-shadow:inset 0 0 0 var(--ol8-focus-ring-inner-width) var(--ol8-color-focus-inner),inset 0 0 0 var(--ol8-focus-ring-total-width) var(--ol8-color-focus-outer);border-radius:var(--ol8-shape-radius-subtle)}
|
|
10
|
+
.ol8-Link[data-ol8-form="standalone"],.ol8-Link[data-ol8-form="navigation"]{display:inline-flex;align-items:center;min-block-size:var(--ol8-component-link-target-navigation)}
|
|
11
|
+
.ol8-Link[data-ol8-form="navigation"]{inline-size:100%;padding-inline:var(--ol8-spacing-inline-standard);text-decoration-color:transparent}
|
|
12
|
+
.ol8-Link[data-ol8-form="navigation"]:hover,.ol8-Link[data-ol8-form="navigation"]:focus-visible{text-decoration-color:currentColor}
|
|
13
|
+
.ol8-Link[data-ol8-form="navigation"][aria-current]{color:var(--ol8-color-action-primary-default);text-decoration-color:currentColor;font-weight:var(--ol8-font-weight-semibold)}
|
|
14
|
+
.ol8-Link[data-ol8-form="navigation"][aria-current]::before{content:"";position:absolute;inset-inline-start:0;inset-block:var(--ol8-spacing-stack-tight);inline-size:var(--ol8-focus-ring-inner-width);border-radius:var(--ol8-shape-radius-full);background:currentColor}
|
|
15
|
+
.ol8-NavigationList__list{display:grid;gap:var(--ol8-spacing-stack-tight);margin:0;padding:0;list-style:none}
|
|
16
|
+
.ol8-NavigationList__list .ol8-NavigationList__list{margin-inline-start:var(--ol8-spacing-stack-grouped)}
|
|
17
|
+
.ol8-NavigationList__item[data-ol8-active-ancestor="true"]>.ol8-Link{color:var(--ol8-color-text-primary);font-weight:var(--ol8-font-weight-semibold);background:var(--ol8-color-action-quiet-surface-hover)}
|
|
18
|
+
.ol8-Link[data-ol8-motion="none"]{transition-duration:var(--ol8-motion-duration-instant)}
|
|
19
|
+
@media (prefers-reduced-motion:reduce){.ol8-Link{transition-duration:var(--ol8-motion-duration-instant)}}
|
|
20
|
+
@media (forced-colors:active){.ol8-Link{forced-color-adjust:auto}.ol8-Link:focus-visible{outline:var(--ol8-focus-ring-inner-width) solid Highlight;outline-offset:calc(var(--ol8-focus-ring-inner-width)*-1);box-shadow:none}.ol8-Link[data-ol8-form="navigation"][aria-current]::before{background:Highlight}}
|
package/styles.css
ADDED