@uisatin/ui 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/README.md +20 -3
- package/chunk-3DHJXU45.js +147 -0
- package/{chunk-6YXUBP27.js → chunk-5725MFGQ.js} +72 -67
- package/{chunk-BKZBWPUH.js → chunk-57QEOCDZ.js} +9 -11
- package/{chunk-RTJ76X5U.js → chunk-5KTBSMQU.js} +2 -4
- package/{chunk-B2K45IUR.js → chunk-5XTUFBZI.js} +5 -7
- package/{chunk-LW3TRU5W.js → chunk-674SRBZK.js} +28 -16
- package/{chunk-XZNHT6MO.js → chunk-6VKV36OK.js} +115 -61
- package/{chunk-GICKPMJU.js → chunk-73Z7NMQQ.js} +31 -31
- package/chunk-7Q76HLRQ.js +128 -0
- package/{chunk-JPNWHWAQ.js → chunk-AIMQNLPY.js} +38 -35
- package/chunk-BN7FDKCJ.js +164 -0
- package/{chunk-3DINAQLL.js → chunk-BR2B4OIT.js} +33 -29
- package/{chunk-2HKBZFIK.js → chunk-CGOH5IYX.js} +31 -31
- package/chunk-CVNRZ2YV.js +112 -0
- package/{chunk-QUF2IPOZ.js → chunk-DPYIBFQD.js} +12 -14
- package/chunk-EF5GT4OG.js +87 -0
- package/chunk-FAJ3OVL4.js +37 -0
- package/{chunk-L6NCCSIP.js → chunk-FB5HTCO2.js} +36 -29
- package/chunk-GI2SMFZL.js +55 -0
- package/{chunk-B6V4VSGH.js → chunk-GMETYACH.js} +14 -15
- package/chunk-HK6WINL6.js +95 -0
- package/{chunk-HL42K2NH.js → chunk-IKO3GQFE.js} +17 -17
- package/{chunk-DO3TBNSC.js → chunk-ISYKZCPJ.js} +15 -17
- package/{chunk-YG7JOOLJ.js → chunk-J7RMFN54.js} +5 -7
- package/{chunk-SHDFUXYV.js → chunk-JBKBRAC4.js} +16 -18
- package/{chunk-LZMKSFCF.js → chunk-JCXI7VQL.js} +10 -12
- package/{chunk-NN6PKJWS.js → chunk-JYOZUQNU.js} +7 -9
- package/{chunk-LLHTVIM3.js → chunk-LB37KTJH.js} +7 -9
- package/{chunk-NSRTTYQ4.js → chunk-LB7Z6BSK.js} +42 -35
- package/{chunk-BNZVTLHV.js → chunk-LFGUJHFF.js} +25 -21
- package/{chunk-7TXHCRAG.js → chunk-M2HEVFQ3.js} +8 -10
- package/{chunk-SH6NG6VN.js → chunk-NH3EHMIL.js} +6 -8
- package/chunk-NL574STL.js +88 -0
- package/chunk-NQL6SIIB.js +168 -0
- package/chunk-O46O6LFQ.js +25 -0
- package/{chunk-YPNKBE5X.js → chunk-OURZQM27.js} +5 -7
- package/{chunk-XL75JRUA.js → chunk-OVKPPXK5.js} +42 -22
- package/chunk-PD6YPFYN.js +42 -0
- package/{chunk-XILQ7GXE.js → chunk-PHNR6ZQ7.js} +11 -13
- package/{chunk-BNTPPZCK.js → chunk-PUWSL5XW.js} +37 -39
- package/{chunk-A5XEM3GF.js → chunk-RHQHDYTE.js} +34 -36
- package/chunk-S7QHBVPX.js +45 -0
- package/{chunk-TX3H3QMA.js → chunk-SAYNV7B3.js} +71 -70
- package/{chunk-6QMSWITQ.js → chunk-SDOTDMYG.js} +24 -26
- package/{chunk-UGRSWP6U.js → chunk-SPGUZMCC.js} +10 -12
- package/chunk-SSOFFQ5T.js +74 -0
- package/{chunk-AN2RNJLR.js → chunk-SZJIVBOD.js} +16 -16
- package/chunk-T6L32XXH.js +107 -0
- package/{chunk-QS4N4MNP.js → chunk-TT2N5752.js} +18 -20
- package/{chunk-72OCFAPT.js → chunk-UCCNXGLG.js} +22 -21
- package/{chunk-KNUWZNFV.js → chunk-UGIVCXGN.js} +4 -6
- package/{chunk-H4NU7NPO.js → chunk-UUCVRIVP.js} +62 -61
- package/{chunk-P4O6TGDR.js → chunk-UZ4DXU6W.js} +28 -26
- package/{chunk-UBNHSZSE.js → chunk-VUOAPWTF.js} +10 -12
- package/{chunk-VAGIAREV.js → chunk-W472DBMT.js} +29 -26
- package/{chunk-X3PQANZO.js → chunk-W4RDTP6W.js} +47 -46
- package/{chunk-CL2II6BX.js → chunk-WLQD5BN2.js} +11 -13
- package/{chunk-FDKIX4DC.js → chunk-X2GNMNZQ.js} +7 -9
- package/{chunk-PF3YBUKT.js → chunk-X66KTATQ.js} +16 -15
- package/{chunk-J3NSDRVH.js → chunk-XETMIETJ.js} +0 -2
- package/chunk-XH56JGYC.js +71 -0
- package/{chunk-O7F3CIDV.js → chunk-XUOSJMEJ.js} +10 -12
- package/chunk-YJK4MGSI.js +86 -0
- package/{chunk-YX5VNRJX.js → chunk-YYFAZQ25.js} +0 -2
- package/chunk-Z7S2KQZS.js +177 -0
- package/chunk-ZBZ3ZQRB.js +195 -0
- package/{chunk-Y5AYU7PK.js → chunk-ZHFIWDGF.js} +0 -2
- package/components/accordion.js +2 -4
- package/components/agent-loading.d.ts +2 -0
- package/components/agent-loading.js +2 -4
- package/components/agent-picker.js +4 -5
- package/components/agent-suggestion.js +5 -6
- package/components/announcement-bar.js +6 -7
- package/components/attachment.js +4 -5
- package/components/avatar.d.ts +16 -0
- package/components/avatar.js +4 -6
- package/components/badge.js +2 -4
- package/components/banner-mesh.js +1 -3
- package/components/banner.js +4 -6
- package/components/bar-chart.js +10 -11
- package/components/breadcrumb.js +5 -6
- package/components/button.js +2 -4
- package/components/card.js +3 -5
- package/components/channel-chart.js +10 -11
- package/components/chart.js +9 -10
- package/components/checkbox.js +2 -4
- package/components/chip.js +2 -4
- package/components/citations.d.ts +6 -4
- package/components/citations.js +4 -5
- package/components/code-block.js +3 -5
- package/components/combobox.d.ts +12 -3
- package/components/combobox.js +9 -10
- package/components/command-menu.d.ts +6 -2
- package/components/command-menu.js +5 -6
- package/components/context-menu.d.ts +12 -5
- package/components/context-menu.js +5 -6
- package/components/cookie-consent.js +3 -5
- package/components/date-picker.d.ts +26 -14
- package/components/date-picker.js +8 -9
- package/components/decision-card.js +6 -7
- package/components/dialog.d.ts +5 -2
- package/components/dialog.js +4 -5
- package/components/donut-chart.js +10 -11
- package/components/dot.js +2 -4
- package/components/dropdown.d.ts +6 -1
- package/components/dropdown.js +4 -5
- package/components/empty-state.js +2 -4
- package/components/file-upload.js +6 -7
- package/components/floating.js +1 -3
- package/components/form-field.js +2 -4
- package/components/hover-card.d.ts +5 -2
- package/components/hover-card.js +2 -4
- package/components/input-otp.d.ts +4 -2
- package/components/input-otp.js +7 -8
- package/components/input.js +3 -5
- package/components/kbd.js +2 -4
- package/components/labels.d.ts +79 -0
- package/components/labels.js +1 -0
- package/components/line-chart.js +11 -12
- package/components/message-actions.js +4 -5
- package/components/message.js +7 -8
- package/components/number-input.d.ts +4 -2
- package/components/number-input.js +7 -8
- package/components/pagination.js +4 -6
- package/components/popover.d.ts +11 -5
- package/components/popover.js +3 -4
- package/components/progress.js +2 -4
- package/components/prompt-bar.js +5 -6
- package/components/radio.js +2 -4
- package/components/search-bar.js +3 -5
- package/components/segmented-control.d.ts +4 -2
- package/components/segmented-control.js +3 -5
- package/components/select.d.ts +10 -2
- package/components/select.js +6 -7
- package/components/sheet.d.ts +4 -2
- package/components/sheet.js +5 -6
- package/components/sidebar.js +2 -4
- package/components/skeleton.js +2 -4
- package/components/slider.d.ts +6 -2
- package/components/slider.js +7 -8
- package/components/sliding-indicator.js +1 -3
- package/components/streaming-text.js +2 -4
- package/components/switch.js +2 -4
- package/components/table.d.ts +16 -5
- package/components/table.js +4 -5
- package/components/tabs.d.ts +4 -2
- package/components/tabs.js +3 -5
- package/components/textarea.js +3 -5
- package/components/thinking.js +3 -5
- package/components/toast.js +4 -5
- package/components/toggle.js +2 -4
- package/components/tooltip.d.ts +5 -2
- package/components/tooltip.js +3 -5
- package/index.d.ts +1 -0
- package/index.js +67 -231
- package/lib/utils.d.ts +8 -1
- package/lib/utils.js +1 -3
- package/package.json +22 -1
- package/styles.css +1 -1
- package/theme/create-theme.d.ts +6 -2
- package/theme/index.js +1 -0
- package/chunk-2HKBZFIK.js.map +0 -1
- package/chunk-3DINAQLL.js.map +0 -1
- package/chunk-3ERGAHKA.js +0 -179
- package/chunk-3ERGAHKA.js.map +0 -1
- package/chunk-6C7CGJX2.js +0 -86
- package/chunk-6C7CGJX2.js.map +0 -1
- package/chunk-6QMSWITQ.js.map +0 -1
- package/chunk-6YXUBP27.js.map +0 -1
- package/chunk-72OCFAPT.js.map +0 -1
- package/chunk-7TXHCRAG.js.map +0 -1
- package/chunk-A5XEM3GF.js.map +0 -1
- package/chunk-AN2RNJLR.js.map +0 -1
- package/chunk-B2K45IUR.js.map +0 -1
- package/chunk-B6V4VSGH.js.map +0 -1
- package/chunk-BKZBWPUH.js.map +0 -1
- package/chunk-BNTPPZCK.js.map +0 -1
- package/chunk-BNZVTLHV.js.map +0 -1
- package/chunk-CL2II6BX.js.map +0 -1
- package/chunk-D7RZNTFC.js +0 -95
- package/chunk-D7RZNTFC.js.map +0 -1
- package/chunk-DETGJAIC.js +0 -147
- package/chunk-DETGJAIC.js.map +0 -1
- package/chunk-DO3TBNSC.js.map +0 -1
- package/chunk-ESC5JCVQ.js +0 -90
- package/chunk-ESC5JCVQ.js.map +0 -1
- package/chunk-FDKIX4DC.js.map +0 -1
- package/chunk-GICKPMJU.js.map +0 -1
- package/chunk-GQA24FYG.js +0 -57
- package/chunk-GQA24FYG.js.map +0 -1
- package/chunk-H4NU7NPO.js.map +0 -1
- package/chunk-H63FYCMY.js +0 -11
- package/chunk-H63FYCMY.js.map +0 -1
- package/chunk-HL42K2NH.js.map +0 -1
- package/chunk-HNQUX43Z.js +0 -109
- package/chunk-HNQUX43Z.js.map +0 -1
- package/chunk-HRKPV66B.js +0 -32
- package/chunk-HRKPV66B.js.map +0 -1
- package/chunk-J3NSDRVH.js.map +0 -1
- package/chunk-JPNWHWAQ.js.map +0 -1
- package/chunk-KNUWZNFV.js.map +0 -1
- package/chunk-L6NCCSIP.js.map +0 -1
- package/chunk-LLHTVIM3.js.map +0 -1
- package/chunk-LW3TRU5W.js.map +0 -1
- package/chunk-LZMKSFCF.js.map +0 -1
- package/chunk-MR3JDI7E.js +0 -122
- package/chunk-MR3JDI7E.js.map +0 -1
- package/chunk-NN6PKJWS.js.map +0 -1
- package/chunk-NSRTTYQ4.js.map +0 -1
- package/chunk-O7F3CIDV.js.map +0 -1
- package/chunk-P4O6TGDR.js.map +0 -1
- package/chunk-PF3YBUKT.js.map +0 -1
- package/chunk-PVOLDO4G.js +0 -47
- package/chunk-PVOLDO4G.js.map +0 -1
- package/chunk-QS4N4MNP.js.map +0 -1
- package/chunk-QUF2IPOZ.js.map +0 -1
- package/chunk-RTJ76X5U.js.map +0 -1
- package/chunk-SH6NG6VN.js.map +0 -1
- package/chunk-SHDFUXYV.js.map +0 -1
- package/chunk-TKO44NDI.js +0 -84
- package/chunk-TKO44NDI.js.map +0 -1
- package/chunk-TVLGZGYN.js +0 -59
- package/chunk-TVLGZGYN.js.map +0 -1
- package/chunk-TX3H3QMA.js.map +0 -1
- package/chunk-UBNHSZSE.js.map +0 -1
- package/chunk-UC3ZJWOD.js +0 -73
- package/chunk-UC3ZJWOD.js.map +0 -1
- package/chunk-UGRSWP6U.js.map +0 -1
- package/chunk-VAGIAREV.js.map +0 -1
- package/chunk-WTMZT3IT.js +0 -105
- package/chunk-WTMZT3IT.js.map +0 -1
- package/chunk-WX6BP5ZP.js +0 -39
- package/chunk-WX6BP5ZP.js.map +0 -1
- package/chunk-X3PQANZO.js.map +0 -1
- package/chunk-XILQ7GXE.js.map +0 -1
- package/chunk-XL75JRUA.js.map +0 -1
- package/chunk-XZNHT6MO.js.map +0 -1
- package/chunk-Y5AYU7PK.js.map +0 -1
- package/chunk-YG7JOOLJ.js.map +0 -1
- package/chunk-YPJYW624.js +0 -195
- package/chunk-YPJYW624.js.map +0 -1
- package/chunk-YPNKBE5X.js.map +0 -1
- package/chunk-YX5VNRJX.js.map +0 -1
- package/components/accordion.js.map +0 -1
- package/components/agent-loading.js.map +0 -1
- package/components/agent-picker.js.map +0 -1
- package/components/agent-suggestion.js.map +0 -1
- package/components/announcement-bar.js.map +0 -1
- package/components/attachment.js.map +0 -1
- package/components/avatar.js.map +0 -1
- package/components/badge.js.map +0 -1
- package/components/banner-mesh.js.map +0 -1
- package/components/banner.js.map +0 -1
- package/components/bar-chart.js.map +0 -1
- package/components/breadcrumb.js.map +0 -1
- package/components/button.js.map +0 -1
- package/components/card.js.map +0 -1
- package/components/channel-chart.js.map +0 -1
- package/components/chart.js.map +0 -1
- package/components/checkbox.js.map +0 -1
- package/components/chip.js.map +0 -1
- package/components/citations.js.map +0 -1
- package/components/code-block.js.map +0 -1
- package/components/combobox.js.map +0 -1
- package/components/command-menu.js.map +0 -1
- package/components/context-menu.js.map +0 -1
- package/components/cookie-consent.js.map +0 -1
- package/components/date-picker.js.map +0 -1
- package/components/decision-card.js.map +0 -1
- package/components/dialog.js.map +0 -1
- package/components/donut-chart.js.map +0 -1
- package/components/dot.js.map +0 -1
- package/components/dropdown.js.map +0 -1
- package/components/empty-state.js.map +0 -1
- package/components/file-upload.js.map +0 -1
- package/components/floating.js.map +0 -1
- package/components/form-field.js.map +0 -1
- package/components/hover-card.js.map +0 -1
- package/components/input-otp.js.map +0 -1
- package/components/input.js.map +0 -1
- package/components/kbd.js.map +0 -1
- package/components/line-chart.js.map +0 -1
- package/components/message-actions.js.map +0 -1
- package/components/message.js.map +0 -1
- package/components/number-input.js.map +0 -1
- package/components/pagination.js.map +0 -1
- package/components/popover.js.map +0 -1
- package/components/progress.js.map +0 -1
- package/components/prompt-bar.js.map +0 -1
- package/components/radio.js.map +0 -1
- package/components/search-bar.js.map +0 -1
- package/components/segmented-control.js.map +0 -1
- package/components/select.js.map +0 -1
- package/components/sheet.js.map +0 -1
- package/components/sidebar.js.map +0 -1
- package/components/skeleton.js.map +0 -1
- package/components/slider.js.map +0 -1
- package/components/sliding-indicator.js.map +0 -1
- package/components/streaming-text.js.map +0 -1
- package/components/switch.js.map +0 -1
- package/components/table.js.map +0 -1
- package/components/tabs.js.map +0 -1
- package/components/textarea.js.map +0 -1
- package/components/thinking.js.map +0 -1
- package/components/toast.js.map +0 -1
- package/components/toggle.js.map +0 -1
- package/components/tooltip.js.map +0 -1
- package/index.js.map +0 -1
- package/lib/utils.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"pagination.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"popover.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"progress.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"prompt-bar.js"}
|
package/components/radio.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"radio.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"search-bar.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"segmented-control.js"}
|
package/components/select.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"select.js"}
|
package/components/sheet.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"sheet.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"sidebar.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"skeleton.js"}
|
package/components/slider.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"slider.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"sliding-indicator.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"streaming-text.js"}
|
package/components/switch.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"switch.js"}
|
package/components/table.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"table.js"}
|
package/components/tabs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"tabs.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"textarea.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"thinking.js"}
|
package/components/toast.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"toast.js"}
|
package/components/toggle.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"toggle.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"tooltip.js"}
|
package/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/theme/create-theme.ts"],"names":["vars"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BO,IAAM,YAAA,GAA2B,EAAE,KAAA,EAAO,SAAA,EAAW,QAAQ,CAAA;AAQpE,IAAM,QAAA,GAAW,CAAC,CAAA,KAAe,CAAA,IAAK,UAAU,CAAA,GAAI,KAAA,GAAA,CAAA,CAAU,CAAA,GAAI,KAAA,IAAS,KAAA,KAAU,GAAA;AACrF,IAAM,OAAA,GAAU,CAAC,CAAA,KAAe,CAA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AAK,IAAI,CAAA,CAAE,SAAS,CAAC,KAAA,CAAM,KAAA,GAAQ,CAAA,MAAA,EAAS,KAAK,CAAA,CAAA,GAAK,YAAA,EAAc,IAAI,CAAC,IAAI,EAAC;AAAA,IACzF;AAAA,GACF,CAAE,KAAK,MAAM,CAAA;AACf;AAQO,SAAS,YAAY,OAAA,EAAkC;AAC5D,EAAA,MAAM,KAAK,UAAU,IAAI,OAAA,GAAU,UAAA,CAAW,QAAA,CAAS,OAAA,CAAQ,KAAK,CAAC,CAAA,GAAI,CAAC,CAAA,EAAG,GAAG,IAAI,CAAA;AAEpF,EAAA,MAAM,OAAO,UAAA,GAAa,EAAA,GAAK,IAAA,CAAK,MAAA,KAAW,GAAA,IAAO,GAAA;AACtD,EAAA,MAAM,CAAA,GAAI,GAAA,GAAM,IAAA,CAAK,MAAA,EAAO,GAAI,IAAA;AAChC,EAAA,MAAM,KAAA,GAAQ,UAAA,CAAW,CAAC,CAAA,EAAG,IAAA,GAAO,KAAK,MAAA,EAAO,GAAI,IAAA,EAAM,GAAG,CAAC,CAAA;AAC9D,EAAA,MAAM,KAAA,GAAQ,CAAC,CAAA,EAAG,GAAA,EAAK,CAAA,EAAG,GAAG,CAAA,CAAE,MAAA,CAAO,CAAC,CAAA,KAAM,CAAA,KAAM,OAAA,EAAS,MAAM,CAAA;AAClE,EAAA,MAAM,MAAA,GAAS,MAAM,IAAA,CAAK,KAAA,CAAM,KAAK,MAAA,EAAO,GAAI,KAAA,CAAM,MAAM,CAAC,CAAA;AAC7D,EAAA,OAAO,EAAE,OAAO,MAAA,EAAO;AACzB","file":"index.js","sourcesContent":["/**\n * Satin theming: one small config in, CSS variables out. Type isn't part of it: Satin's type\n * scale is fixed (14px body, 13px for compact controls like badges, chips and small fields).\n *\n * Every Satin component reads tokens, never raw values, so a theme only has to repoint a few\n * of them and the whole system follows:\n *\n * - `brand` replaces the brand ramp (the `--color-blue-*` primitives and the dark-mode primary\n * primitives). Each step keeps the lightness of the original ramp, takes the brand's hue and\n * scales its chroma, so tints, borders and soft tones stay in the same places. The solid\n * steps (hover, rest, pressed) sit at the brand's own lightness, lowered just enough that\n * white text reads at 4.5:1 on rest and hover, in Light and Dark. Labels stay white for\n * every brand, so buttons look the same family whatever the colour.\n * - `radius` scales every corner token, pill-shaped controls included; 1 is Satin's own, 0 is\n * square. Circles (avatars, dots, switch and radio marks) stay round.\n *\n * `themeVars()` returns the variables per mode; `themeCss()` the same as a stylesheet to load\n * after `@uisatin/ui/styles.css`.\n */\n\nexport interface SatinTheme {\n /** Brand colour as hex, e.g. \"#4633D7\". */\n brand: string\n /** Corner scale: 0, 0.5, 1 (default) or 1.5. */\n radius: number\n}\n\nexport const defaultTheme: SatinTheme = { brand: '#4633D7', radius: 1 }\n\ntype Vars = Record<string, string>\n\n/* ---------- OKLCH ---------- */\n\ntype Lch = [number, number, number]\n\nconst toLinear = (c: number) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4)\nconst toGamma = (c: number) => (c <= 0.0031308 ? 12.92 * c : 1.055 * c ** (1 / 2.4) - 0.055)\n\nfunction hexToRgb(hex: string): [number, number, number] {\n const h = hex.replace('#', '')\n const full = h.length === 3 ? [...h].map((c) => c + c).join('') : h.slice(0, 6)\n return [0, 2, 4].map((i) => parseInt(full.slice(i, i + 2), 16) / 255) as [number, number, number]\n}\n\nfunction rgbToOklch([r, g, b]: [number, number, number]): Lch {\n const [lr, lg, lb] = [r, g, b].map(toLinear)\n const l = Math.cbrt(0.4122214708 * lr + 0.5363325363 * lg + 0.0514459929 * lb)\n const m = Math.cbrt(0.2119034982 * lr + 0.6806995451 * lg + 0.1073969566 * lb)\n const s = Math.cbrt(0.0883024619 * lr + 0.2817188376 * lg + 0.6299787005 * lb)\n const L = 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s\n const A = 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s\n const B = 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s\n return [L, Math.hypot(A, B), ((Math.atan2(B, A) * 180) / Math.PI + 360) % 360]\n}\n\nfunction oklchToRgb([L, C, H]: Lch): [number, number, number] {\n const a = C * Math.cos((H * Math.PI) / 180)\n const b = C * Math.sin((H * Math.PI) / 180)\n const l = (L + 0.3963377774 * a + 0.2158037573 * b) ** 3\n const m = (L - 0.1055613458 * a - 0.0638541728 * b) ** 3\n const s = (L - 0.0894841775 * a - 1.291485548 * b) ** 3\n return [\n 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,\n -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,\n -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s,\n ]\n}\n\nconst inGamut = (rgb: number[]) => rgb.every((c) => c >= -0.0005 && c <= 1.0005)\n\n/** OKLCH to hex, lowering chroma until the colour fits sRGB. */\nfunction oklchToHex([L, C, H]: Lch) {\n let c = C\n let rgb = oklchToRgb([L, c, H])\n while (!inGamut(rgb) && c > 0) {\n c = Math.max(0, c - 0.005)\n rgb = oklchToRgb([L, c, H])\n }\n return '#' + rgb.map((v) => Math.round(Math.min(1, Math.max(0, toGamma(v))) * 255).toString(16).padStart(2, '0')).join('').toUpperCase()\n}\n\nconst luminance = (hex: string) => {\n const [r, g, b] = hexToRgb(hex).map(toLinear)\n return 0.2126 * r + 0.7152 * g + 0.0722 * b\n}\nexport const contrast = (a: string, b: string) => {\n const [x, y] = [luminance(a), luminance(b)].sort((p, q) => q - p)\n return (x + 0.05) / (y + 0.05)\n}\n\n/* ---------- Brand ---------- */\n\n// Satin's own brand ramp. Each generated step keeps its lightness and chroma ratio.\nconst RAMP: Record<string, string> = {\n 'blue-50': '#F2F4FF',\n 'blue-200': '#CFD6FF',\n 'blue-300': '#B1BBFE',\n 'blue-500': '#5146E9',\n 'blue-600': '#4633D7',\n 'blue-700': '#3923B9',\n 'blue-900': '#1D1168',\n 'blue-950': '#110A47',\n 'blue-soft-50': '#F3F5FF',\n 'blue-soft-200': '#D9DEFB',\n 'blue-soft-300': '#BEC7FC',\n 'blue-soft-700': '#5158A0',\n 'blue-soft-900': '#30344F',\n 'blue-soft-950': '#1F2132',\n 'primary-dark': '#493DD6',\n 'primary-hover-dark': '#554FE7',\n 'primary-pressed-dark': '#3E2AC5',\n 'primary-border-light': '#9085E7',\n 'primary-border-dark': '#928BE6',\n}\n// The steps a button is painted with: they move with the brand's lightness.\nconst SOLID = new Set(['blue-500', 'blue-600', 'blue-700', 'primary-dark', 'primary-hover-dark', 'primary-pressed-dark'])\n\n// Darkest the solid fill may need to go: white on it, and on its hover, reads at 4.5:1\n// (aimed at 4.7, since fitting each step into sRGB trims its chroma a little).\nfunction solidLightness(c: number, h: number, base: number, hoverStep: number) {\n const passes = (L: number) =>\n contrast(oklchToHex([L, c, h]), '#FFFFFF') >= 4.7 && contrast(oklchToHex([L + hoverStep, c, h]), '#FFFFFF') >= 4.7\n if (passes(base)) return base\n let lo = 0.2\n let hi = base\n for (let i = 0; i < 20; i++) {\n const mid = (lo + hi) / 2\n if (passes(mid)) lo = mid\n else hi = mid\n }\n return lo\n}\n\nfunction brandVars(brand: string): Vars {\n const [bl, bc, bh] = rgbToOklch(hexToRgb(brand))\n const lch = (step: string) => rgbToOklch(hexToRgb(RAMP[step]))\n const [rl, rc, rh] = lch('blue-600')\n const chroma = bc / rc\n // Where the light and the dark solid fills sit: the brand's lightness, darker if white needs it.\n const light = solidLightness(bc, bh, bl, lch('blue-500')[0] - rl)\n const darkRest = lch('primary-dark')[0]\n const dark = solidLightness(bc, bh, light + (darkRest - rl), lch('primary-hover-dark')[0] - darkRest)\n const root: Vars = {}\n for (const [step, hex] of Object.entries(RAMP)) {\n const [l, c, h] = rgbToOklch(hexToRgb(hex))\n const isDark = step.endsWith('-dark') && step !== 'primary-border-dark'\n const L = SOLID.has(step) ? (isDark ? dark + (l - darkRest) : light + (l - rl)) : l\n root[`--color-${step}`] =\n step === 'blue-600' && light === bl ? brand.toUpperCase() : oklchToHex([Math.min(0.97, Math.max(0.15, L)), c * chroma, bh + (h - rh)])\n }\n root['--color-blue-600-a20'] = `${root['--color-blue-600']}33`\n root['--color-blue-500-a20'] = `${root['--color-blue-500']}33`\n root['--color-primary-focus-dark'] = `${root['--color-primary-dark']}33`\n return root\n}\n\n/* ---------- Radius ---------- */\n\nconst RADII: Record<string, number> = { xs: 4, sm: 6, md: 8, xl: 12, '2xl': 16, '3xl': 20 }\n\nfunction radiusVars(scale: number): Vars {\n const v: Vars = {}\n for (const [k, px] of Object.entries(RADII)) v[`--radius-${k}`] = `${Math.round(px * scale * 2) / 2}px`\n v['--radius'] = `${Math.round(10 * scale * 2) / 2}px`\n // Pills follow the corners too: square at 0, a soft 8px at 0.5, a full pill from 1.\n v['--radius-pill'] = scale >= 1 ? '9999px' : `${Math.round(16 * scale)}px`\n return v\n}\n\n/* ---------- Output ---------- */\n\nexport function themeVars(theme: SatinTheme): { root: Vars; dark: Vars } {\n return { root: { ...brandVars(theme.brand), ...radiusVars(theme.radius) }, dark: {} }\n}\n\n// Semantic tokens that read the brand ramp or the radius. CSS resolves var() where a property is\n// declared, so a theme limited to part of a page has to declare these again inside it.\nconst SCOPED_LIGHT: Vars = {\n '--border-focus': 'var(--color-blue-600)',\n '--action-primary-bg': 'var(--color-blue-600)',\n '--action-primary-bg-hover': 'var(--color-blue-500)',\n '--action-primary-bg-pressed': 'var(--color-blue-700)',\n '--action-primary-border': 'var(--color-primary-border-light)',\n '--action-focus-ring': 'var(--color-blue-600-a20)',\n '--status-brand-bg': 'var(--color-blue-soft-50)',\n '--status-brand-border': 'var(--color-blue-soft-200)',\n '--status-brand-fg': 'var(--color-blue-soft-700)',\n '--radius-lg': 'var(--radius)',\n}\nconst SCOPED_DARK: Vars = {\n '--border-focus': 'var(--color-primary-hover-dark)',\n '--action-primary-bg': 'var(--color-primary-dark)',\n '--action-primary-bg-hover': 'var(--color-primary-hover-dark)',\n '--action-primary-bg-pressed': 'var(--color-primary-pressed-dark)',\n '--action-primary-border': 'var(--color-primary-border-dark)',\n '--action-focus-ring': 'var(--color-primary-focus-dark)',\n '--status-brand-bg': 'var(--color-blue-soft-950)',\n '--status-brand-border': 'var(--color-blue-soft-900)',\n '--status-brand-fg': 'var(--color-blue-soft-300)',\n}\n\n/**\n * The theme as a stylesheet. Load it after `@uisatin/ui/styles.css`. By default it themes the\n * whole page; pass a `scope` selector to theme only what's inside it (the docs do this for\n * their previews, so the site around them keeps Satin's own look).\n */\nexport function themeCss(theme: SatinTheme, scope?: string) {\n const vars = themeVars(theme)\n const root = scope ? { ...vars.root, ...SCOPED_LIGHT } : vars.root\n const dark = scope ? { ...vars.dark, ...SCOPED_DARK } : vars.dark\n const block = (sel: string, vars: Vars) =>\n `${sel} {\\n${Object.entries(vars)\n .map(([k, v]) => ` ${k}: ${v};`)\n .join('\\n')}\\n}`\n return [\n `/* Satin theme: brand ${theme.brand.toUpperCase()}, radius ${theme.radius}. */`,\n // :root:root outranks Satin's own :root, so the theme wins wherever the file is loaded.\n block(scope ?? ':root:root', root),\n ...(Object.keys(dark).length ? [block(scope ? `.dark ${scope}` : ':root.dark', dark)] : []),\n '',\n ].join('\\n\\n')\n}\n\n/* ---------- Random ---------- */\n\n/**\n * A random theme that still reads: a brand with enough chroma and a corner scale.\n * Pass the current theme to make sure the brand and the corners visibly change.\n */\nexport function randomTheme(current?: SatinTheme): SatinTheme {\n const [, , currentHue] = current ? rgbToOklch(hexToRgb(current.brand)) : [0, 0, -360]\n // At least 60° away from the current hue, so the new brand never looks like the old one.\n const hue = (currentHue + 60 + Math.random() * 240) % 360\n const l = 0.5 + Math.random() * 0.25\n const brand = oklchToHex([l, 0.12 + Math.random() * 0.08, hue])\n const radii = [0, 0.5, 1, 1.5].filter((r) => r !== current?.radius)\n const radius = radii[Math.floor(Math.random() * radii.length)]\n return { brand, radius }\n}\n"]}
|
package/lib/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"utils.js"}
|