seblify 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +145 -49
- package/dist/components/AppShell.svelte +1 -1
- package/dist/components/Banner.svelte +3 -3
- package/dist/components/Button.svelte +4 -4
- package/dist/components/action/button/button/Button.svelte +1041 -0
- package/dist/components/action/button/button/Button.svelte.d.ts +28 -0
- package/dist/components/action/button/button-group/ButtonGroup.svelte +146 -0
- package/dist/components/action/button/button-group/ButtonGroup.svelte.d.ts +14 -0
- package/dist/components/action/button/floating-action-button/FloatingActionButton.svelte +1102 -0
- package/dist/components/action/button/floating-action-button/FloatingActionButton.svelte.d.ts +26 -0
- package/dist/components/action/button/icon-button/IconButton.svelte +954 -0
- package/dist/components/action/button/icon-button/IconButton.svelte.d.ts +22 -0
- package/dist/components/action/button/timed-button/TimedButton.svelte +1143 -0
- package/dist/components/action/button/timed-button/TimedButton.svelte.d.ts +32 -0
- package/dist/components/action/button/toggle-button/ToggleButton.svelte +1109 -0
- package/dist/components/action/button/toggle-button/ToggleButton.svelte.d.ts +28 -0
- package/dist/components/action/button/toggle-button-group/ToggleButtonGroup.svelte +242 -0
- package/dist/components/action/button/toggle-button-group/ToggleButtonGroup.svelte.d.ts +19 -0
- package/dist/components/action/button/toggle-button-group/ToggleButtonGroup.test.svelte +36 -0
- package/dist/components/action/button/toggle-button-group/ToggleButtonGroup.test.svelte.d.ts +11 -0
- package/dist/components/action/button/toggle-button-group/context.d.ts +8 -0
- package/dist/components/action/button/toggle-button-group/context.js +8 -0
- package/dist/components/action/input/field/pin-input/PinInput.svelte +4 -4
- package/dist/components/action/input/select/checkbox/Checkbox.svelte +4704 -25
- package/dist/components/action/input/select/checkbox/Checkbox.svelte.d.ts +28 -0
- package/dist/components/action/input/select/checkbox/checkbox-relations.svelte.d.ts +46 -0
- package/dist/components/action/input/select/checkbox/checkbox-relations.svelte.js +202 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bounce.d.ts +1 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bounce.html +27 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bounce.js +13 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bump.d.ts +1 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bump.html +12 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/bump.js +13 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/draw.d.ts +1 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/draw.html +12 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/draw.js +12 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/fade.d.ts +1 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/fade.html +12 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/fade.js +12 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/pop.d.ts +1 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/pop.html +12 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/pop.js +13 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/rise.d.ts +1 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/rise.html +27 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/rise.js +13 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/scale.d.ts +1 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/scale.html +27 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/scale.js +13 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/visual-state.d.ts +1 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/visual-state.html +12 -0
- package/dist/components/action/input/select/checkbox/tests/visual-fixtures/visual-state.js +278 -0
- package/dist/components/action/input/select/{theme-switch/ThemeSwitch.svelte → color-mode-switch/ColorModeSwitch.svelte} +8 -8
- package/dist/components/action/input/select/color-mode-switch/ColorModeSwitch.svelte.d.ts +10 -0
- package/dist/components/action/input/select/segment-control/SegmentControl.svelte +2 -2
- package/dist/components/action/input/select/slider/Slider.svelte +1 -1
- package/dist/components/action/input/select/switch/Switch.svelte +1004 -99
- package/dist/components/action/input/select/switch/Switch.svelte.d.ts +8 -3
- package/dist/components/display/annotation/badge/Badge.svelte +732 -63
- package/dist/components/display/annotation/badge/Badge.svelte.d.ts +1 -1
- package/dist/components/display/annotation/tag/Tag.svelte +670 -58
- package/dist/components/display/annotation/tag/Tag.svelte.d.ts +3 -1
- package/dist/components/display/data-display/metric/date-time/DateTimeValue.svelte +59 -0
- package/dist/components/display/data-display/metric/date-time/DateTimeValue.svelte.d.ts +13 -0
- package/dist/components/display/data-display/metric/date-time/DateValue.svelte +52 -0
- package/dist/components/display/data-display/metric/date-time/DateValue.svelte.d.ts +11 -0
- package/dist/components/display/data-display/metric/date-time/TimeValue.svelte +55 -0
- package/dist/components/display/data-display/metric/date-time/TimeValue.svelte.d.ts +12 -0
- package/dist/components/display/data-display/metric/duration/Duration.svelte +64 -0
- package/dist/components/display/data-display/metric/duration/Duration.svelte.d.ts +16 -0
- package/dist/components/display/data-display/metric/relative-time/RelativeTime.svelte +121 -0
- package/dist/components/display/data-display/metric/relative-time/RelativeTime.svelte.d.ts +21 -0
- package/dist/components/display/data-display/metric/timestamp-card/TimestampCard.svelte +121 -0
- package/dist/components/display/data-display/metric/timestamp-card/TimestampCard.svelte.d.ts +25 -0
- package/dist/components/display/data-display/visual/timeline/TimelineItem.svelte +660 -51
- package/dist/components/display/data-display/visual/timeline/context.d.ts +1 -1
- package/dist/components/display/feedback/loading/loading-dots/LoadingDots.svelte +657 -48
- package/dist/components/display/feedback/loading/loading-dots/LoadingDots.svelte.d.ts +1 -1
- package/dist/components/display/feedback/loading/spinner/Spinner.svelte +657 -48
- package/dist/components/display/feedback/loading/spinner/Spinner.svelte.d.ts +1 -1
- package/dist/components/display/motion/collapse/Collapse.svelte +115 -0
- package/dist/components/display/motion/collapse/Collapse.svelte.d.ts +17 -0
- package/dist/components/display/typography/accordion/Accordion.svelte +347 -0
- package/dist/components/display/typography/accordion/Accordion.svelte.d.ts +13 -0
- package/dist/components/display/typography/accordion/AccordionGroup.svelte +132 -0
- package/dist/components/display/typography/accordion/AccordionGroup.svelte.d.ts +11 -0
- package/dist/components/display/typography/accordion/context.d.ts +8 -0
- package/dist/components/display/typography/accordion/context.js +8 -0
- package/dist/components/display/typography/code-snippet/CodeSnippet.svelte +3 -3
- package/dist/components/display/typography/eyebrow/Eyebrow.svelte +2 -2
- package/dist/components/display/typography/highlight/Highlight.svelte +719 -59
- package/dist/components/display/typography/highlight/Highlight.svelte.d.ts +1 -1
- package/dist/components/framework/layout/container/app-shell/AppShell.svelte +16 -2
- package/dist/components/framework/navigation/context/breadcrumb/Breadcrumb.svelte +1 -1
- package/dist/components/framework/navigation/sidebar/sidebar/Sidebar.svelte +35 -10
- package/dist/components/framework/navigation/sidebar/sidenav/Sidenav.svelte +5 -5
- package/dist/components/framework/overlay/tooltip/Tooltip.svelte +1011 -0
- package/dist/components/framework/overlay/tooltip/Tooltip.svelte.d.ts +31 -0
- package/dist/components/framework/surface/paper/Paper.svelte +730 -87
- package/dist/components/framework/surface/paper/Paper.svelte.d.ts +1 -1
- package/dist/components/utility/format/date-time/formatDateTime.d.ts +23 -0
- package/dist/components/utility/format/date-time/formatDateTime.js +33 -0
- package/dist/components/utility/format/duration/formatDuration.d.ts +15 -0
- package/dist/components/utility/format/duration/formatDuration.js +218 -0
- package/dist/components/utility/format/relative-time/formatRelativeTime.d.ts +42 -0
- package/dist/components/utility/format/relative-time/formatRelativeTime.js +530 -0
- package/dist/design-system/inheritance/tokens.js +6 -0
- package/dist/design-system/reserved-props/allowed-options.d.ts +9 -4
- package/dist/design-system/theme/tokens.d.ts +72 -2
- package/dist/design-system/theme/tokens.js +173 -134
- package/dist/icons/generated/check-thick.svelte +16 -0
- package/dist/icons/generated/check-thick.svelte.d.ts +7 -0
- package/dist/icons/generated/check.svelte +16 -0
- package/dist/icons/generated/check.svelte.d.ts +7 -0
- package/dist/icons/generated/close-thick.svelte +16 -0
- package/dist/icons/generated/close-thick.svelte.d.ts +7 -0
- package/dist/icons/generated/close.svelte +16 -0
- package/dist/icons/generated/close.svelte.d.ts +7 -0
- package/dist/icons/generated/index.d.ts +4 -0
- package/dist/icons/generated/index.js +4 -0
- package/dist/icons/generated/manifest.js +28 -0
- package/dist/index.d.ts +22 -2
- package/dist/index.js +22 -2
- package/dist/styles/tone-context.css +656 -46
- package/dist/theme.css +1 -161
- package/dist/themes/canopy.css +373 -0
- package/dist/themes/cobalt.css +373 -0
- package/dist/themes/iris.css +373 -0
- package/dist/themes/lumen.css +373 -0
- package/dist/themes/mono.css +373 -0
- package/dist/themes/moss.css +373 -0
- package/dist/themes/noir.css +373 -0
- package/dist/themes/plain.css +373 -0
- package/dist/themes/pulse.css +373 -0
- package/dist/themes/signal.css +373 -0
- package/dist/themes/slate.css +373 -0
- package/dist/themes/solar.css +373 -0
- package/dist/themes/sorbet.css +373 -0
- package/dist/themes/studio.css +369 -0
- package/dist/themes/vesper.css +373 -0
- package/package.json +32 -4
- package/dist/components/action/input/select/theme-switch/ThemeSwitch.svelte.d.ts +0 -10
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
import { formatDuration } from '../duration/formatDuration';
|
|
2
|
+
const SECOND = 1000;
|
|
3
|
+
const MINUTE = 60 * SECOND;
|
|
4
|
+
const HOUR = 60 * MINUTE;
|
|
5
|
+
const DAY = 24 * HOUR;
|
|
6
|
+
const WEEK = 7 * DAY;
|
|
7
|
+
const MONTH = 4 * WEEK;
|
|
8
|
+
const YEAR = 12 * MONTH;
|
|
9
|
+
const CALENDAR_TIME_THRESHOLD = 13 * HOUR;
|
|
10
|
+
const MAX_TIMEOUT = 2_147_483_647;
|
|
11
|
+
const DEFAULT_LABEL_THRESHOLD = SECOND - 1;
|
|
12
|
+
const UNIT_MILLISECONDS = {
|
|
13
|
+
second: SECOND,
|
|
14
|
+
minute: MINUTE,
|
|
15
|
+
hour: HOUR,
|
|
16
|
+
day: DAY,
|
|
17
|
+
week: WEEK,
|
|
18
|
+
month: MONTH,
|
|
19
|
+
year: YEAR,
|
|
20
|
+
};
|
|
21
|
+
const UNIT_INDEX = {
|
|
22
|
+
second: 0,
|
|
23
|
+
minute: 1,
|
|
24
|
+
hour: 2,
|
|
25
|
+
day: 3,
|
|
26
|
+
week: 4,
|
|
27
|
+
month: 5,
|
|
28
|
+
year: 6,
|
|
29
|
+
};
|
|
30
|
+
export function formatRelativeTime(value, options = {}) {
|
|
31
|
+
const state = getRelativeTimeState(value, options);
|
|
32
|
+
if (state.label !== undefined) {
|
|
33
|
+
return state.label;
|
|
34
|
+
}
|
|
35
|
+
if (usesDurationFormatting(options)) {
|
|
36
|
+
const durationText = formatRelativeTimeDuration(state, options);
|
|
37
|
+
if (options.presentation === 'unit') {
|
|
38
|
+
return durationText;
|
|
39
|
+
}
|
|
40
|
+
return formatRelativeDuration(durationText, state, options);
|
|
41
|
+
}
|
|
42
|
+
if (options.presentation === 'unit') {
|
|
43
|
+
return new Intl.NumberFormat(options.locale, {
|
|
44
|
+
style: 'unit',
|
|
45
|
+
unit: state.unit,
|
|
46
|
+
unitDisplay: options.style ?? 'long',
|
|
47
|
+
}).format(state.amount);
|
|
48
|
+
}
|
|
49
|
+
const formatter = new Intl.RelativeTimeFormat(options.locale, {
|
|
50
|
+
numeric: state.direction === 'present' ? 'auto' : 'always',
|
|
51
|
+
style: options.style ?? 'long',
|
|
52
|
+
});
|
|
53
|
+
return formatter.format(state.signedAmount, state.unit);
|
|
54
|
+
}
|
|
55
|
+
export function getRelativeTimeState(value, options = {}) {
|
|
56
|
+
const targetTime = toTime(value, 'value');
|
|
57
|
+
const fromTime = options.from === undefined ? Date.now() : toTime(options.from, 'from');
|
|
58
|
+
const state = selectRelativeTimeState(targetTime, fromTime, options);
|
|
59
|
+
return {
|
|
60
|
+
amount: state.amount,
|
|
61
|
+
direction: state.direction,
|
|
62
|
+
label: state.label,
|
|
63
|
+
milliseconds: state.milliseconds,
|
|
64
|
+
signedAmount: state.signedAmount,
|
|
65
|
+
unit: state.unit,
|
|
66
|
+
updateInMilliseconds: getUpdateInterval(targetTime, fromTime, options, state),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function selectRelativeTimeState(targetTime, fromTime, options) {
|
|
70
|
+
const milliseconds = targetTime - fromTime;
|
|
71
|
+
const direction = getDirection(milliseconds);
|
|
72
|
+
const absoluteMilliseconds = Math.abs(milliseconds);
|
|
73
|
+
const unitSteps = options.unitSteps ?? 'detailed';
|
|
74
|
+
const selected = selectUnit(absoluteMilliseconds, unitSteps, options);
|
|
75
|
+
const labelSelection = selectLabel(milliseconds, options.labels);
|
|
76
|
+
const calendarLabel = selectCalendarLabel(targetTime, fromTime, milliseconds, options);
|
|
77
|
+
const label = labelSelection?.label ?? calendarLabel;
|
|
78
|
+
const signedAmount = direction === 'past' ? -selected.amount : selected.amount;
|
|
79
|
+
return {
|
|
80
|
+
amount: selected.amount,
|
|
81
|
+
direction,
|
|
82
|
+
label,
|
|
83
|
+
labelSelection,
|
|
84
|
+
milliseconds,
|
|
85
|
+
signedAmount,
|
|
86
|
+
unit: selected.unit,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function usesDurationFormatting(options) {
|
|
90
|
+
return ((options.maxUnits !== undefined && Math.floor(options.maxUnits) > 1) ||
|
|
91
|
+
(options.minUnits !== undefined && Math.floor(options.minUnits) > 1));
|
|
92
|
+
}
|
|
93
|
+
function formatRelativeTimeDuration(state, options) {
|
|
94
|
+
const minUnits = options.minUnits;
|
|
95
|
+
const maxUnits = options.maxUnits === undefined && minUnits !== undefined
|
|
96
|
+
? minUnits
|
|
97
|
+
: options.maxUnits;
|
|
98
|
+
return formatDuration(Math.abs(state.milliseconds), {
|
|
99
|
+
largestUnit: getDurationLargestUnit(state.unit, options),
|
|
100
|
+
locale: options.locale,
|
|
101
|
+
maxUnits,
|
|
102
|
+
minUnits,
|
|
103
|
+
rounding: options.rounding,
|
|
104
|
+
smallestUnit: (options.smallestUnit ?? 'second'),
|
|
105
|
+
style: options.style,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
function getDurationLargestUnit(selectedUnit, options) {
|
|
109
|
+
if (options.largestUnit !== undefined) {
|
|
110
|
+
return options.largestUnit;
|
|
111
|
+
}
|
|
112
|
+
const minUnits = getPositiveIntegerOption(options.minUnits);
|
|
113
|
+
if (minUnits === undefined || minUnits <= 1) {
|
|
114
|
+
return selectedUnit;
|
|
115
|
+
}
|
|
116
|
+
const smallestUnit = options.smallestUnit ?? 'second';
|
|
117
|
+
const smallestUnitIndex = UNIT_INDEX[smallestUnit];
|
|
118
|
+
if (smallestUnitIndex === undefined) {
|
|
119
|
+
throw new RangeError('Invalid relative time smallestUnit.');
|
|
120
|
+
}
|
|
121
|
+
const selectedUnitIndex = UNIT_INDEX[selectedUnit];
|
|
122
|
+
const inferredUnitIndex = Math.min(UNIT_INDEX.year, Math.max(selectedUnitIndex, smallestUnitIndex + minUnits - 1));
|
|
123
|
+
return unitFromIndex(inferredUnitIndex);
|
|
124
|
+
}
|
|
125
|
+
function getPositiveIntegerOption(value) {
|
|
126
|
+
if (value === undefined) {
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
if (!Number.isFinite(value) || value < 1) {
|
|
130
|
+
throw new RangeError('Invalid relative time unit count.');
|
|
131
|
+
}
|
|
132
|
+
return Math.floor(value);
|
|
133
|
+
}
|
|
134
|
+
function unitFromIndex(index) {
|
|
135
|
+
const unit = Object.keys(UNIT_INDEX).find((candidate) => UNIT_INDEX[candidate] === index);
|
|
136
|
+
if (unit === undefined) {
|
|
137
|
+
throw new RangeError('Invalid relative time unit index.');
|
|
138
|
+
}
|
|
139
|
+
return unit;
|
|
140
|
+
}
|
|
141
|
+
function formatRelativeDuration(durationText, state, options) {
|
|
142
|
+
const formatter = new Intl.RelativeTimeFormat(options.locale, {
|
|
143
|
+
numeric: state.direction === 'present' ? 'auto' : 'always',
|
|
144
|
+
style: options.style ?? 'long',
|
|
145
|
+
});
|
|
146
|
+
if (state.direction === 'present') {
|
|
147
|
+
return formatter.format(0, 'second');
|
|
148
|
+
}
|
|
149
|
+
const sampleAmount = state.direction === 'past' ? -1 : 1;
|
|
150
|
+
const parts = formatter.formatToParts(sampleAmount, 'second');
|
|
151
|
+
const firstUnitPartIndex = parts.findIndex(isRelativeTimeNumberPart);
|
|
152
|
+
const lastUnitPartIndex = findLastRelativeTimeNumberPartIndex(parts);
|
|
153
|
+
if (firstUnitPartIndex === -1 || lastUnitPartIndex === -1) {
|
|
154
|
+
return formatter.format(sampleAmount, 'second');
|
|
155
|
+
}
|
|
156
|
+
const suffix = removeUnitText(parts
|
|
157
|
+
.slice(lastUnitPartIndex + 1)
|
|
158
|
+
.map((part) => part.value)
|
|
159
|
+
.join(''), options);
|
|
160
|
+
return [
|
|
161
|
+
...parts.slice(0, firstUnitPartIndex).map((part) => part.value),
|
|
162
|
+
durationText,
|
|
163
|
+
suffix,
|
|
164
|
+
].join('');
|
|
165
|
+
}
|
|
166
|
+
function findLastRelativeTimeNumberPartIndex(parts) {
|
|
167
|
+
for (let index = parts.length - 1; index >= 0; index -= 1) {
|
|
168
|
+
if (isRelativeTimeNumberPart(parts[index])) {
|
|
169
|
+
return index;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return -1;
|
|
173
|
+
}
|
|
174
|
+
function isRelativeTimeNumberPart(part) {
|
|
175
|
+
return (part.type === 'integer' ||
|
|
176
|
+
part.type === 'decimal' ||
|
|
177
|
+
part.type === 'fraction' ||
|
|
178
|
+
part.type === 'group');
|
|
179
|
+
}
|
|
180
|
+
function removeUnitText(text, options) {
|
|
181
|
+
const unitText = new Intl.NumberFormat(options.locale, {
|
|
182
|
+
style: 'unit',
|
|
183
|
+
unit: 'second',
|
|
184
|
+
unitDisplay: options.style ?? 'long',
|
|
185
|
+
})
|
|
186
|
+
.formatToParts(1)
|
|
187
|
+
.find((part) => part.type === 'unit')?.value;
|
|
188
|
+
if (unitText === undefined) {
|
|
189
|
+
return text;
|
|
190
|
+
}
|
|
191
|
+
const index = text.indexOf(unitText);
|
|
192
|
+
if (index === -1) {
|
|
193
|
+
return text;
|
|
194
|
+
}
|
|
195
|
+
const before = text.slice(0, index);
|
|
196
|
+
let after = text.slice(index + unitText.length);
|
|
197
|
+
if (after.startsWith('.') && (after.length === 1 || after[1] === ' ')) {
|
|
198
|
+
after = after.slice(1);
|
|
199
|
+
}
|
|
200
|
+
if (before.trim() === '') {
|
|
201
|
+
return after;
|
|
202
|
+
}
|
|
203
|
+
return `${before}${after}`;
|
|
204
|
+
}
|
|
205
|
+
export function relativeTimeDateTime(value) {
|
|
206
|
+
return new Date(toTime(value, 'value')).toISOString();
|
|
207
|
+
}
|
|
208
|
+
function toTime(value, optionName) {
|
|
209
|
+
const time = value instanceof Date ? value.getTime() : new Date(value).getTime();
|
|
210
|
+
if (!Number.isFinite(time)) {
|
|
211
|
+
throw new RangeError(`Invalid relative time ${optionName}.`);
|
|
212
|
+
}
|
|
213
|
+
return time;
|
|
214
|
+
}
|
|
215
|
+
function getDirection(milliseconds) {
|
|
216
|
+
if (Math.abs(milliseconds) < SECOND) {
|
|
217
|
+
return 'present';
|
|
218
|
+
}
|
|
219
|
+
return milliseconds < 0 ? 'past' : 'future';
|
|
220
|
+
}
|
|
221
|
+
function selectUnit(milliseconds, unitSteps, options) {
|
|
222
|
+
validateUnitRange(options.largestUnit, options.smallestUnit);
|
|
223
|
+
const selected = unitSteps === 'detailed'
|
|
224
|
+
? selectDetailedUnit(milliseconds)
|
|
225
|
+
: unitSteps === 'compact'
|
|
226
|
+
? selectCompactUnit(milliseconds)
|
|
227
|
+
: selectSimpleUnit(milliseconds);
|
|
228
|
+
const largestLimited = limitLargestUnit(milliseconds, selected, options.largestUnit);
|
|
229
|
+
return limitSmallestUnit(milliseconds, largestLimited, options.smallestUnit);
|
|
230
|
+
}
|
|
231
|
+
function validateUnitRange(largestUnit, smallestUnit) {
|
|
232
|
+
if (largestUnit !== undefined && !(largestUnit in UNIT_MILLISECONDS)) {
|
|
233
|
+
throw new RangeError('Invalid relative time largestUnit.');
|
|
234
|
+
}
|
|
235
|
+
if (smallestUnit !== undefined && !(smallestUnit in UNIT_MILLISECONDS)) {
|
|
236
|
+
throw new RangeError('Invalid relative time smallestUnit.');
|
|
237
|
+
}
|
|
238
|
+
if (largestUnit !== undefined &&
|
|
239
|
+
smallestUnit !== undefined &&
|
|
240
|
+
UNIT_INDEX[largestUnit] < UNIT_INDEX[smallestUnit]) {
|
|
241
|
+
throw new RangeError('Relative time largestUnit must be larger than smallestUnit.');
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
function limitLargestUnit(milliseconds, selected, largestUnit) {
|
|
245
|
+
if (largestUnit === undefined) {
|
|
246
|
+
return selected;
|
|
247
|
+
}
|
|
248
|
+
if (!(largestUnit in UNIT_MILLISECONDS)) {
|
|
249
|
+
throw new RangeError('Invalid relative time largestUnit.');
|
|
250
|
+
}
|
|
251
|
+
if (UNIT_INDEX[selected.unit] <= UNIT_INDEX[largestUnit]) {
|
|
252
|
+
return selected;
|
|
253
|
+
}
|
|
254
|
+
return {
|
|
255
|
+
amount: wholeUnit(milliseconds, UNIT_MILLISECONDS[largestUnit]),
|
|
256
|
+
unit: largestUnit,
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
function limitSmallestUnit(milliseconds, selected, smallestUnit) {
|
|
260
|
+
if (smallestUnit === undefined) {
|
|
261
|
+
return selected;
|
|
262
|
+
}
|
|
263
|
+
if (UNIT_INDEX[selected.unit] >= UNIT_INDEX[smallestUnit]) {
|
|
264
|
+
return selected;
|
|
265
|
+
}
|
|
266
|
+
return {
|
|
267
|
+
amount: wholeUnit(milliseconds, UNIT_MILLISECONDS[smallestUnit]),
|
|
268
|
+
unit: smallestUnit,
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
function selectLabel(milliseconds, labels) {
|
|
272
|
+
if (labels === undefined) {
|
|
273
|
+
return undefined;
|
|
274
|
+
}
|
|
275
|
+
let match;
|
|
276
|
+
for (const label of labels) {
|
|
277
|
+
const thresholds = label.threshold === undefined
|
|
278
|
+
? [DEFAULT_LABEL_THRESHOLD, -DEFAULT_LABEL_THRESHOLD]
|
|
279
|
+
: [label.threshold];
|
|
280
|
+
for (const threshold of thresholds) {
|
|
281
|
+
const thresholdIsInvalid = !Number.isFinite(threshold) && Math.abs(threshold) !== Infinity;
|
|
282
|
+
if (thresholdIsInvalid) {
|
|
283
|
+
throw new RangeError('Invalid relative time label threshold.');
|
|
284
|
+
}
|
|
285
|
+
const matches = milliseconds >= 0
|
|
286
|
+
? threshold >= 0 && milliseconds <= threshold
|
|
287
|
+
: threshold < 0 && milliseconds >= threshold;
|
|
288
|
+
if (!matches) {
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
291
|
+
if (match === undefined ||
|
|
292
|
+
Math.abs(threshold) < Math.abs(match.threshold)) {
|
|
293
|
+
match = {
|
|
294
|
+
label: label.label,
|
|
295
|
+
threshold,
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
return match;
|
|
301
|
+
}
|
|
302
|
+
function selectCalendarLabel(targetTime, fromTime, milliseconds, options) {
|
|
303
|
+
if (options.mode !== 'calendar' || options.presentation === 'unit') {
|
|
304
|
+
return undefined;
|
|
305
|
+
}
|
|
306
|
+
if (Math.abs(milliseconds) < CALENDAR_TIME_THRESHOLD) {
|
|
307
|
+
return undefined;
|
|
308
|
+
}
|
|
309
|
+
const dayDelta = localCalendarDayIndex(targetTime) - localCalendarDayIndex(fromTime);
|
|
310
|
+
if (Math.abs(dayDelta) <= 1) {
|
|
311
|
+
return formatRelativeCalendarUnit(dayDelta, 'day', options);
|
|
312
|
+
}
|
|
313
|
+
if (Math.abs(dayDelta) <= 6) {
|
|
314
|
+
return formatRelativeWeekday(targetTime, dayDelta, options.locale);
|
|
315
|
+
}
|
|
316
|
+
if (Math.abs(dayDelta) <= 13) {
|
|
317
|
+
return formatRelativeCalendarUnit(dayDelta > 0 ? 1 : -1, 'week', options);
|
|
318
|
+
}
|
|
319
|
+
return undefined;
|
|
320
|
+
}
|
|
321
|
+
function localCalendarDayIndex(time) {
|
|
322
|
+
const date = new Date(time);
|
|
323
|
+
return Math.floor(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) / DAY);
|
|
324
|
+
}
|
|
325
|
+
function formatRelativeCalendarUnit(amount, unit, options) {
|
|
326
|
+
return new Intl.RelativeTimeFormat(options.locale, {
|
|
327
|
+
numeric: 'auto',
|
|
328
|
+
style: options.style ?? 'long',
|
|
329
|
+
}).format(amount, unit);
|
|
330
|
+
}
|
|
331
|
+
function formatRelativeWeekday(targetTime, dayDelta, locale) {
|
|
332
|
+
const resolvedLocale = new Intl.DateTimeFormat(locale).resolvedOptions().locale;
|
|
333
|
+
const language = resolvedLocale.split('-')[0];
|
|
334
|
+
const relativeWord = relativeWeekdayWord(language, dayDelta);
|
|
335
|
+
if (relativeWord === undefined) {
|
|
336
|
+
return undefined;
|
|
337
|
+
}
|
|
338
|
+
const weekday = new Intl.DateTimeFormat(locale, {
|
|
339
|
+
weekday: 'long',
|
|
340
|
+
}).format(new Date(targetTime));
|
|
341
|
+
return `${relativeWord} ${weekday}`;
|
|
342
|
+
}
|
|
343
|
+
function relativeWeekdayWord(language, dayDelta) {
|
|
344
|
+
if (language === 'da') {
|
|
345
|
+
return dayDelta > 0 ? 'næste' : 'sidste';
|
|
346
|
+
}
|
|
347
|
+
if (language === 'en') {
|
|
348
|
+
return dayDelta > 0 ? 'next' : 'last';
|
|
349
|
+
}
|
|
350
|
+
return undefined;
|
|
351
|
+
}
|
|
352
|
+
function selectCompactUnit(milliseconds) {
|
|
353
|
+
const seconds = wholeUnit(milliseconds, SECOND);
|
|
354
|
+
if (seconds < 60) {
|
|
355
|
+
return { amount: seconds, unit: 'second' };
|
|
356
|
+
}
|
|
357
|
+
if (seconds < 90) {
|
|
358
|
+
return { amount: 1, unit: 'minute' };
|
|
359
|
+
}
|
|
360
|
+
if (seconds < 120) {
|
|
361
|
+
return { amount: 1.5, unit: 'minute' };
|
|
362
|
+
}
|
|
363
|
+
const minutes = wholeUnit(milliseconds, MINUTE);
|
|
364
|
+
if (minutes < 60) {
|
|
365
|
+
return { amount: minutes, unit: 'minute' };
|
|
366
|
+
}
|
|
367
|
+
if (minutes < 90) {
|
|
368
|
+
return { amount: 1, unit: 'hour' };
|
|
369
|
+
}
|
|
370
|
+
if (minutes < 120) {
|
|
371
|
+
return { amount: 1.5, unit: 'hour' };
|
|
372
|
+
}
|
|
373
|
+
const hours = wholeUnit(milliseconds, HOUR);
|
|
374
|
+
if (hours < 24) {
|
|
375
|
+
return { amount: hours, unit: 'hour' };
|
|
376
|
+
}
|
|
377
|
+
if (hours < 36) {
|
|
378
|
+
return { amount: 1, unit: 'day' };
|
|
379
|
+
}
|
|
380
|
+
if (hours < 48) {
|
|
381
|
+
return { amount: 1.5, unit: 'day' };
|
|
382
|
+
}
|
|
383
|
+
const days = wholeUnit(milliseconds, DAY);
|
|
384
|
+
if (days < 7) {
|
|
385
|
+
return { amount: days, unit: 'day' };
|
|
386
|
+
}
|
|
387
|
+
if (milliseconds < 1.5 * WEEK) {
|
|
388
|
+
return { amount: 1, unit: 'week' };
|
|
389
|
+
}
|
|
390
|
+
if (days < 14) {
|
|
391
|
+
return { amount: 1.5, unit: 'week' };
|
|
392
|
+
}
|
|
393
|
+
const weeks = wholeUnit(milliseconds, WEEK);
|
|
394
|
+
if (weeks < 4) {
|
|
395
|
+
return { amount: weeks, unit: 'week' };
|
|
396
|
+
}
|
|
397
|
+
if (weeks < 6) {
|
|
398
|
+
return { amount: 1, unit: 'month' };
|
|
399
|
+
}
|
|
400
|
+
if (weeks < 8) {
|
|
401
|
+
return { amount: 1.5, unit: 'month' };
|
|
402
|
+
}
|
|
403
|
+
const months = wholeUnit(milliseconds, MONTH);
|
|
404
|
+
if (months < 12) {
|
|
405
|
+
return { amount: months, unit: 'month' };
|
|
406
|
+
}
|
|
407
|
+
if (months < 18) {
|
|
408
|
+
return { amount: 1, unit: 'year' };
|
|
409
|
+
}
|
|
410
|
+
if (months < 24) {
|
|
411
|
+
return { amount: 1.5, unit: 'year' };
|
|
412
|
+
}
|
|
413
|
+
return { amount: Math.floor(months / 12), unit: 'year' };
|
|
414
|
+
}
|
|
415
|
+
function selectSimpleUnit(milliseconds) {
|
|
416
|
+
const seconds = wholeUnit(milliseconds, SECOND);
|
|
417
|
+
if (seconds < 60) {
|
|
418
|
+
return { amount: seconds, unit: 'second' };
|
|
419
|
+
}
|
|
420
|
+
const minutes = wholeUnit(milliseconds, MINUTE);
|
|
421
|
+
if (minutes < 60) {
|
|
422
|
+
return { amount: minutes, unit: 'minute' };
|
|
423
|
+
}
|
|
424
|
+
const hours = wholeUnit(milliseconds, HOUR);
|
|
425
|
+
if (hours < 24) {
|
|
426
|
+
return { amount: hours, unit: 'hour' };
|
|
427
|
+
}
|
|
428
|
+
const days = wholeUnit(milliseconds, DAY);
|
|
429
|
+
if (days < 7) {
|
|
430
|
+
return { amount: days, unit: 'day' };
|
|
431
|
+
}
|
|
432
|
+
const weeks = wholeUnit(milliseconds, WEEK);
|
|
433
|
+
if (weeks < 4) {
|
|
434
|
+
return { amount: weeks, unit: 'week' };
|
|
435
|
+
}
|
|
436
|
+
const months = wholeUnit(milliseconds, MONTH);
|
|
437
|
+
if (months < 12) {
|
|
438
|
+
return { amount: months, unit: 'month' };
|
|
439
|
+
}
|
|
440
|
+
return { amount: Math.floor(months / 12), unit: 'year' };
|
|
441
|
+
}
|
|
442
|
+
function selectDetailedUnit(milliseconds) {
|
|
443
|
+
const seconds = wholeUnit(milliseconds, SECOND);
|
|
444
|
+
if (seconds <= 99) {
|
|
445
|
+
return { amount: seconds, unit: 'second' };
|
|
446
|
+
}
|
|
447
|
+
if (seconds < 120) {
|
|
448
|
+
return { amount: 1.5, unit: 'minute' };
|
|
449
|
+
}
|
|
450
|
+
const minutes = wholeUnit(milliseconds, MINUTE);
|
|
451
|
+
if (minutes <= 99) {
|
|
452
|
+
return { amount: minutes, unit: 'minute' };
|
|
453
|
+
}
|
|
454
|
+
if (minutes < 120) {
|
|
455
|
+
return { amount: 1.5, unit: 'hour' };
|
|
456
|
+
}
|
|
457
|
+
const hours = wholeUnit(milliseconds, HOUR);
|
|
458
|
+
if (hours <= 35) {
|
|
459
|
+
return { amount: hours, unit: 'hour' };
|
|
460
|
+
}
|
|
461
|
+
if (hours < 48) {
|
|
462
|
+
return { amount: 1.5, unit: 'day' };
|
|
463
|
+
}
|
|
464
|
+
const days = wholeUnit(milliseconds, DAY);
|
|
465
|
+
if (days <= 13) {
|
|
466
|
+
return { amount: days, unit: 'day' };
|
|
467
|
+
}
|
|
468
|
+
const weeks = wholeUnit(milliseconds, WEEK);
|
|
469
|
+
if (weeks <= 7) {
|
|
470
|
+
return { amount: weeks, unit: 'week' };
|
|
471
|
+
}
|
|
472
|
+
const months = wholeUnit(milliseconds, MONTH);
|
|
473
|
+
if (months <= 11) {
|
|
474
|
+
return { amount: Math.max(2, months), unit: 'month' };
|
|
475
|
+
}
|
|
476
|
+
if (months <= 17) {
|
|
477
|
+
return { amount: 1, unit: 'year' };
|
|
478
|
+
}
|
|
479
|
+
if (months <= 23) {
|
|
480
|
+
return { amount: 1.5, unit: 'year' };
|
|
481
|
+
}
|
|
482
|
+
return { amount: Math.floor(months / 12), unit: 'year' };
|
|
483
|
+
}
|
|
484
|
+
function wholeUnit(milliseconds, unitMilliseconds) {
|
|
485
|
+
return Math.floor(milliseconds / unitMilliseconds);
|
|
486
|
+
}
|
|
487
|
+
function getUpdateInterval(targetTime, fromTime, options, current) {
|
|
488
|
+
let lower = 0;
|
|
489
|
+
let upper = 1;
|
|
490
|
+
while (upper < MAX_TIMEOUT) {
|
|
491
|
+
if (!matchesRelativeTimeState(targetTime, fromTime + upper, options, current)) {
|
|
492
|
+
break;
|
|
493
|
+
}
|
|
494
|
+
lower = upper;
|
|
495
|
+
upper *= 2;
|
|
496
|
+
}
|
|
497
|
+
if (upper >= MAX_TIMEOUT) {
|
|
498
|
+
return MAX_TIMEOUT;
|
|
499
|
+
}
|
|
500
|
+
while (upper - lower > 1) {
|
|
501
|
+
const middle = Math.floor((lower + upper) / 2);
|
|
502
|
+
if (matchesRelativeTimeState(targetTime, fromTime + middle, options, current)) {
|
|
503
|
+
lower = middle;
|
|
504
|
+
}
|
|
505
|
+
else {
|
|
506
|
+
upper = middle;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
return Math.max(1, upper);
|
|
510
|
+
}
|
|
511
|
+
function matchesRelativeTimeState(targetTime, fromTime, options, current) {
|
|
512
|
+
const next = selectRelativeTimeState(targetTime, fromTime, options);
|
|
513
|
+
if (current.labelSelection?.label !== undefined ||
|
|
514
|
+
next.labelSelection?.label !== undefined) {
|
|
515
|
+
return current.labelSelection?.label === next.labelSelection?.label;
|
|
516
|
+
}
|
|
517
|
+
if (current.labelSelection?.threshold !== next.labelSelection?.threshold) {
|
|
518
|
+
return false;
|
|
519
|
+
}
|
|
520
|
+
if (current.label !== next.label) {
|
|
521
|
+
return false;
|
|
522
|
+
}
|
|
523
|
+
if (usesDurationFormatting(options)) {
|
|
524
|
+
return (formatRelativeTimeDuration(current, options) ===
|
|
525
|
+
formatRelativeTimeDuration(next, options));
|
|
526
|
+
}
|
|
527
|
+
return (current.amount === next.amount &&
|
|
528
|
+
current.direction === next.direction &&
|
|
529
|
+
current.unit === next.unit);
|
|
530
|
+
}
|
|
@@ -11,6 +11,12 @@ const inheritanceTokens = [
|
|
|
11
11
|
value: 'ambient fill text color',
|
|
12
12
|
description: 'Resolved readable foreground color for content placed on the current tone fill. Use when a child can render a solid tone surface.',
|
|
13
13
|
},
|
|
14
|
+
{
|
|
15
|
+
name: '--seblify-current-tone-fill-hover',
|
|
16
|
+
category: 'Tone',
|
|
17
|
+
value: 'ambient fill hover color',
|
|
18
|
+
description: 'Resolved hover color for the current tone fill. Use when a child renders a solid interactive tone surface.',
|
|
19
|
+
},
|
|
14
20
|
{
|
|
15
21
|
name: '--seblify-current-tone-text',
|
|
16
22
|
category: 'Tone',
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import { CustomCssSize } from './complex-types';
|
|
3
3
|
type SizeKeys = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
4
|
-
type ToneOptions = 'neutral' | 'primary' | '
|
|
5
|
-
type
|
|
6
|
-
type
|
|
4
|
+
type ToneOptions = 'neutral' | 'strong' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
|
|
5
|
+
type SurfaceOptions = 'default' | 'inverse';
|
|
6
|
+
type PlacementOptions = 'top-start' | 'top' | 'top-end' | 'end-top' | 'end' | 'end-bottom' | 'bottom-end' | 'bottom' | 'bottom-start' | 'start-bottom' | 'start' | 'start-top';
|
|
7
|
+
type VariantOptions = 'solid' | 'soft' | 'tint' | 'outline' | 'plain' | 'blank' | 'inset' | 'overflow';
|
|
7
8
|
type BorderOptions = 'none' | 'solid' | 'dash';
|
|
8
9
|
type ShapeOptions = 'pill' | 'dot' | 'floating' | 'line' | 'slim' | 'long' | 'flat';
|
|
9
10
|
type AlignOptions = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
10
11
|
type JustifyOptions = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
11
12
|
type DirOptions = 'ltr' | 'rtl' | 'auto';
|
|
12
|
-
type AnimationOptions = 'none' | 'smooth' | 'snappy' | 'bouncy';
|
|
13
|
+
type AnimationOptions = 'none' | 'smooth' | 'snappy' | 'bouncy' | 'fade' | 'scale' | 'bump' | 'pop' | 'draw' | 'rise' | 'bounce';
|
|
13
14
|
type OrientationOptions = 'horizontal' | 'vertical';
|
|
14
15
|
export type SeblifyReservedPropOptions = {
|
|
15
16
|
class: string;
|
|
@@ -28,14 +29,18 @@ export type SeblifyReservedPropOptions = {
|
|
|
28
29
|
step: number;
|
|
29
30
|
length: number;
|
|
30
31
|
open: boolean;
|
|
32
|
+
visible: boolean;
|
|
33
|
+
expanded: boolean;
|
|
31
34
|
checked: boolean;
|
|
32
35
|
disabled: boolean;
|
|
36
|
+
multiple: boolean;
|
|
33
37
|
wrap: boolean;
|
|
34
38
|
border: BorderOptions & {};
|
|
35
39
|
radius: ((SizeKeys | 'none' | 'full') & {}) | CustomCssSize;
|
|
36
40
|
shape: ShapeOptions & {};
|
|
37
41
|
tone: ToneOptions & {};
|
|
38
42
|
variant: VariantOptions & {};
|
|
43
|
+
surface: SurfaceOptions & {};
|
|
39
44
|
size: (SizeKeys & {}) | CustomCssSize;
|
|
40
45
|
padding: ((SizeKeys | 'none') & {}) | CustomCssSize;
|
|
41
46
|
animation: AnimationOptions & {};
|
|
@@ -1,7 +1,77 @@
|
|
|
1
|
-
declare const themeTokens: {
|
|
1
|
+
declare const themeTokens: ({
|
|
2
|
+
readonly name: "--seblify-color-background";
|
|
3
|
+
readonly category: "Surface";
|
|
4
|
+
readonly value: "#faf7f2";
|
|
5
|
+
readonly description: "Default page background behind component surfaces.";
|
|
6
|
+
} | {
|
|
7
|
+
readonly name: "--seblify-color-surface";
|
|
8
|
+
readonly category: "Surface";
|
|
9
|
+
readonly value: "#fffdf9";
|
|
10
|
+
readonly description: "Default component surface.";
|
|
11
|
+
} | {
|
|
12
|
+
readonly name: "--seblify-color-surface-raised";
|
|
13
|
+
readonly category: "Surface";
|
|
14
|
+
readonly value: "#ffffff";
|
|
15
|
+
readonly description: "Raised surface for panels, popovers, and elevated UI.";
|
|
16
|
+
} | {
|
|
17
|
+
readonly name: "--seblify-color-surface-muted";
|
|
18
|
+
readonly category: "Surface";
|
|
19
|
+
readonly value: "#f2ebe4";
|
|
20
|
+
readonly description: "Muted surface for inactive controls and subtle areas.";
|
|
21
|
+
} | {
|
|
22
|
+
readonly name: "--seblify-color-surface-hover";
|
|
23
|
+
readonly category: "Surface";
|
|
24
|
+
readonly value: "#ebe1d8";
|
|
25
|
+
readonly description: "Surface color for hover states on neutral controls.";
|
|
26
|
+
} | {
|
|
27
|
+
readonly name: "--seblify-color-surface-inverse";
|
|
28
|
+
readonly category: "Surface";
|
|
29
|
+
readonly value: "#15110f";
|
|
30
|
+
readonly description: "High-contrast inverse surface for sidebars and snackbars.";
|
|
31
|
+
} | {
|
|
32
|
+
readonly name: "--seblify-color-surface-inverse-hover";
|
|
33
|
+
readonly category: "Surface";
|
|
34
|
+
readonly value: "#241d19";
|
|
35
|
+
readonly description: "Hover or active state on inverse surfaces.";
|
|
36
|
+
} | {
|
|
37
|
+
readonly name: "--seblify-color-border";
|
|
38
|
+
readonly category: "Border";
|
|
39
|
+
readonly value: "#ded0c4";
|
|
40
|
+
readonly description: "Default border for controls and containers.";
|
|
41
|
+
} | {
|
|
42
|
+
readonly name: "--seblify-color-border-strong";
|
|
43
|
+
readonly category: "Border";
|
|
44
|
+
readonly value: "#c5afa0";
|
|
45
|
+
readonly description: "Stronger border for interactive controls.";
|
|
46
|
+
} | {
|
|
47
|
+
readonly name: "--seblify-color-border-inverse";
|
|
48
|
+
readonly category: "Border";
|
|
49
|
+
readonly value: "#4a3b32";
|
|
50
|
+
readonly description: "Border used on inverse surfaces.";
|
|
51
|
+
} | {
|
|
52
|
+
readonly name: "--seblify-color-text";
|
|
53
|
+
readonly category: "Text";
|
|
54
|
+
readonly value: "#211916";
|
|
55
|
+
readonly description: "Primary text color on page and surface backgrounds.";
|
|
56
|
+
} | {
|
|
57
|
+
readonly name: "--seblify-color-text-muted";
|
|
58
|
+
readonly category: "Text";
|
|
59
|
+
readonly value: "#6f5f55";
|
|
60
|
+
readonly description: "Secondary text for descriptions, helper text, and metadata.";
|
|
61
|
+
} | {
|
|
62
|
+
readonly name: "--seblify-color-text-subtle";
|
|
63
|
+
readonly category: "Text";
|
|
64
|
+
readonly value: "#8b7a70";
|
|
65
|
+
readonly description: "Lower-emphasis text for labels, separators, and quiet UI.";
|
|
66
|
+
} | {
|
|
67
|
+
readonly name: "--seblify-color-text-inverse";
|
|
68
|
+
readonly category: "Text";
|
|
69
|
+
readonly value: "#fff4e7";
|
|
70
|
+
readonly description: "Text placed on inverse surfaces.";
|
|
71
|
+
} | {
|
|
2
72
|
name: string;
|
|
3
73
|
category: string;
|
|
4
74
|
value: string;
|
|
5
75
|
description: string;
|
|
6
|
-
}[];
|
|
76
|
+
})[];
|
|
7
77
|
export default themeTokens;
|