@enablo/swirlcn-ui 0.0.0-stage → 0.5.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/LICENSE +21 -0
- package/README.md +30 -2
- package/dist/chunk-3DJWDNQL.js +77 -0
- package/dist/chunk-7XUCETA6.js +447 -0
- package/dist/chunk-KZESIYUN.js +18 -0
- package/dist/flip.d.ts +98 -0
- package/dist/flip.js +158 -0
- package/dist/fonts/Inter-italic.var.woff2 +0 -0
- package/dist/fonts/Inter.var.woff2 +0 -0
- package/dist/fonts/OFL.txt +96 -0
- package/dist/index.d.ts +2459 -0
- package/dist/index.js +8439 -0
- package/dist/server.d.ts +144 -0
- package/dist/server.js +88 -0
- package/dist/spacing-BQaEPbUv.d.ts +59 -0
- package/dist/theme.css +146 -0
- package/package.json +84 -3
- package/src/components/accordion.tsx +102 -0
- package/src/components/action-list.tsx +294 -0
- package/src/components/alert-dialog.tsx +155 -0
- package/src/components/autocomplete.tsx +313 -0
- package/src/components/avatar.tsx +258 -0
- package/src/components/badge.tsx +100 -0
- package/src/components/banner.tsx +112 -0
- package/src/components/button-group.tsx +87 -0
- package/src/components/button.tsx +362 -0
- package/src/components/card.tsx +186 -0
- package/src/components/carousel.tsx +245 -0
- package/src/components/checkbox.tsx +125 -0
- package/src/components/chip.tsx +153 -0
- package/src/components/color-input.tsx +98 -0
- package/src/components/data-cell.tsx +230 -0
- package/src/components/date-input.tsx +223 -0
- package/src/components/date-picker.tsx +276 -0
- package/src/components/description-list.tsx +97 -0
- package/src/components/dialog.tsx +405 -0
- package/src/components/empty-state.tsx +63 -0
- package/src/components/file-chip.tsx +206 -0
- package/src/components/file-uploader.tsx +148 -0
- package/src/components/flip-app-header.tsx +104 -0
- package/src/components/flip-brand.tsx +77 -0
- package/src/components/flip-theme.tsx +95 -0
- package/src/components/form-control.tsx +397 -0
- package/src/components/form-group.tsx +26 -0
- package/src/components/heading.tsx +70 -0
- package/src/components/icon.tsx +119 -0
- package/src/components/image-grid.tsx +285 -0
- package/src/components/inline-notification.tsx +167 -0
- package/src/components/inline-status.tsx +100 -0
- package/src/components/input.tsx +390 -0
- package/src/components/label.tsx +28 -0
- package/src/components/lightbox.tsx +314 -0
- package/src/components/link.tsx +46 -0
- package/src/components/list.tsx +40 -0
- package/src/components/menu.tsx +530 -0
- package/src/components/option-list.tsx +582 -0
- package/src/components/pagination.tsx +336 -0
- package/src/components/popover.tsx +194 -0
- package/src/components/progress.tsx +158 -0
- package/src/components/radio-group.tsx +136 -0
- package/src/components/resource-list.tsx +686 -0
- package/src/components/search.tsx +127 -0
- package/src/components/select.tsx +456 -0
- package/src/components/separator.tsx +93 -0
- package/src/components/skeleton-box.tsx +63 -0
- package/src/components/skeleton-text.tsx +66 -0
- package/src/components/spinner.tsx +83 -0
- package/src/components/stack.tsx +86 -0
- package/src/components/status-indicator.tsx +31 -0
- package/src/components/switch.tsx +90 -0
- package/src/components/table.tsx +242 -0
- package/src/components/tabs.tsx +147 -0
- package/src/components/tag.tsx +169 -0
- package/src/components/text.tsx +126 -0
- package/src/components/textarea.tsx +130 -0
- package/src/components/theme-provider.tsx +115 -0
- package/src/components/thumbnail.tsx +250 -0
- package/src/components/time-input.tsx +123 -0
- package/src/components/toast.tsx +217 -0
- package/src/components/toggle-group.tsx +124 -0
- package/src/components/toolbar.tsx +105 -0
- package/src/components/tooltip.tsx +97 -0
- package/src/components/tree-navigation.tsx +194 -0
- package/src/components/tree-view.tsx +292 -0
- package/src/flip.ts +12 -0
- package/src/index.ts +317 -0
- package/src/lib/date-mask.ts +176 -0
- package/src/lib/field-context.ts +86 -0
- package/src/lib/flip-app-script.ts +38 -0
- package/src/lib/flip-host.ts +84 -0
- package/src/lib/flip-theme-css.ts +90 -0
- package/src/lib/focus.ts +18 -0
- package/src/lib/glyphs.ts +137 -0
- package/src/lib/spacing.ts +93 -0
- package/src/lib/theme-context.ts +27 -0
- package/src/lib/theme-script.ts +49 -0
- package/src/lib/use-mobile.ts +17 -0
- package/src/lib/utils.ts +28 -0
- package/src/server.ts +20 -0
- package/src/styles/fonts/Inter-italic.var.woff2 +0 -0
- package/src/styles/fonts/Inter.var.woff2 +0 -0
- package/src/styles/fonts/OFL.txt +96 -0
- package/src/styles/theme.css +146 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Swirl's 24px glyphs that several fields share, as plain path data so this
|
|
3
|
+
* module needs no JSX. Copied from @enablo/swirlcn-icons; the UI package does
|
|
4
|
+
* not depend on the icons package.
|
|
5
|
+
*/
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
|
|
8
|
+
type GlyphPath = { d: string; fillRule?: "evenodd" };
|
|
9
|
+
|
|
10
|
+
const GLYPHS = {
|
|
11
|
+
arrowBack: [
|
|
12
|
+
{ d: "M14.2614 19.6671L7.24967 12.6762C7.16645 12.5791 7.10403 12.4751 7.06242 12.3641C7.02081 12.2531 7 12.1352 7 12.0104C7 11.8856 7.02081 11.7677 7.06242 11.6567C7.10403 11.5457 7.16645 11.4417 7.24967 11.3446L14.2614 4.3329C14.4833 4.11097 14.7574 4 15.0836 4C15.4093 4 15.6831 4.1179 15.9051 4.35371C16.1409 4.57564 16.2588 4.84251 16.2588 5.15433C16.2588 5.4667 16.1409 5.74079 15.9051 5.97659L9.87126 12.0104L15.9051 18.0442C16.127 18.2661 16.238 18.533 16.238 18.8448C16.238 19.1572 16.1201 19.4313 15.8843 19.6671C15.6623 19.889 15.3952 20 15.0828 20C14.771 20 14.4972 19.889 14.2614 19.6671Z" },
|
|
13
|
+
],
|
|
14
|
+
arrowForward: [
|
|
15
|
+
{ d: "M9.73739 19.6671L16.7491 12.6762C16.8323 12.5791 16.8947 12.4751 16.9363 12.3641C16.978 12.2531 16.9988 12.1352 16.9988 12.0104C16.9988 11.8856 16.978 11.7677 16.9363 11.6567C16.8947 11.5457 16.8323 11.4417 16.7491 11.3446L9.73739 4.3329C9.51546 4.11097 9.24137 4 8.91513 4C8.58944 4 8.31563 4.1179 8.0937 4.35371C7.85789 4.57564 7.73999 4.84251 7.73999 5.15433C7.73999 5.4667 7.85789 5.74079 8.0937 5.97659L14.1275 12.0104L8.0937 18.0442C7.87176 18.2661 7.7608 18.533 7.7608 18.8448C7.7608 19.1572 7.8787 19.4313 8.1145 19.6671C8.33643 19.889 8.60359 20 8.91596 20C9.22778 20 9.50159 19.889 9.73739 19.6671Z" },
|
|
16
|
+
],
|
|
17
|
+
// Swirl's ArrowLeft: Material Symbols Rounded arrow_back, with a shaft. Swirl's
|
|
18
|
+
// own ArrowBack is a bare chevron.
|
|
19
|
+
arrowLeft: [
|
|
20
|
+
{ d: "M10.725 19.2999L4.225 12.7999C4.10833 12.6832 4.025 12.5582 3.975 12.4249C3.925 12.2916 3.9 12.1499 3.9 11.9999C3.9 11.8499 3.925 11.7082 3.975 11.5749C4.025 11.4416 4.10833 11.3166 4.225 11.1999L10.725 4.6999C10.9417 4.4999 11.2043 4.39557 11.513 4.3869C11.821 4.3789 12.0917 4.48323 12.325 4.6999C12.5583 4.91657 12.6793 5.18324 12.688 5.4999C12.696 5.81657 12.5833 6.08324 12.35 6.2999L7.8 10.8499H18.475C18.7917 10.8499 19.0627 10.9626 19.288 11.1879C19.5127 11.4126 19.625 11.6832 19.625 11.9999C19.625 12.3166 19.5127 12.5872 19.288 12.8119C19.0627 13.0372 18.7917 13.1499 18.475 13.1499H7.8L12.35 17.6999C12.5667 17.8999 12.6793 18.1626 12.688 18.4879C12.696 18.8126 12.5833 19.0832 12.35 19.2999C12.1333 19.5166 11.8667 19.6249 11.55 19.6249C11.2333 19.6249 10.9583 19.5166 10.725 19.2999V19.2999Z" },
|
|
21
|
+
],
|
|
22
|
+
arrowRight: [
|
|
23
|
+
{ d: "M11.2 19.2999C10.9833 19.0832 10.871 18.8166 10.863 18.4999C10.8543 18.1832 10.9583 17.9166 11.175 17.6999L15.725 13.1499H5.05C4.73333 13.1499 4.46267 13.0372 4.238 12.8119C4.01267 12.5872 3.9 12.3166 3.9 11.9999C3.9 11.6832 4.01267 11.4126 4.238 11.1879C4.46267 10.9626 4.73333 10.8499 5.05 10.8499H15.725L11.175 6.2999C10.9583 6.08324 10.8543 5.81657 10.863 5.4999C10.871 5.18324 10.9833 4.91657 11.2 4.6999C11.4167 4.4999 11.6833 4.3999 12 4.3999C12.3167 4.3999 12.5833 4.4999 12.8 4.6999L19.3 11.1999C19.4167 11.2999 19.5 11.4206 19.55 11.5619C19.6 11.7039 19.625 11.8499 19.625 11.9999C19.625 12.1499 19.6 12.2916 19.55 12.4249C19.5 12.5582 19.4167 12.6832 19.3 12.7999L12.8 19.2999C12.5833 19.5166 12.3167 19.6209 12 19.6129C11.6833 19.6042 11.4167 19.4999 11.2 19.2999V19.2999Z" },
|
|
24
|
+
],
|
|
25
|
+
attachment: [
|
|
26
|
+
{ d: "M12.8574 19.3194C11.726 20.4507 10.3738 21.0134 8.80068 21.0072C7.22713 21.0016 5.88057 20.439 4.76098 19.3194C3.62961 18.188 3.0611 16.8355 3.05544 15.262C3.04931 13.6889 3.61193 12.3367 4.7433 11.2053L12.2386 3.70999C13.0518 2.89682 14.0387 2.49306 15.1993 2.49872C16.3604 2.50484 17.3475 2.91449 18.1607 3.72767C18.9738 4.54084 19.3804 5.5249 19.3804 6.67984C19.3804 7.83478 18.9738 8.81884 18.1607 9.63201L11.4078 16.3849C10.8892 16.9034 10.2677 17.1658 9.54314 17.1719C8.81812 17.1775 8.19634 16.9211 7.6778 16.4026C7.14747 15.8722 6.88536 15.2448 6.89149 14.5202C6.89715 13.7952 7.15925 13.1734 7.6778 12.6549L13.8296 6.50306C13.9946 6.33807 14.1919 6.25251 14.4215 6.24638C14.6515 6.24072 14.8549 6.32628 15.0317 6.50306C15.1967 6.66805 15.2764 6.86557 15.2707 7.09562C15.2646 7.32519 15.179 7.52247 15.014 7.68747L8.8622 13.8393C8.67364 14.0279 8.57936 14.2518 8.57936 14.511C8.57936 14.7703 8.67953 15.0001 8.87988 15.2005C9.06844 15.389 9.29236 15.4833 9.55163 15.4833C9.8109 15.4833 10.0348 15.389 10.2234 15.2005L16.9762 8.4476C17.4712 7.95263 17.7187 7.36337 17.7187 6.67984C17.7187 5.9963 17.4712 5.40704 16.9762 4.91207C16.4813 4.4171 15.892 4.16961 15.2085 4.16961C14.5249 4.16961 13.9357 4.4171 13.4407 4.91207L5.94538 12.4074C5.15578 13.197 4.76098 14.1514 4.76098 15.2705C4.76098 16.3905 5.15578 17.3454 5.94538 18.135C6.73499 18.9246 7.68675 19.3163 8.80068 19.3102C9.91414 19.3045 10.8657 18.9069 11.6553 18.1173L18.5496 11.223C18.7146 11.058 18.9149 10.9755 19.1506 10.9755C19.3863 10.9755 19.5867 11.058 19.7516 11.223C19.9284 11.3998 20.0137 11.603 20.0076 11.8325C20.002 12.0626 19.9166 12.2601 19.7516 12.4251L12.8574 19.3194Z" },
|
|
27
|
+
],
|
|
28
|
+
audioFile: [
|
|
29
|
+
{ d: "M10.75 19C11.3833 19 11.9167 18.7833 12.35 18.35C12.7833 17.9167 13 17.3833 13 16.75V13H15C15.2833 13 15.5208 12.9042 15.7125 12.7125C15.9042 12.5208 16 12.2833 16 12C16 11.7167 15.9042 11.4792 15.7125 11.2875C15.5208 11.0958 15.2833 11 15 11H13C12.7167 11 12.4792 11.0958 12.2875 11.2875C12.0958 11.4792 12 11.7167 12 12V14.875C11.8167 14.7417 11.6208 14.6458 11.4125 14.5875C11.2042 14.5292 10.9833 14.5 10.75 14.5C10.1167 14.5 9.58333 14.7167 9.15 15.15C8.71667 15.5833 8.5 16.1167 8.5 16.75C8.5 17.3833 8.71667 17.9167 9.15 18.35C9.58333 18.7833 10.1167 19 10.75 19ZM6 22C5.45 22 4.97917 21.8042 4.5875 21.4125C4.19583 21.0208 4 20.55 4 20V4C4 3.45 4.19583 2.97917 4.5875 2.5875C4.97917 2.19583 5.45 2 6 2H13.175C13.4417 2 13.6958 2.05 13.9375 2.15C14.1792 2.25 14.3917 2.39167 14.575 2.575L19.425 7.425C19.6083 7.60833 19.75 7.82083 19.85 8.0625C19.95 8.30417 20 8.55833 20 8.825V20C20 20.55 19.8042 21.0208 19.4125 21.4125C19.0208 21.8042 18.55 22 18 22H6ZM13 8V4H6V20H18V9H14C13.7167 9 13.4792 8.90417 13.2875 8.7125C13.0958 8.52083 13 8.28333 13 8Z" },
|
|
30
|
+
],
|
|
31
|
+
cancel: [
|
|
32
|
+
{ d: "M12 2C6.47 2 2 6.47 2 12C2 17.53 6.47 22 12 22C17.53 22 22 17.53 22 12C22 6.47 17.53 2 12 2ZM16.3 16.3C15.91 16.69 15.28 16.69 14.89 16.3L12 13.41L9.11 16.3C8.72 16.69 8.09 16.69 7.7 16.3C7.31 15.91 7.31 15.28 7.7 14.89L10.59 12L7.7 9.11C7.31 8.72 7.31 8.09 7.7 7.7C8.09 7.31 8.72 7.31 9.11 7.7L12 10.59L14.89 7.7C15.28 7.31 15.91 7.31 16.3 7.7C16.69 8.09 16.69 8.72 16.3 9.11L13.41 12L16.3 14.89C16.68 15.27 16.68 15.91 16.3 16.3Z" },
|
|
33
|
+
],
|
|
34
|
+
checkSmall: [
|
|
35
|
+
{ d: "M18.6213 7.37879C19.2071 7.96458 19.2071 8.91433 18.6213 9.50011L10.6213 17.5C10.0355 18.0858 9.08577 18.0858 8.49998 17.5L5.56068 14.5605C4.97489 13.9748 4.97489 13.025 5.56068 12.4392C6.14646 11.8534 7.09621 11.8534 7.682 12.4392L9.56064 14.318L16.5 7.37879C17.0858 6.79301 18.0355 6.79301 18.6213 7.37879Z", fillRule: "evenodd" },
|
|
36
|
+
],
|
|
37
|
+
checkStrong: [
|
|
38
|
+
{ d: "M19.5607 6.43934C20.1464 7.02513 20.1464 7.97487 19.5607 8.56066L10.0607 18.0607C9.47487 18.6464 8.52513 18.6464 7.93934 18.0607L4.43934 14.5607C3.85355 13.9749 3.85355 13.0251 4.43934 12.4393C5.02513 11.8536 5.97487 11.8536 6.56066 12.4393L9 14.8787L17.4393 6.43934C18.0251 5.85355 18.9749 5.85355 19.5607 6.43934Z", fillRule: "evenodd" },
|
|
39
|
+
],
|
|
40
|
+
chevronLeft: [
|
|
41
|
+
{ d: "M13.2 17.4L8.59999 12.8C8.48333 12.6834 8.39999 12.5584 8.34999 12.425C8.29999 12.2917 8.27499 12.15 8.27499 12C8.27499 11.85 8.29999 11.7084 8.34999 11.575C8.39999 11.4417 8.48333 11.3167 8.59999 11.2L13.2 6.60002C13.4167 6.38336 13.6833 6.27502 14 6.27502C14.3167 6.27502 14.5833 6.38336 14.8 6.60002C15.0167 6.81669 15.125 7.08336 15.125 7.40002C15.125 7.71669 15.0167 7.98336 14.8 8.20002L11 12L14.8 15.8C15.0167 16.0167 15.125 16.2834 15.125 16.6C15.125 16.9167 15.0167 17.1834 14.8 17.4C14.5833 17.6167 14.3167 17.725 14 17.725C13.6833 17.725 13.4167 17.6167 13.2 17.4Z" },
|
|
42
|
+
],
|
|
43
|
+
chevronRight: [
|
|
44
|
+
{ d: "M8.59999 17.4C8.38333 17.1834 8.27499 16.9167 8.27499 16.6C8.27499 16.2834 8.38333 16.0167 8.59999 15.8L12.4 12L8.59999 8.20002C8.38333 7.98336 8.27499 7.71669 8.27499 7.40002C8.27499 7.08336 8.38333 6.81669 8.59999 6.60002C8.81666 6.38336 9.08333 6.27502 9.39999 6.27502C9.71666 6.27502 9.98333 6.38336 10.2 6.60002L14.8 11.2C14.9167 11.3167 15 11.4417 15.05 11.575C15.1 11.7084 15.125 11.85 15.125 12C15.125 12.15 15.1 12.2917 15.05 12.425C15 12.5584 14.9167 12.6834 14.8 12.8L10.2 17.4C9.98333 17.6167 9.71666 17.725 9.39999 17.725C9.08333 17.725 8.81666 17.6167 8.59999 17.4Z" },
|
|
45
|
+
],
|
|
46
|
+
close: [
|
|
47
|
+
{ d: "M12 13.6L7.19999 18.4C6.98333 18.6167 6.71666 18.725 6.39999 18.725C6.08333 18.725 5.81666 18.6167 5.59999 18.4C5.38333 18.1834 5.27499 17.9167 5.27499 17.6C5.27499 17.2834 5.38333 17.0167 5.59999 16.8L10.4 12L5.59999 7.20002C5.38333 6.98336 5.27499 6.71669 5.27499 6.40002C5.27499 6.08336 5.38333 5.81669 5.59999 5.60002C5.81666 5.38336 6.08333 5.27502 6.39999 5.27502C6.71666 5.27502 6.98333 5.38336 7.19999 5.60002L12 10.4L16.8 5.60002C17.0167 5.38336 17.2833 5.27502 17.6 5.27502C17.9167 5.27502 18.1833 5.38336 18.4 5.60002C18.6167 5.81669 18.725 6.08336 18.725 6.40002C18.725 6.71669 18.6167 6.98336 18.4 7.20002L13.6 12L18.4 16.8C18.6167 17.0167 18.725 17.2834 18.725 17.6C18.725 17.9167 18.6167 18.1834 18.4 18.4C18.1833 18.6167 17.9167 18.725 17.6 18.725C17.2833 18.725 17.0167 18.6167 16.8 18.4L12 13.6Z" },
|
|
48
|
+
],
|
|
49
|
+
cloudUpload: [
|
|
50
|
+
{ d: "M6.5 20C4.98333 20 3.68767 19.475 2.613 18.425C1.53767 17.375 1 16.0917 1 14.575C1 13.275 1.39167 12.1167 2.175 11.1C2.95833 10.0833 3.98333 9.43333 5.25 9.15C5.66667 7.61667 6.5 6.375 7.75 5.425C9 4.475 10.4167 4 12 4C13.95 4 15.604 4.679 16.962 6.037C18.3207 7.39567 19 9.05 19 11C20.15 11.1333 21.1043 11.629 21.863 12.487C22.621 13.3457 23 14.35 23 15.5C23 16.75 22.5627 17.8127 21.688 18.688C20.8127 19.5627 19.75 20 18.5 20H13C12.45 20 11.9793 19.8043 11.588 19.413C11.196 19.021 11 18.55 11 18V12.8L10.1 13.7C9.91667 13.8833 9.68333 13.975 9.4 13.975C9.11667 13.975 8.88333 13.8833 8.7 13.7C8.51667 13.5167 8.425 13.2833 8.425 13C8.425 12.7167 8.51667 12.4833 8.7 12.3L11.3 9.7C11.4 9.6 11.5083 9.529 11.625 9.487C11.7417 9.44567 11.8667 9.425 12 9.425C12.1333 9.425 12.2583 9.44567 12.375 9.487C12.4917 9.529 12.6 9.6 12.7 9.7L15.3 12.3C15.4833 12.4833 15.575 12.7167 15.575 13C15.575 13.2833 15.4833 13.5167 15.3 13.7C15.1167 13.8833 14.8833 13.975 14.6 13.975C14.3167 13.975 14.0833 13.8833 13.9 13.7L13 12.8V18H18.5C19.2 18 19.7917 17.7583 20.275 17.275C20.7583 16.7917 21 16.2 21 15.5C21 14.8 20.7583 14.2083 20.275 13.725C19.7917 13.2417 19.2 13 18.5 13H17V11C17 9.61667 16.5127 8.43733 15.538 7.462C14.5627 6.48733 13.3833 6 12 6C10.6167 6 9.43767 6.48733 8.463 7.462C7.48767 8.43733 7 9.61667 7 11H6.5C5.53333 11 4.70833 11.3417 4.025 12.025C3.34167 12.7083 3 13.5333 3 14.5C3 15.4667 3.34167 16.2917 4.025 16.975C4.70833 17.6583 5.53333 18 6.5 18H8C8.28333 18 8.521 18.096 8.713 18.288C8.90433 18.4793 9 18.7167 9 19C9 19.2833 8.90433 19.5207 8.713 19.712C8.521 19.904 8.28333 20 8 20H6.5Z" },
|
|
51
|
+
],
|
|
52
|
+
crop: [
|
|
53
|
+
{ d: "M17 15V7H9V5H17C17.55 5 18.0208 5.19583 18.4125 5.5875C18.8042 5.97917 19 6.45 19 7V15H17ZM18 23C17.7167 23 17.4792 22.9042 17.2875 22.7125C17.0958 22.5208 17 22.2833 17 22V19H7C6.45 19 5.97917 18.8042 5.5875 18.4125C5.19583 18.0208 5 17.55 5 17V7H2C1.71667 7 1.47917 6.90417 1.2875 6.7125C1.09583 6.52083 1 6.28333 1 6C1 5.71667 1.09583 5.47917 1.2875 5.2875C1.47917 5.09583 1.71667 5 2 5H5V2C5 1.71667 5.09583 1.47917 5.2875 1.2875C5.47917 1.09583 5.71667 1 6 1C6.28333 1 6.52083 1.09583 6.7125 1.2875C6.90417 1.47917 7 1.71667 7 2V17H22C22.2833 17 22.5208 17.0958 22.7125 17.2875C22.9042 17.4792 23 17.7167 23 18C23 18.2833 22.9042 18.5208 22.7125 18.7125C22.5208 18.9042 22.2833 19 22 19H19V22C19 22.2833 18.9042 22.5208 18.7125 22.7125C18.5208 22.9042 18.2833 23 18 23Z" },
|
|
54
|
+
],
|
|
55
|
+
delete: [
|
|
56
|
+
{ d: "M7 21C6.45 21 5.97933 20.8043 5.588 20.413C5.196 20.021 5 19.55 5 19V6C4.71667 6 4.479 5.90433 4.287 5.713C4.09567 5.521 4 5.28333 4 5C4 4.71667 4.09567 4.479 4.287 4.287C4.479 4.09567 4.71667 4 5 4H9C9 3.71667 9.096 3.479 9.288 3.287C9.47933 3.09567 9.71667 3 10 3H14C14.2833 3 14.521 3.09567 14.713 3.287C14.9043 3.479 15 3.71667 15 4H19C19.2833 4 19.5207 4.09567 19.712 4.287C19.904 4.479 20 4.71667 20 5C20 5.28333 19.904 5.521 19.712 5.713C19.5207 5.90433 19.2833 6 19 6V19C19 19.55 18.8043 20.021 18.413 20.413C18.021 20.8043 17.55 21 17 21H7ZM7 6V19H17V6H7ZM9 16C9 16.2833 9.096 16.5207 9.288 16.712C9.47933 16.904 9.71667 17 10 17C10.2833 17 10.521 16.904 10.713 16.712C10.9043 16.5207 11 16.2833 11 16V9C11 8.71667 10.9043 8.479 10.713 8.287C10.521 8.09567 10.2833 8 10 8C9.71667 8 9.47933 8.09567 9.288 8.287C9.096 8.479 9 8.71667 9 9V16ZM13 16C13 16.2833 13.096 16.5207 13.288 16.712C13.4793 16.904 13.7167 17 14 17C14.2833 17 14.521 16.904 14.713 16.712C14.9043 16.5207 15 16.2833 15 16V9C15 8.71667 14.9043 8.479 14.713 8.287C14.521 8.09567 14.2833 8 14 8C13.7167 8 13.4793 8.09567 13.288 8.287C13.096 8.479 13 8.71667 13 9V16Z" },
|
|
57
|
+
],
|
|
58
|
+
download: [
|
|
59
|
+
{ d: "M12 15.35C11.85 15.35 11.7083 15.325 11.575 15.275C11.4417 15.225 11.3167 15.1417 11.2 15.025L7.52501 11.35C7.30834 11.1333 7.20001 10.8667 7.20001 10.55C7.20001 10.2333 7.30834 9.96668 7.52501 9.75001C7.72501 9.55001 7.98734 9.44601 8.31201 9.43801C8.63734 9.42935 8.90834 9.52501 9.12501 9.72501L10.85 11.475V4.57501C10.85 4.25835 10.9627 3.99168 11.188 3.77501C11.4127 3.55835 11.6833 3.45001 12 3.45001C12.3167 3.45001 12.5873 3.55835 12.812 3.77501C13.0373 3.99168 13.15 4.25835 13.15 4.57501V11.475L14.875 9.72501C15.0917 9.52501 15.3627 9.42935 15.688 9.43801C16.0127 9.44601 16.275 9.55001 16.475 9.75001C16.6917 9.96668 16.8 10.2333 16.8 10.55C16.8 10.8667 16.6917 11.1333 16.475 11.35L12.8 15.025C12.6833 15.1417 12.5583 15.225 12.425 15.275C12.2917 15.325 12.15 15.35 12 15.35ZM5.87501 20.375C5.24167 20.375 4.70434 20.154 4.26301 19.712C3.82101 19.2707 3.60001 18.7333 3.60001 18.1V15.875C3.60001 15.5583 3.71267 15.2917 3.93801 15.075C4.16267 14.8583 4.43334 14.75 4.75001 14.75C5.06667 14.75 5.33334 14.8583 5.55001 15.075C5.76667 15.2917 5.87501 15.5583 5.87501 15.875V18.1H18.1V15.875C18.1 15.5583 18.2127 15.2917 18.438 15.075C18.6627 14.8583 18.9333 14.75 19.25 14.75C19.5667 14.75 19.8333 14.8583 20.05 15.075C20.2667 15.2917 20.375 15.5583 20.375 15.875V18.1C20.375 18.7333 20.154 19.2707 19.712 19.712C19.2707 20.154 18.7333 20.375 18.1 20.375H5.87501Z" },
|
|
60
|
+
],
|
|
61
|
+
dragHandle: [
|
|
62
|
+
{ d: "M7.5 6.0a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0 -3 0ZM7.5 12.0a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0 -3 0ZM7.5 18.0a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0 -3 0ZM13.5 6.0a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0 -3 0ZM13.5 12.0a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0 -3 0ZM13.5 18.0a1.5 1.5 0 1 0 3 0a1.5 1.5 0 1 0 -3 0Z" },
|
|
63
|
+
],
|
|
64
|
+
error: [
|
|
65
|
+
{ d: "M9.075 21C8.80833 21 8.554 20.95 8.312 20.85C8.07067 20.75 7.85833 20.6083 7.675 20.425L3.575 16.325C3.39167 16.1417 3.25 15.9293 3.15 15.688C3.05 15.446 3 15.1917 3 14.925V9.075C3 8.80833 3.05 8.554 3.15 8.312C3.25 8.07067 3.39167 7.85833 3.575 7.675L7.675 3.575C7.85833 3.39167 8.07067 3.25 8.312 3.15C8.554 3.05 8.80833 3 9.075 3H14.925C15.1917 3 15.446 3.05 15.688 3.15C15.9293 3.25 16.1417 3.39167 16.325 3.575L20.425 7.675C20.6083 7.85833 20.75 8.07067 20.85 8.312C20.95 8.554 21 8.80833 21 9.075V14.925C21 15.1917 20.95 15.446 20.85 15.688C20.75 15.9293 20.6083 16.1417 20.425 16.325L16.325 20.425C16.1417 20.6083 15.9293 20.75 15.688 20.85C15.446 20.95 15.1917 21 14.925 21H9.075ZM12 17C12.2833 17 12.521 16.904 12.713 16.712C12.9043 16.5207 13 16.2833 13 16C13 15.7167 12.9043 15.479 12.713 15.287C12.521 15.0957 12.2833 15 12 15C11.7167 15 11.4793 15.0957 11.288 15.287C11.096 15.479 11 15.7167 11 16C11 16.2833 11.096 16.5207 11.288 16.712C11.4793 16.904 11.7167 17 12 17ZM12 13C12.2833 13 12.521 12.904 12.713 12.712C12.9043 12.5207 13 12.2833 13 12V8C13 7.71667 12.9043 7.479 12.713 7.287C12.521 7.09567 12.2833 7 12 7C11.7167 7 11.4793 7.09567 11.288 7.287C11.096 7.479 11 7.71667 11 8V12C11 12.2833 11.096 12.5207 11.288 12.712C11.4793 12.904 11.7167 13 12 13ZM9.1 19H14.9L19 14.9V9.1L14.9 5H9.1L5 9.1V14.9L9.1 19Z" },
|
|
66
|
+
],
|
|
67
|
+
expandLess: [
|
|
68
|
+
{ d: "M6.59999 14.775C6.38333 14.5583 6.27499 14.2917 6.27499 13.975C6.27499 13.6583 6.38333 13.3917 6.59999 13.175L11.2 8.575C11.3167 8.45833 11.4417 8.375 11.575 8.325C11.7083 8.275 11.85 8.25 12 8.25C12.15 8.25 12.2917 8.275 12.425 8.325C12.5583 8.375 12.6833 8.45833 12.8 8.575L17.425 13.2C17.6417 13.4167 17.746 13.675 17.738 13.975C17.7293 14.275 17.6167 14.5417 17.4 14.775C17.1833 14.975 16.9167 15.075 16.6 15.075C16.2833 15.075 16.0167 14.975 15.8 14.775L12 10.95L8.17499 14.8C7.95833 15 7.69999 15.1 7.39999 15.1C7.09999 15.1 6.83333 14.9917 6.59999 14.775Z" },
|
|
69
|
+
],
|
|
70
|
+
expandMore: [
|
|
71
|
+
{ d: "M12 15.075C11.85 15.075 11.7083 15.05 11.575 15C11.4417 14.95 11.3167 14.875 11.2 14.775L6.57501 10.15C6.35835 9.93338 6.25435 9.67072 6.26301 9.36205C6.27101 9.05405 6.38335 8.79172 6.60001 8.57505C6.81668 8.35838 7.08335 8.25005 7.40001 8.25005C7.71668 8.25005 7.98335 8.35838 8.20001 8.57505L12 12.375L15.825 8.55005C16.0417 8.33338 16.3043 8.22938 16.613 8.23805C16.921 8.24605 17.1833 8.35838 17.4 8.57505C17.6167 8.79172 17.725 9.05838 17.725 9.37505C17.725 9.69172 17.6167 9.95838 17.4 10.175L12.8 14.775C12.6833 14.875 12.5583 14.95 12.425 15C12.2917 15.05 12.15 15.075 12 15.075Z" },
|
|
72
|
+
],
|
|
73
|
+
file: [
|
|
74
|
+
{ d: "M6 22C5.45 22 4.97933 21.8043 4.588 21.413C4.196 21.021 4 20.55 4 20V4C4 3.45 4.196 2.979 4.588 2.587C4.97933 2.19567 5.45 2 6 2H13.175C13.4417 2 13.696 2.05 13.938 2.15C14.1793 2.25 14.3917 2.39167 14.575 2.575L19.425 7.425C19.6083 7.60833 19.75 7.82067 19.85 8.062C19.95 8.304 20 8.55833 20 8.825V20C20 20.55 19.8043 21.021 19.413 21.413C19.021 21.8043 18.55 22 18 22H6ZM13 8V4H6V20H18V9H14C13.7167 9 13.4793 8.904 13.288 8.712C13.096 8.52067 13 8.28333 13 8Z" },
|
|
75
|
+
],
|
|
76
|
+
folder: [
|
|
77
|
+
{ d: "M4 20C3.45 20 2.97933 19.8043 2.588 19.413C2.196 19.021 2 18.55 2 18V6C2 5.45 2.196 4.97933 2.588 4.588C2.97933 4.196 3.45 4 4 4H9.175C9.44167 4 9.696 4.05 9.938 4.15C10.1793 4.25 10.3917 4.39167 10.575 4.575L12 6H20C20.55 6 21.021 6.196 21.413 6.588C21.8043 6.97933 22 7.45 22 8V18C22 18.55 21.8043 19.021 21.413 19.413C21.021 19.8043 20.55 20 20 20H4ZM4 6V18H20V8H11.175L9.175 6H4Z" },
|
|
78
|
+
],
|
|
79
|
+
gif: [
|
|
80
|
+
{ d: "M4 17C3.45 17 2.97917 16.8042 2.5875 16.4125C2.19583 16.0208 2 15.55 2 15V9C2 8.45 2.19583 7.97917 2.5875 7.5875C2.97917 7.19583 3.45 7 4 7H9C9.28333 7 9.52083 7.09583 9.7125 7.2875C9.90417 7.47917 10 7.71667 10 8C10 8.28333 9.90417 8.52083 9.7125 8.7125C9.52083 8.90417 9.28333 9 9 9H4V15H8V13H7C6.71667 13 6.47917 12.9042 6.2875 12.7125C6.09583 12.5208 6 12.2833 6 12C6 11.7167 6.09583 11.4792 6.2875 11.2875C6.47917 11.0958 6.71667 11 7 11H9C9.28333 11 9.52083 11.0958 9.7125 11.2875C9.90417 11.4792 10 11.7167 10 12V15C10 15.55 9.80417 16.0208 9.4125 16.4125C9.02083 16.8042 8.55 17 8 17H4ZM12 16V8C12 7.71667 12.0958 7.47917 12.2875 7.2875C12.4792 7.09583 12.7167 7 13 7C13.2833 7 13.5208 7.09583 13.7125 7.2875C13.9042 7.47917 14 7.71667 14 8V16C14 16.2833 13.9042 16.5208 13.7125 16.7125C13.5208 16.9042 13.2833 17 13 17C12.7167 17 12.4792 16.9042 12.2875 16.7125C12.0958 16.5208 12 16.2833 12 16ZM16 16V8C16 7.71667 16.0958 7.47917 16.2875 7.2875C16.4792 7.09583 16.7167 7 17 7H22C22.2833 7 22.5208 7.09583 22.7125 7.2875C22.9042 7.47917 23 7.71667 23 8C23 8.28333 22.9042 8.52083 22.7125 8.7125C22.5208 8.90417 22.2833 9 22 9H18V11H21C21.2833 11 21.5208 11.0958 21.7125 11.2875C21.9042 11.4792 22 11.7167 22 12C22 12.2833 21.9042 12.5208 21.7125 12.7125C21.5208 12.9042 21.2833 13 21 13H18V16C18 16.2833 17.9042 16.5208 17.7125 16.7125C17.5208 16.9042 17.2833 17 17 17C16.7167 17 16.4792 16.9042 16.2875 16.7125C16.0958 16.5208 16 16.2833 16 16Z" },
|
|
81
|
+
],
|
|
82
|
+
help: [
|
|
83
|
+
{ d: "M11.95 18C12.3 18 12.596 17.879 12.838 17.637C13.0793 17.3957 13.2 17.1 13.2 16.75C13.2 16.4 13.0793 16.1043 12.838 15.863C12.596 15.621 12.3 15.5 11.95 15.5C11.6 15.5 11.304 15.621 11.062 15.863C10.8207 16.1043 10.7 16.4 10.7 16.75C10.7 17.1 10.8207 17.3957 11.062 17.637C11.304 17.879 11.6 18 11.95 18ZM12.1 7.7C12.5667 7.7 12.9417 7.829 13.225 8.087C13.5083 8.34567 13.65 8.68333 13.65 9.1C13.65 9.38333 13.5543 9.67067 13.363 9.962C13.171 10.254 12.9 10.5583 12.55 10.875C12.05 11.3083 11.6833 11.725 11.45 12.125C11.2167 12.525 11.1 12.925 11.1 13.325C11.1 13.5583 11.1877 13.754 11.363 13.912C11.5377 14.0707 11.7417 14.15 11.975 14.15C12.2083 14.15 12.4167 14.0667 12.6 13.9C12.7833 13.7333 12.9 13.525 12.95 13.275C13 12.9917 13.1127 12.7293 13.288 12.488C13.4627 12.246 13.75 11.9333 14.15 11.55C14.6667 11.0667 15.0293 10.625 15.238 10.225C15.446 9.825 15.55 9.38333 15.55 8.9C15.55 8.05 15.2293 7.354 14.588 6.812C13.946 6.27067 13.1167 6 12.1 6C11.4 6 10.7793 6.13333 10.238 6.4C9.696 6.66667 9.275 7.075 8.975 7.625C8.85833 7.84167 8.81667 8.054 8.85 8.262C8.88333 8.47067 9 8.64167 9.2 8.775C9.41667 8.90833 9.65433 8.95 9.913 8.9C10.171 8.85 10.3833 8.70833 10.55 8.475C10.7333 8.225 10.9543 8.03333 11.213 7.9C11.471 7.76667 11.7667 7.7 12.1 7.7ZM12 22C10.6333 22 9.34167 21.7373 8.125 21.212C6.90833 20.6873 5.846 19.975 4.938 19.075C4.02933 18.175 3.31267 17.1167 2.788 15.9C2.26267 14.6833 2 13.3833 2 12C2 10.6167 2.26267 9.31667 2.788 8.1C3.31267 6.88333 4.02933 5.825 4.938 4.925C5.846 4.025 6.90833 3.31233 8.125 2.787C9.34167 2.26233 10.6333 2 12 2C13.4 2 14.7083 2.26233 15.925 2.787C17.1417 3.31233 18.2 4.025 19.1 4.925C20 5.825 20.7083 6.88333 21.225 8.1C21.7417 9.31667 22 10.6167 22 12C22 13.3833 21.7417 14.6833 21.225 15.9C20.7083 17.1167 20 18.175 19.1 19.075C18.2 19.975 17.1417 20.6873 15.925 21.212C14.7083 21.7373 13.4 22 12 22ZM12 20C14.2333 20 16.125 19.221 17.675 17.663C19.225 16.1043 20 14.2167 20 12C20 9.78333 19.225 7.89567 17.675 6.337C16.125 4.779 14.2333 4 12 4C9.81667 4 7.93733 4.779 6.362 6.337C4.78733 7.89567 4 9.78333 4 12C4 14.2167 4.78733 16.1043 6.362 17.663C7.93733 19.221 9.81667 20 12 20Z" },
|
|
84
|
+
],
|
|
85
|
+
image: [
|
|
86
|
+
{ d: "M7 17H17C17.2 17 17.35 16.9083 17.45 16.725C17.55 16.5417 17.5333 16.3667 17.4 16.2L14.65 12.525C14.55 12.3917 14.4167 12.325 14.25 12.325C14.0833 12.325 13.95 12.3917 13.85 12.525L11.25 16L9.4 13.525C9.3 13.3917 9.16667 13.325 9 13.325C8.83333 13.325 8.7 13.3917 8.6 13.525L6.6 16.2C6.46667 16.3667 6.45 16.5417 6.55 16.725C6.65 16.9083 6.8 17 7 17ZM5 21C4.45 21 3.979 20.8043 3.587 20.413C3.19567 20.021 3 19.55 3 19V5C3 4.45 3.19567 3.979 3.587 3.587C3.979 3.19567 4.45 3 5 3H19C19.55 3 20.021 3.19567 20.413 3.587C20.8043 3.979 21 4.45 21 5V19C21 19.55 20.8043 20.021 20.413 20.413C20.021 20.8043 19.55 21 19 21H5ZM5 19H19V5H5V19Z" },
|
|
87
|
+
],
|
|
88
|
+
info: [
|
|
89
|
+
{ d: "M12 17C12.2833 17 12.521 16.904 12.713 16.712C12.9043 16.5207 13 16.2833 13 16V11.975C13 11.6917 12.9043 11.4583 12.713 11.275C12.521 11.0917 12.2833 11 12 11C11.7167 11 11.4793 11.0957 11.288 11.287C11.096 11.479 11 11.7167 11 12V16.025C11 16.3083 11.096 16.5417 11.288 16.725C11.4793 16.9083 11.7167 17 12 17ZM12 9C12.2833 9 12.521 8.904 12.713 8.712C12.9043 8.52067 13 8.28333 13 8C13 7.71667 12.9043 7.479 12.713 7.287C12.521 7.09567 12.2833 7 12 7C11.7167 7 11.4793 7.09567 11.288 7.287C11.096 7.479 11 7.71667 11 8C11 8.28333 11.096 8.52067 11.288 8.712C11.4793 8.904 11.7167 9 12 9ZM12 22C10.6167 22 9.31667 21.7373 8.1 21.212C6.88333 20.6873 5.825 19.975 4.925 19.075C4.025 18.175 3.31267 17.1167 2.788 15.9C2.26267 14.6833 2 13.3833 2 12C2 10.6167 2.26267 9.31667 2.788 8.1C3.31267 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.31233 8.1 2.787C9.31667 2.26233 10.6167 2 12 2C13.3833 2 14.6833 2.26233 15.9 2.787C17.1167 3.31233 18.175 4.025 19.075 4.925C19.975 5.825 20.6873 6.88333 21.212 8.1C21.7373 9.31667 22 10.6167 22 12C22 13.3833 21.7373 14.6833 21.212 15.9C20.6873 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6873 15.9 21.212C14.6833 21.7373 13.3833 22 12 22ZM12 20C14.2167 20 16.1043 19.221 17.663 17.663C19.221 16.1043 20 14.2167 20 12C20 9.78333 19.221 7.89567 17.663 6.337C16.1043 4.779 14.2167 4 12 4C9.78333 4 7.896 4.779 6.338 6.337C4.77933 7.89567 4 9.78333 4 12C4 14.2167 4.77933 16.1043 6.338 17.663C7.896 19.221 9.78333 20 12 20Z" },
|
|
90
|
+
],
|
|
91
|
+
moreHorizontal: [
|
|
92
|
+
{ d: "M5.82501 14.1C5.24167 14.1 4.74601 13.8917 4.33801 13.475C3.92934 13.0584 3.72501 12.5667 3.72501 12C3.72501 11.4167 3.92934 10.9207 4.33801 10.512C4.74601 10.104 5.24167 9.90002 5.82501 9.90002C6.39167 9.90002 6.87934 10.104 7.28801 10.512C7.69601 10.9207 7.90001 11.4167 7.90001 12C7.90001 12.5667 7.69601 13.0584 7.28801 13.475C6.87934 13.8917 6.39167 14.1 5.82501 14.1ZM12 14.1C11.4333 14.1 10.9417 13.8917 10.525 13.475C10.1083 13.0584 9.90001 12.5667 9.90001 12C9.90001 11.4167 10.1083 10.9207 10.525 10.512C10.9417 10.104 11.4333 9.90002 12 9.90002C12.5833 9.90002 13.0793 10.104 13.488 10.512C13.896 10.9207 14.1 11.4167 14.1 12C14.1 12.5667 13.896 13.0584 13.488 13.475C13.0793 13.8917 12.5833 14.1 12 14.1ZM18.175 14.1C17.6083 14.1 17.1207 13.8917 16.712 13.475C16.304 13.0584 16.1 12.5667 16.1 12C16.1 11.4167 16.304 10.9207 16.712 10.512C17.1207 10.104 17.6083 9.90002 18.175 9.90002C18.7583 9.90002 19.2543 10.104 19.663 10.512C20.071 10.9207 20.275 11.4167 20.275 12C20.275 12.5667 20.071 13.0584 19.663 13.475C19.2543 13.8917 18.7583 14.1 18.175 14.1Z" },
|
|
93
|
+
],
|
|
94
|
+
pictureAsPdf: [
|
|
95
|
+
{ d: "M10 10.5H11C11.2833 10.5 11.5208 10.4042 11.7125 10.2125C11.9042 10.0208 12 9.78333 12 9.5V8.5C12 8.21667 11.9042 7.97917 11.7125 7.7875C11.5208 7.59583 11.2833 7.5 11 7.5H9.5C9.36667 7.5 9.25 7.55 9.15 7.65C9.05 7.75 9 7.86667 9 8V12C9 12.1333 9.05 12.25 9.15 12.35C9.25 12.45 9.36667 12.5 9.5 12.5C9.63333 12.5 9.75 12.45 9.85 12.35C9.95 12.25 10 12.1333 10 12V10.5ZM10 9.5V8.5H11V9.5H10ZM15 12.5C15.2833 12.5 15.5208 12.4042 15.7125 12.2125C15.9042 12.0208 16 11.7833 16 11.5V8.5C16 8.21667 15.9042 7.97917 15.7125 7.7875C15.5208 7.59583 15.2833 7.5 15 7.5H13.5C13.3667 7.5 13.25 7.55 13.15 7.65C13.05 7.75 13 7.86667 13 8V12C13 12.1333 13.05 12.25 13.15 12.35C13.25 12.45 13.3667 12.5 13.5 12.5H15ZM14 11.5V8.5H15V11.5H14ZM18 10.5H18.5C18.6333 10.5 18.75 10.45 18.85 10.35C18.95 10.25 19 10.1333 19 10C19 9.86667 18.95 9.75 18.85 9.65C18.75 9.55 18.6333 9.5 18.5 9.5H18V8.5H18.5C18.6333 8.5 18.75 8.45 18.85 8.35C18.95 8.25 19 8.13333 19 8C19 7.86667 18.95 7.75 18.85 7.65C18.75 7.55 18.6333 7.5 18.5 7.5H17.5C17.3667 7.5 17.25 7.55 17.15 7.65C17.05 7.75 17 7.86667 17 8V12C17 12.1333 17.05 12.25 17.15 12.35C17.25 12.45 17.3667 12.5 17.5 12.5C17.6333 12.5 17.75 12.45 17.85 12.35C17.95 12.25 18 12.1333 18 12V10.5ZM8 18C7.45 18 6.97917 17.8042 6.5875 17.4125C6.19583 17.0208 6 16.55 6 16V4C6 3.45 6.19583 2.97917 6.5875 2.5875C6.97917 2.19583 7.45 2 8 2H20C20.55 2 21.0208 2.19583 21.4125 2.5875C21.8042 2.97917 22 3.45 22 4V16C22 16.55 21.8042 17.0208 21.4125 17.4125C21.0208 17.8042 20.55 18 20 18H8ZM8 16H20V4H8V16ZM4 22C3.45 22 2.97917 21.8042 2.5875 21.4125C2.19583 21.0208 2 20.55 2 20V7C2 6.71667 2.09583 6.47917 2.2875 6.2875C2.47917 6.09583 2.71667 6 3 6C3.28333 6 3.52083 6.09583 3.7125 6.2875C3.90417 6.47917 4 6.71667 4 7V20H17C17.2833 20 17.5208 20.0958 17.7125 20.2875C17.9042 20.4792 18 20.7167 18 21C18 21.2833 17.9042 21.5208 17.7125 21.7125C17.5208 21.9042 17.2833 22 17 22H4Z" },
|
|
96
|
+
],
|
|
97
|
+
preview: [
|
|
98
|
+
{ d: "M 5 21 C 4.449219 21 3.980469 20.804688 3.585938 20.414062 C 3.195312 20.019531 3 19.550781 3 19 L 3 5 C 3 4.449219 3.195312 3.980469 3.585938 3.585938 C 3.980469 3.195312 4.449219 3 5 3 L 19 3 C 19.550781 3 20.019531 3.195312 20.414062 3.585938 C 20.804688 3.980469 21 4.449219 21 5 L 21 19 C 21 19.550781 20.804688 20.019531 20.414062 20.414062 C 20.019531 20.804688 19.550781 21 19 21 Z M 5 19 L 19 19 L 19 7 L 5 7 Z M 12 17 C 10.632812 17 9.414062 16.628906 8.335938 15.886719 C 7.261719 15.144531 6.484375 14.183594 6 13 C 6.484375 11.816406 7.261719 10.855469 8.335938 10.113281 C 9.414062 9.371094 10.632812 9 12 9 C 13.367188 9 14.585938 9.371094 15.664062 10.113281 C 16.738281 10.855469 17.515625 11.816406 18 13 C 17.515625 14.183594 16.738281 15.144531 15.664062 15.886719 C 14.585938 16.628906 13.367188 17 12 17 Z M 12 15.5 C 12.933594 15.5 13.785156 15.277344 14.550781 14.835938 C 15.316406 14.394531 15.917969 13.785156 16.351562 13 C 15.917969 12.214844 15.316406 11.605469 14.550781 11.164062 C 13.785156 10.722656 12.933594 10.5 12 10.5 C 11.066406 10.5 10.214844 10.722656 9.449219 11.164062 C 8.683594 11.605469 8.082031 12.214844 7.648438 13 C 8.082031 13.785156 8.683594 14.394531 9.449219 14.835938 C 10.214844 15.277344 11.066406 15.5 12 15.5 Z M 12 14.5 C 12.417969 14.5 12.769531 14.355469 13.0625 14.0625 C 13.355469 13.769531 13.5 13.417969 13.5 13 C 13.5 12.582031 13.355469 12.230469 13.0625 11.9375 C 12.769531 11.644531 12.417969 11.5 12 11.5 C 11.582031 11.5 11.230469 11.644531 10.9375 11.9375 C 10.644531 12.230469 10.5 12.582031 10.5 13 C 10.5 13.417969 10.644531 13.769531 10.9375 14.0625 C 11.230469 14.355469 11.582031 14.5 12 14.5 Z M 12 14.5" },
|
|
99
|
+
],
|
|
100
|
+
search: [
|
|
101
|
+
{ d: "M18.8 20.425L13.25 14.875C12.75 15.2583 12.175 15.5666 11.525 15.8C10.875 16.0333 10.1833 16.15 9.45001 16.15C7.60001 16.15 6.03335 15.504 4.75001 14.212C3.46668 12.9206 2.82501 11.35 2.82501 9.49998C2.82501 7.64998 3.46668 6.07898 4.75001 4.78698C6.03335 3.49564 7.60001 2.84998 9.45001 2.84998C11.3 2.84998 12.871 3.49564 14.163 4.78698C15.4543 6.07898 16.1 7.64998 16.1 9.49998C16.1 10.2333 15.9877 10.925 15.763 11.575C15.5377 12.225 15.2333 12.7916 14.85 13.275L20.425 18.875C20.625 19.075 20.725 19.3293 20.725 19.638C20.725 19.946 20.6167 20.2083 20.4 20.425C20.1833 20.6416 19.9127 20.75 19.588 20.75C19.2627 20.75 19 20.6416 18.8 20.425ZM9.45001 13.85C10.6667 13.85 11.7 13.429 12.55 12.587C13.4 11.7456 13.825 10.7166 13.825 9.49998C13.825 8.28331 13.4 7.25398 12.55 6.41198C11.7 5.57064 10.6667 5.14998 9.45001 5.14998C8.23335 5.14998 7.20435 5.57064 6.36301 6.41198C5.52101 7.25398 5.10001 8.28331 5.10001 9.49998C5.10001 10.7166 5.52101 11.7456 6.36301 12.587C7.20435 13.429 8.23335 13.85 9.45001 13.85Z" },
|
|
102
|
+
],
|
|
103
|
+
time: [
|
|
104
|
+
{ d: "M14.475 16C14.675 16.2 14.921 16.3 15.213 16.3C15.5043 16.3 15.7583 16.1917 15.975 15.975C16.175 15.775 16.275 15.5207 16.275 15.212C16.275 14.904 16.175 14.65 15.975 14.45L13.1 11.55V8.09999C13.1 7.78332 12.996 7.52499 12.788 7.32499C12.5793 7.12499 12.3167 7.02499 12 7.02499C11.6833 7.02499 11.421 7.12899 11.213 7.33699C11.0043 7.54565 10.9 7.80832 10.9 8.12499V11.95C10.9 12.1 10.9293 12.2457 10.988 12.387C11.046 12.529 11.1333 12.6583 11.25 12.775L14.475 16ZM12 22.2C10.5833 22.2 9.25399 21.9333 8.01199 21.4C6.77065 20.8667 5.69165 20.1417 4.77499 19.225C3.85832 18.3083 3.13332 17.2293 2.59999 15.988C2.06665 14.746 1.79999 13.4167 1.79999 12C1.79999 10.5833 2.06665 9.25399 2.59999 8.01199C3.13332 6.77065 3.85832 5.69165 4.77499 4.77499C5.69165 3.85832 6.77065 3.13332 8.01199 2.59999C9.25399 2.06665 10.5833 1.79999 12 1.79999C13.4167 1.79999 14.746 2.06665 15.988 2.59999C17.2293 3.13332 18.3083 3.85832 19.225 4.77499C20.1417 5.69165 20.8667 6.77065 21.4 8.01199C21.9333 9.25399 22.2 10.5833 22.2 12C22.2 13.4167 21.9333 14.746 21.4 15.988C20.8667 17.2293 20.1417 18.3083 19.225 19.225C18.3083 20.1417 17.2293 20.8667 15.988 21.4C14.746 21.9333 13.4167 22.2 12 22.2ZM12 19.925C14.2 19.925 16.071 19.1543 17.613 17.613C19.1543 16.071 19.925 14.2 19.925 12C19.925 9.79999 19.1543 7.92899 17.613 6.38699C16.071 4.84565 14.2 4.07499 12 4.07499C9.79999 4.07499 7.92932 4.84565 6.38799 6.38699C4.84599 7.92899 4.07499 9.79999 4.07499 12C4.07499 14.2 4.84599 16.071 6.38799 17.613C7.92932 19.1543 9.79999 19.925 12 19.925Z" },
|
|
105
|
+
],
|
|
106
|
+
today: [
|
|
107
|
+
{ d: "M9 16.5C8.3 16.5 7.70833 16.2583 7.225 15.775C6.74167 15.2917 6.5 14.7 6.5 14C6.5 13.3 6.74167 12.7083 7.225 12.225C7.70833 11.7417 8.3 11.5 9 11.5C9.7 11.5 10.2917 11.7417 10.775 12.225C11.2583 12.7083 11.5 13.3 11.5 14C11.5 14.7 11.2583 15.2917 10.775 15.775C10.2917 16.2583 9.7 16.5 9 16.5ZM5 22C4.45 22 3.979 21.8043 3.587 21.413C3.19567 21.021 3 20.55 3 20V6C3 5.45 3.19567 4.97933 3.587 4.588C3.979 4.196 4.45 4 5 4H6V3C6 2.71667 6.09567 2.479 6.287 2.287C6.479 2.09567 6.71667 2 7 2C7.28333 2 7.521 2.09567 7.713 2.287C7.90433 2.479 8 2.71667 8 3V4H16V3C16 2.71667 16.096 2.479 16.288 2.287C16.4793 2.09567 16.7167 2 17 2C17.2833 2 17.5207 2.09567 17.712 2.287C17.904 2.479 18 2.71667 18 3V4H19C19.55 4 20.021 4.196 20.413 4.588C20.8043 4.97933 21 5.45 21 6V20C21 20.55 20.8043 21.021 20.413 21.413C20.021 21.8043 19.55 22 19 22H5ZM5 20H19V10H5V20ZM5 8H19V6H5V8Z" },
|
|
108
|
+
],
|
|
109
|
+
videoPlayer: [
|
|
110
|
+
{ d: "M10.275 16L15.85 12.425C16 12.325 16.075 12.1833 16.075 12C16.075 11.8167 16 11.675 15.85 11.575L10.275 8C10.1083 7.88333 9.9375 7.875 9.7625 7.975C9.5875 8.075 9.5 8.225 9.5 8.425V15.575C9.5 15.775 9.5875 15.925 9.7625 16.025C9.9375 16.125 10.1083 16.1167 10.275 16ZM4 20C3.45 20 2.97917 19.8042 2.5875 19.4125C2.19583 19.0208 2 18.55 2 18V6C2 5.45 2.19583 4.97917 2.5875 4.5875C2.97917 4.19583 3.45 4 4 4H20C20.55 4 21.0208 4.19583 21.4125 4.5875C21.8042 4.97917 22 5.45 22 6V18C22 18.55 21.8042 19.0208 21.4125 19.4125C21.0208 19.8042 20.55 20 20 20H4ZM4 18H20V6H4V18Z" },
|
|
111
|
+
],
|
|
112
|
+
visibility: [
|
|
113
|
+
{ d: "M12 17C13.25 17 14.3127 16.5627 15.188 15.688C16.0627 14.8127 16.5 13.75 16.5 12.5C16.5 11.25 16.0627 10.1873 15.188 9.312C14.3127 8.43733 13.25 8 12 8C10.75 8 9.68732 8.43733 8.81199 9.312C7.93732 10.1873 7.49999 11.25 7.49999 12.5C7.49999 13.75 7.93732 14.8127 8.81199 15.688C9.68732 16.5627 10.75 17 12 17ZM12 15.2C11.25 15.2 10.6127 14.9373 10.088 14.412C9.56265 13.8873 9.29999 13.25 9.29999 12.5C9.29999 11.75 9.56265 11.1123 10.088 10.587C10.6127 10.0623 11.25 9.8 12 9.8C12.75 9.8 13.3877 10.0623 13.913 10.587C14.4377 11.1123 14.7 11.75 14.7 12.5C14.7 13.25 14.4377 13.8873 13.913 14.412C13.3877 14.9373 12.75 15.2 12 15.2ZM12 20C9.68332 20 7.56665 19.3877 5.64999 18.163C3.73332 16.9377 2.28332 15.2833 1.29999 13.2C1.24999 13.1167 1.21665 13.0123 1.19999 12.887C1.18332 12.7623 1.17499 12.6333 1.17499 12.5C1.17499 12.3667 1.18332 12.2373 1.19999 12.112C1.21665 11.9873 1.24999 11.8833 1.29999 11.8C2.28332 9.71667 3.73332 8.06267 5.64999 6.838C7.56665 5.61267 9.68332 5 12 5C14.3167 5 16.4333 5.61267 18.35 6.838C20.2667 8.06267 21.7167 9.71667 22.7 11.8C22.75 11.8833 22.7833 11.9873 22.8 12.112C22.8167 12.2373 22.825 12.3667 22.825 12.5C22.825 12.6333 22.8167 12.7623 22.8 12.887C22.7833 13.0123 22.75 13.1167 22.7 13.2C21.7167 15.2833 20.2667 16.9377 18.35 18.163C16.4333 19.3877 14.3167 20 12 20ZM12 18C13.8833 18 15.6127 17.504 17.188 16.512C18.7627 15.5207 19.9667 14.1833 20.8 12.5C19.9667 10.8167 18.7627 9.479 17.188 8.487C15.6127 7.49567 13.8833 7 12 7C10.1167 7 8.38732 7.49567 6.81199 8.487C5.23732 9.479 4.03332 10.8167 3.19999 12.5C4.03332 14.1833 5.23732 15.5207 6.81199 16.512C8.38732 17.504 10.1167 18 12 18Z" },
|
|
114
|
+
],
|
|
115
|
+
visibilityOff: [
|
|
116
|
+
{ d: "M16.1 12.3001L14.65 10.8501C14.8 10.0668 14.575 9.33343 13.975 8.6501C13.375 7.96676 12.6 7.7001 11.65 7.8501L10.2 6.4001C10.4833 6.26676 10.7707 6.16676 11.062 6.1001C11.354 6.03343 11.6667 6.0001 12 6.0001C13.25 6.0001 14.3127 6.43743 15.188 7.3121C16.0627 8.18743 16.5 9.2501 16.5 10.5001C16.5 10.8334 16.4667 11.1461 16.4 11.4381C16.3333 11.7294 16.2333 12.0168 16.1 12.3001ZM19.3 15.4501L17.85 14.0501C18.4833 13.5668 19.046 13.0374 19.538 12.4621C20.0293 11.8874 20.45 11.2334 20.8 10.5001C19.9667 8.81676 18.7707 7.4791 17.212 6.4871C15.654 5.49576 13.9167 5.0001 12 5.0001C11.5167 5.0001 11.0417 5.03343 10.575 5.1001C10.1083 5.16676 9.64999 5.26676 9.19999 5.4001L7.64999 3.8501C8.33332 3.56676 9.03332 3.3541 9.74999 3.2121C10.4667 3.07076 11.2167 3.0001 12 3.0001C14.3833 3.0001 16.525 3.6291 18.425 4.8871C20.325 6.14576 21.75 7.78343 22.7 9.8001C22.75 9.88343 22.7833 9.98743 22.8 10.1121C22.8167 10.2374 22.825 10.3668 22.825 10.5001C22.825 10.6334 22.8127 10.7624 22.788 10.8871C22.7627 11.0124 22.7333 11.1168 22.7 11.2001C22.3167 12.0501 21.8377 12.8334 21.263 13.5501C20.6877 14.2668 20.0333 14.9001 19.3 15.4501ZM19.1 20.9001L15.6 17.4501C15.0167 17.6334 14.4293 17.7711 13.838 17.8631C13.246 17.9544 12.6333 18.0001 12 18.0001C9.61665 18.0001 7.47499 17.3711 5.57499 16.1131C3.67499 14.8544 2.24999 13.2168 1.29999 11.2001C1.24999 11.1168 1.21665 11.0124 1.19999 10.8871C1.18332 10.7624 1.17499 10.6334 1.17499 10.5001C1.17499 10.3668 1.18332 10.2418 1.19999 10.1251C1.21665 10.0084 1.24999 9.90843 1.29999 9.8251C1.64999 9.0751 2.06665 8.38343 2.54999 7.7501C3.03332 7.11676 3.56665 6.53343 4.14999 6.0001L2.07499 3.9001C1.89165 3.71676 1.79999 3.48743 1.79999 3.2121C1.79999 2.93743 1.89999 2.7001 2.09999 2.5001C2.28332 2.31676 2.51665 2.2251 2.79999 2.2251C3.08332 2.2251 3.31665 2.31676 3.49999 2.5001L20.5 19.5001C20.6833 19.6834 20.7793 19.9128 20.788 20.1881C20.796 20.4628 20.7 20.7001 20.5 20.9001C20.3167 21.0834 20.0833 21.1751 19.8 21.1751C19.5167 21.1751 19.2833 21.0834 19.1 20.9001ZM5.54999 7.4001C5.06665 7.83343 4.62499 8.30843 4.22499 8.8251C3.82499 9.34176 3.48332 9.9001 3.19999 10.5001C4.03332 12.1834 5.22899 13.5208 6.78699 14.5121C8.34565 15.5041 10.0833 16.0001 12 16.0001C12.3333 16.0001 12.6583 15.9794 12.975 15.9381C13.2917 15.8961 13.6167 15.8501 13.95 15.8001L13.05 14.8501C12.8667 14.9001 12.6917 14.9374 12.525 14.9621C12.3583 14.9874 12.1833 15.0001 12 15.0001C10.75 15.0001 9.68732 14.5628 8.81199 13.6881C7.93732 12.8128 7.49999 11.7501 7.49999 10.5001C7.49999 10.3168 7.51232 10.1418 7.53699 9.9751C7.56232 9.80843 7.59999 9.63343 7.64999 9.4501L5.54999 7.4001Z" },
|
|
117
|
+
],
|
|
118
|
+
} satisfies Record<string, GlyphPath[]>;
|
|
119
|
+
|
|
120
|
+
export type GlyphName = keyof typeof GLYPHS;
|
|
121
|
+
|
|
122
|
+
/** A decorative 24px Swirl glyph that takes the current text colour. Size it with `className`. */
|
|
123
|
+
export function Glyph({ name, className }: { name: GlyphName; className?: string }) {
|
|
124
|
+
return React.createElement(
|
|
125
|
+
"svg",
|
|
126
|
+
{ viewBox: "0 0 24 24", className, "aria-hidden": true, focusable: false },
|
|
127
|
+
...(GLYPHS[name] as GlyphPath[]).map((path, index) =>
|
|
128
|
+
React.createElement("path", {
|
|
129
|
+
key: index,
|
|
130
|
+
d: path.d,
|
|
131
|
+
fillRule: path.fillRule,
|
|
132
|
+
clipRule: path.fillRule,
|
|
133
|
+
fill: "currentColor",
|
|
134
|
+
}),
|
|
135
|
+
),
|
|
136
|
+
);
|
|
137
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Swirl names spacing in pixels (`space-16`); Tailwind names it in 4px steps
|
|
3
|
+
* (`gap-4`). Every Swirl step exists in Tailwind's default scale, so this is a
|
|
4
|
+
* pure rename rather than a custom scale - see the note in the token generator.
|
|
5
|
+
*/
|
|
6
|
+
export const spacingScale = {
|
|
7
|
+
"0": "0",
|
|
8
|
+
"2": "0.5",
|
|
9
|
+
"4": "1",
|
|
10
|
+
"8": "2",
|
|
11
|
+
"12": "3",
|
|
12
|
+
"16": "4",
|
|
13
|
+
"20": "5",
|
|
14
|
+
"24": "6",
|
|
15
|
+
"32": "8",
|
|
16
|
+
"40": "10",
|
|
17
|
+
"48": "12",
|
|
18
|
+
"64": "16",
|
|
19
|
+
} as const;
|
|
20
|
+
|
|
21
|
+
export type SwirlSpacing = keyof typeof spacingScale;
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* The class for each step, written out in full. Tailwind only generates
|
|
25
|
+
* classes it finds as literal text in the source, so building them as
|
|
26
|
+
* `gap-${n}` silently produced nothing for any step not spelled out somewhere
|
|
27
|
+
* else - `<Stack spacing="32">` had no gap at all.
|
|
28
|
+
*/
|
|
29
|
+
const gaps = {
|
|
30
|
+
"0": "gap-0",
|
|
31
|
+
"2": "gap-0.5",
|
|
32
|
+
"4": "gap-1",
|
|
33
|
+
"8": "gap-2",
|
|
34
|
+
"12": "gap-3",
|
|
35
|
+
"16": "gap-4",
|
|
36
|
+
"20": "gap-5",
|
|
37
|
+
"24": "gap-6",
|
|
38
|
+
"32": "gap-8",
|
|
39
|
+
"40": "gap-10",
|
|
40
|
+
"48": "gap-12",
|
|
41
|
+
"64": "gap-16",
|
|
42
|
+
} as const satisfies Record<SwirlSpacing, string>;
|
|
43
|
+
|
|
44
|
+
const columnGaps = {
|
|
45
|
+
"0": "gap-x-0",
|
|
46
|
+
"2": "gap-x-0.5",
|
|
47
|
+
"4": "gap-x-1",
|
|
48
|
+
"8": "gap-x-2",
|
|
49
|
+
"12": "gap-x-3",
|
|
50
|
+
"16": "gap-x-4",
|
|
51
|
+
"20": "gap-x-5",
|
|
52
|
+
"24": "gap-x-6",
|
|
53
|
+
"32": "gap-x-8",
|
|
54
|
+
"40": "gap-x-10",
|
|
55
|
+
"48": "gap-x-12",
|
|
56
|
+
"64": "gap-x-16",
|
|
57
|
+
} as const satisfies Record<SwirlSpacing, string>;
|
|
58
|
+
|
|
59
|
+
const rowGaps = {
|
|
60
|
+
"0": "gap-y-0",
|
|
61
|
+
"2": "gap-y-0.5",
|
|
62
|
+
"4": "gap-y-1",
|
|
63
|
+
"8": "gap-y-2",
|
|
64
|
+
"12": "gap-y-3",
|
|
65
|
+
"16": "gap-y-4",
|
|
66
|
+
"20": "gap-y-5",
|
|
67
|
+
"24": "gap-y-6",
|
|
68
|
+
"32": "gap-y-8",
|
|
69
|
+
"40": "gap-y-10",
|
|
70
|
+
"48": "gap-y-12",
|
|
71
|
+
"64": "gap-y-16",
|
|
72
|
+
} as const satisfies Record<SwirlSpacing, string>;
|
|
73
|
+
|
|
74
|
+
const paddings = {
|
|
75
|
+
"0": "p-0",
|
|
76
|
+
"2": "p-0.5",
|
|
77
|
+
"4": "p-1",
|
|
78
|
+
"8": "p-2",
|
|
79
|
+
"12": "p-3",
|
|
80
|
+
"16": "p-4",
|
|
81
|
+
"20": "p-5",
|
|
82
|
+
"24": "p-6",
|
|
83
|
+
"32": "p-8",
|
|
84
|
+
"40": "p-10",
|
|
85
|
+
"48": "p-12",
|
|
86
|
+
"64": "p-16",
|
|
87
|
+
} as const satisfies Record<SwirlSpacing, string>;
|
|
88
|
+
|
|
89
|
+
/** `gap("16")` -> `"gap-4"` */
|
|
90
|
+
export const gap = (s: SwirlSpacing) => gaps[s];
|
|
91
|
+
export const gapX = (s: SwirlSpacing) => columnGaps[s];
|
|
92
|
+
export const gapY = (s: SwirlSpacing) => rowGaps[s];
|
|
93
|
+
export const padding = (s: SwirlSpacing) => paddings[s];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* The theme context on its own, so code that only reads or sets the theme
|
|
5
|
+
* (such as FlipThemeSync) does not have to bring ThemeProvider with it.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export type Theme = "light" | "dark" | "system";
|
|
9
|
+
|
|
10
|
+
export interface ThemeContextValue {
|
|
11
|
+
/** What the user chose. */
|
|
12
|
+
theme: Theme;
|
|
13
|
+
/** What is actually rendered right now - `system` resolved against the OS. */
|
|
14
|
+
resolvedTheme: "light" | "dark";
|
|
15
|
+
/**
|
|
16
|
+
* Switch the theme. Pass `{ persist: false }` to apply it without saving it
|
|
17
|
+
* as the user's choice, as `FlipThemeSync` does for a theme Flip decides.
|
|
18
|
+
*/
|
|
19
|
+
setTheme: (theme: Theme, options?: { persist?: boolean }) => void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const ThemeContext = React.createContext<ThemeContextValue | null>(null);
|
|
23
|
+
|
|
24
|
+
/** The surrounding `ThemeProvider`'s value, or `null` outside one. */
|
|
25
|
+
export function useOptionalTheme() {
|
|
26
|
+
return React.useContext(ThemeContext);
|
|
27
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { createElement } from "react";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Inline script that applies the stored theme class before first paint.
|
|
5
|
+
*
|
|
6
|
+
* This lives apart from `theme-provider.tsx` and is re-exported from
|
|
7
|
+
* `@enablo/swirlcn-ui/server` because it has to be callable from a *server* component
|
|
8
|
+
* - it belongs in the document `<head>`, and the component bundle is marked
|
|
9
|
+
* `"use client"`. It touches no React and no browser globals at call time; it
|
|
10
|
+
* only returns a string.
|
|
11
|
+
*
|
|
12
|
+
* Most apps want `<ThemeScript />` below instead. Use this directly only when
|
|
13
|
+
* the script has to go somewhere a React element cannot.
|
|
14
|
+
*/
|
|
15
|
+
export function themeScript(storageKey = "swirlcn-theme") {
|
|
16
|
+
// JSON.stringify keeps the key inside its string literal; escaping `<` also
|
|
17
|
+
// stops a key containing `</script>` from closing the tag early.
|
|
18
|
+
const key = JSON.stringify(storageKey).replace(/</g, "\\u003c");
|
|
19
|
+
return `(function(){try{var t=localStorage.getItem(${key});if(t==="light"||t==="dark"){document.documentElement.classList.add("theme-"+t)}}catch(e){}})()`;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ThemeScriptProps {
|
|
23
|
+
/** Must match the `storageKey` given to `ThemeProvider`. */
|
|
24
|
+
storageKey?: string;
|
|
25
|
+
/**
|
|
26
|
+
* CSP nonce for this request. Needed when the Content-Security-Policy does
|
|
27
|
+
* not allow inline scripts; omit it otherwise.
|
|
28
|
+
*/
|
|
29
|
+
nonce?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Renders `themeScript` as a `<script>` element. Place it in `<head>`.
|
|
34
|
+
*
|
|
35
|
+
* import { ThemeScript } from "@enablo/swirlcn-ui/server";
|
|
36
|
+
* <head><ThemeScript nonce={nonce} /></head>
|
|
37
|
+
*
|
|
38
|
+
* Written with `createElement` rather than JSX so it can stay a `.ts` file
|
|
39
|
+
* alongside the other server-safe helpers.
|
|
40
|
+
*/
|
|
41
|
+
export function ThemeScript({ storageKey, nonce }: ThemeScriptProps) {
|
|
42
|
+
return createElement("script", {
|
|
43
|
+
nonce,
|
|
44
|
+
// Browsers hide a script's nonce from the DOM once it is parsed, so the
|
|
45
|
+
// attribute never matches during hydration.
|
|
46
|
+
suppressHydrationWarning: true,
|
|
47
|
+
dangerouslySetInnerHTML: { __html: themeScript(storageKey) },
|
|
48
|
+
});
|
|
49
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
/** Swirl's mobile breakpoint: menus and popovers become sheets below 768px. */
|
|
4
|
+
const MOBILE_QUERY = "(max-width: 767px)";
|
|
5
|
+
|
|
6
|
+
/** Whether the viewport is phone-sized. False during server rendering. */
|
|
7
|
+
export function useMobile() {
|
|
8
|
+
return React.useSyncExternalStore(
|
|
9
|
+
(onChange) => {
|
|
10
|
+
const query = window.matchMedia(MOBILE_QUERY);
|
|
11
|
+
query.addEventListener("change", onChange);
|
|
12
|
+
return () => query.removeEventListener("change", onChange);
|
|
13
|
+
},
|
|
14
|
+
() => window.matchMedia(MOBILE_QUERY).matches,
|
|
15
|
+
() => false,
|
|
16
|
+
);
|
|
17
|
+
}
|
package/src/lib/utils.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { clsx, type ClassValue } from "clsx";
|
|
2
|
+
import { twMerge } from "tailwind-merge";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Merges class names, letting a caller's utility win over the component's own.
|
|
6
|
+
* `twMerge` is what makes `<Button className="rounded-full">` actually override
|
|
7
|
+
* the variant's radius instead of producing two competing classes.
|
|
8
|
+
*/
|
|
9
|
+
export function cn(...inputs: ClassValue[]) {
|
|
10
|
+
return twMerge(clsx(inputs));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Resolves a Swirl prop and its shadcn-style alias down to one value.
|
|
15
|
+
*
|
|
16
|
+
* Every component accepts both spellings (`intent="critical"` and
|
|
17
|
+
* `variant="destructive"`); the Swirl prop wins when both are passed.
|
|
18
|
+
*/
|
|
19
|
+
export function resolveAlias<T extends string, A extends string>(
|
|
20
|
+
swirl: T | undefined,
|
|
21
|
+
alias: A | undefined,
|
|
22
|
+
map: Record<A, T>,
|
|
23
|
+
fallback: T,
|
|
24
|
+
): T {
|
|
25
|
+
if (swirl !== undefined) return swirl;
|
|
26
|
+
if (alias !== undefined && alias in map) return map[alias];
|
|
27
|
+
return fallback;
|
|
28
|
+
}
|
package/src/server.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-safe entry point: everything here is a pure function with no React
|
|
3
|
+
* state, so it can be imported from a server component.
|
|
4
|
+
*
|
|
5
|
+
* The main `@enablo/swirlcn-ui` entry is marked `"use client"` in full, which is
|
|
6
|
+
* correct for components but makes even its pure helpers unusable from the
|
|
7
|
+
* server. Import those from here instead.
|
|
8
|
+
*/
|
|
9
|
+
export { cn, resolveAlias } from "./lib/utils";
|
|
10
|
+
export { focusRing, focusRingInset } from "./lib/focus";
|
|
11
|
+
export { spacingScale, gap, gapX, gapY, padding } from "./lib/spacing";
|
|
12
|
+
export type { SwirlSpacing } from "./lib/spacing";
|
|
13
|
+
export { ThemeScript, themeScript } from "./lib/theme-script";
|
|
14
|
+
export type { ThemeScriptProps } from "./lib/theme-script";
|
|
15
|
+
export { FlipAppScript, flipAppScript } from "./lib/flip-app-script";
|
|
16
|
+
export type { FlipAppScriptProps } from "./lib/flip-app-script";
|
|
17
|
+
export { flipThemeCss } from "./lib/flip-theme-css";
|
|
18
|
+
export type { FlipColor, FlipDesignToken, FlipTheme, FlipThemes } from "./lib/flip-theme-css";
|
|
19
|
+
export { FlipBrandStyle, fetchFlipBrandCss } from "./components/flip-brand";
|
|
20
|
+
export type { FlipBrandStyleProps } from "./components/flip-brand";
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
Inter.var.woff2 and Inter-italic.var.woff2 are Inter 4.001 (https://github.com/rsms/inter),
|
|
2
|
+
redistributed unmodified from @getflip/swirl-components.
|
|
3
|
+
|
|
4
|
+
Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)
|
|
5
|
+
|
|
6
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
7
|
+
This license is copied below, and is also available with a FAQ at:
|
|
8
|
+
https://openfontlicense.org
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
-----------------------------------------------------------
|
|
12
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
13
|
+
-----------------------------------------------------------
|
|
14
|
+
|
|
15
|
+
PREAMBLE
|
|
16
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
17
|
+
development of collaborative font projects, to support the font creation
|
|
18
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
19
|
+
open framework in which fonts may be shared and improved in partnership
|
|
20
|
+
with others.
|
|
21
|
+
|
|
22
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
23
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
24
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
25
|
+
redistributed and/or sold with any software provided that any reserved
|
|
26
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
27
|
+
however, cannot be released under any other type of license. The
|
|
28
|
+
requirement for fonts to remain under this license does not apply
|
|
29
|
+
to any document created using the fonts or their derivatives.
|
|
30
|
+
|
|
31
|
+
DEFINITIONS
|
|
32
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
33
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
34
|
+
include source files, build scripts and documentation.
|
|
35
|
+
|
|
36
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
37
|
+
copyright statement(s).
|
|
38
|
+
|
|
39
|
+
"Original Version" refers to the collection of Font Software components as
|
|
40
|
+
distributed by the Copyright Holder(s).
|
|
41
|
+
|
|
42
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
43
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
44
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
45
|
+
new environment.
|
|
46
|
+
|
|
47
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
48
|
+
writer or other person who contributed to the Font Software.
|
|
49
|
+
|
|
50
|
+
PERMISSION & CONDITIONS
|
|
51
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
52
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
53
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
54
|
+
Software, subject to the following conditions:
|
|
55
|
+
|
|
56
|
+
1) Neither the Font Software nor any of its individual components,
|
|
57
|
+
in Original or Modified Versions, may be sold by itself.
|
|
58
|
+
|
|
59
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
60
|
+
redistributed and/or sold with any software, provided that each copy
|
|
61
|
+
contains the above copyright notice and this license. These can be
|
|
62
|
+
included either as stand-alone text files, human-readable headers or
|
|
63
|
+
in the appropriate machine-readable metadata fields within text or
|
|
64
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
65
|
+
|
|
66
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
67
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
68
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
69
|
+
presented to the users.
|
|
70
|
+
|
|
71
|
+
4) The name(s) of the Copyright Holder(s) and the Author(s) of the Font
|
|
72
|
+
Software shall not be used to promote, endorse or advertise any
|
|
73
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
74
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
75
|
+
permission.
|
|
76
|
+
|
|
77
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
78
|
+
must be distributed entirely under this license, and must not be
|
|
79
|
+
distributed under any other license. The requirement for fonts to
|
|
80
|
+
remain under this license does not apply to any document created
|
|
81
|
+
using the Font Software.
|
|
82
|
+
|
|
83
|
+
TERMINATION
|
|
84
|
+
This license becomes null and void if any of the above conditions are
|
|
85
|
+
not met.
|
|
86
|
+
|
|
87
|
+
DISCLAIMER
|
|
88
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
89
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
90
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
91
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
92
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
93
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
94
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
95
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
96
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|