@korsolutions/ui 0.0.88 → 0.0.90
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 +21 -0
- package/dist/module/components/alert/components/alert-icon.js +0 -1
- package/dist/module/components/alert/components/alert-icon.js.map +1 -1
- package/dist/module/components/button/button.js +6 -2
- package/dist/module/components/button/button.js.map +1 -1
- package/dist/module/components/combobox/components/combobox-root.js +10 -11
- package/dist/module/components/combobox/components/combobox-root.js.map +1 -1
- package/dist/module/components/icon/icon.js +1 -2
- package/dist/module/components/icon/icon.js.map +1 -1
- package/dist/module/components/input/variants/default.js +1 -0
- package/dist/module/components/input/variants/default.js.map +1 -1
- package/dist/module/components/input/variants/secondary.js +1 -0
- package/dist/module/components/input/variants/secondary.js.map +1 -1
- package/dist/module/components/phone-input/variants/default.js +8 -1
- package/dist/module/components/phone-input/variants/default.js.map +1 -1
- package/dist/module/components/toast/components/toast-icon.js +0 -1
- package/dist/module/components/toast/components/toast-icon.js.map +1 -1
- package/dist/module/components/toast/variants/danger.js +5 -6
- package/dist/module/components/toast/variants/danger.js.map +1 -1
- package/dist/module/components/toast/variants/success.js +5 -6
- package/dist/module/components/toast/variants/success.js.map +1 -1
- package/dist/module/hooks/use-keyboard-height.js +36 -0
- package/dist/module/hooks/use-keyboard-height.js.map +1 -0
- package/dist/module/hooks/use-relative-position.js +12 -3
- package/dist/module/hooks/use-relative-position.js.map +1 -1
- package/dist/module/themes/default/colors.js +28 -28
- package/dist/module/themes/default/colors.js.map +1 -1
- package/dist/module/themes/default/index.js +2 -2
- package/dist/module/themes/default/index.js.map +1 -1
- package/dist/module/utils/hsla-utils.js +0 -10
- package/dist/module/utils/hsla-utils.js.map +1 -1
- package/dist/module/utils/size-scale.js +2 -2
- package/dist/module/utils/size-scale.js.map +1 -1
- package/dist/typescript/src/components/button/button.d.ts.map +1 -1
- package/dist/typescript/src/components/combobox/components/combobox-root.d.ts.map +1 -1
- package/dist/typescript/src/components/icon/icon.d.ts.map +1 -1
- package/dist/typescript/src/components/input/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/input/variants/secondary.d.ts.map +1 -1
- package/dist/typescript/src/components/phone-input/variants/default.d.ts.map +1 -1
- package/dist/typescript/src/components/toast/variants/danger.d.ts.map +1 -1
- package/dist/typescript/src/components/toast/variants/success.d.ts.map +1 -1
- package/dist/typescript/src/hooks/use-keyboard-height.d.ts +9 -0
- package/dist/typescript/src/hooks/use-keyboard-height.d.ts.map +1 -0
- package/dist/typescript/src/hooks/use-relative-position.d.ts.map +1 -1
- package/dist/typescript/src/types/props.types.d.ts +0 -1
- package/dist/typescript/src/types/props.types.d.ts.map +1 -1
- package/dist/typescript/src/utils/hsla-utils.d.ts +0 -1
- package/dist/typescript/src/utils/hsla-utils.d.ts.map +1 -1
- package/package.json +8 -1
- package/src/components/alert/components/alert-icon.tsx +1 -1
- package/src/components/button/button.tsx +7 -1
- package/src/components/combobox/components/combobox-root.tsx +10 -11
- package/src/components/icon/icon.tsx +0 -1
- package/src/components/input/variants/default.tsx +1 -0
- package/src/components/input/variants/secondary.tsx +1 -0
- package/src/components/phone-input/variants/default.tsx +7 -0
- package/src/components/toast/components/toast-icon.tsx +1 -1
- package/src/components/toast/variants/danger.tsx +4 -5
- package/src/components/toast/variants/success.tsx +4 -5
- package/src/hooks/use-keyboard-height.ts +42 -0
- package/src/hooks/use-relative-position.ts +17 -3
- package/src/themes/default/colors.ts +28 -28
- package/src/themes/default/index.ts +2 -2
- package/src/types/props.types.ts +0 -1
- package/src/utils/hsla-utils.ts +0 -11
- package/src/utils/size-scale.ts +2 -2
- package/AGENTS.md +0 -678
- package/babel.config.js +0 -8
- package/bob.config.js +0 -14
- package/tsconfig.json +0 -29
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["hslaSetLightness","hsla","lightness","parts","replace","split","undefined","Error","h","parseInt","s","parseFloat","hslaGetLightness","hslaSetRelativeLightness","delta","currentLightness","newLightness"],"sourceRoot":"../../../src","sources":["utils/hsla-utils.ts"],"mappings":";;AAAA,OAAO,MAAMA,gBAAgB,GAAGA,CAACC,IAAY,EAAEC,SAAiB,KAAa;EAC3E,MAAMC,KAAK,GAAGF,IAAI,CAACG,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC;EAC9D,IAAIF,KAAK,CAAC,CAAC,CAAC,KAAKG,SAAS,EAAE,MAAM,IAAIC,KAAK,CAAC,2BAA2B,CAAC;EACxE,IAAIJ,KAAK,CAAC,CAAC,CAAC,KAAKG,SAAS,EAAE,MAAM,IAAIC,KAAK,CAAC,2BAA2B,CAAC;EACxE,MAAMC,CAAC,GAAGC,QAAQ,CAACN,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;EAChC,MAAMO,CAAC,GAAGD,QAAQ,CAACN,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;EAChC,OAAO,QAAQK,CAAC,KAAKE,CAAC,MAAMR,SAAS,MAAMC,KAAK,CAAC,CAAC,CAAC,GAAGQ,UAAU,CAACR,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG;AACnF,CAAC;AAED,OAAO,MAAMS,gBAAgB,GAAIX,IAAY,IAAa;EACxD,MAAME,KAAK,GAAGF,IAAI,CAACG,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC;EAC9D,IAAIF,KAAK,CAAC,CAAC,CAAC,KAAKG,SAAS,EAAE,MAAM,IAAIC,KAAK,CAAC,2BAA2B,CAAC;EACxE,OAAOE,QAAQ,CAACN,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AAC/B,CAAC;AAED,OAAO,MAAMU,wBAAwB,GAAGA,CAACZ,IAAY,EAAEa,KAAa,KAAa;EAC/E,MAAMC,gBAAgB,GAAGH,gBAAgB,CAACX,IAAI,CAAC;EAC/C,IAAIe,YAAY,GAAGD,gBAAgB,GAAGD,KAAK;EAC3C,IAAIE,YAAY,GAAG,GAAG,EAAEA,YAAY,GAAG,GAAG;EAC1C,IAAIA,YAAY,GAAG,CAAC,EAAEA,YAAY,GAAG,CAAC;EACtC,OAAOhB,gBAAgB,CAACC,IAAI,EAAEe,YAAY,CAAC;AAC7C,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["scales","sm","pv","ph","gap","fontScale","sw","h","md","lg","getSizeScale","size","spacing","fontSize","s","scaledFontSize","lineHeight","Math","round","paddingVertical","paddingHorizontal","iconSize","strokeWidth","height"],"sourceRoot":"../../../src","sources":["utils/size-scale.ts"],"mappings":";;AAqBA,MAAMA,MAGL,GAAG;EACFC,EAAE,EAAE;IAAEC,EAAE,EAAE,CAAC;IAAEC,EAAE,EAAE,GAAG;IAAEC,GAAG,EAAE,IAAI;IAAEC,SAAS,EAAE,KAAK;IAAEC,EAAE,EAAE,IAAI;IAAEC,CAAC,EAAE;EAAI,CAAC;EACrEC,EAAE,EAAE;IAAEN,EAAE,EAAE,GAAG;IAAEC,EAAE,EAAE,CAAC;IAAEC,GAAG,EAAE,CAAC;IAAEC,SAAS,EAAE,CAAC;IAAEC,EAAE,EAAE,
|
|
1
|
+
{"version":3,"names":["scales","sm","pv","ph","gap","fontScale","sw","h","md","lg","getSizeScale","size","spacing","fontSize","s","scaledFontSize","lineHeight","Math","round","paddingVertical","paddingHorizontal","iconSize","strokeWidth","height"],"sourceRoot":"../../../src","sources":["utils/size-scale.ts"],"mappings":";;AAqBA,MAAMA,MAGL,GAAG;EACFC,EAAE,EAAE;IAAEC,EAAE,EAAE,CAAC;IAAEC,EAAE,EAAE,GAAG;IAAEC,GAAG,EAAE,IAAI;IAAEC,SAAS,EAAE,KAAK;IAAEC,EAAE,EAAE,IAAI;IAAEC,CAAC,EAAE;EAAI,CAAC;EACrEC,EAAE,EAAE;IAAEN,EAAE,EAAE,GAAG;IAAEC,EAAE,EAAE,CAAC;IAAEC,GAAG,EAAE,CAAC;IAAEC,SAAS,EAAE,CAAC;IAAEC,EAAE,EAAE,IAAI;IAAEC,CAAC,EAAE;EAAE,CAAC;EAC5DE,EAAE,EAAE;IAAEP,EAAE,EAAE,CAAC;IAAEC,EAAE,EAAE,CAAC;IAAEC,GAAG,EAAE,IAAI;IAAEC,SAAS,EAAE,KAAK;IAAEC,EAAE,EAAE,IAAI;IAAEC,CAAC,EAAE;EAAI;AACpE,CAAC;AAED,OAAO,SAASG,YAAYA,CAC1BC,IAAU,GAAG,IAAI,EACjBC,OAAe,EACfC,QAAgB,EACC;EACjB,MAAMC,CAAC,GAAGd,MAAM,CAACW,IAAI,CAAC,IAAIX,MAAM,CAACQ,EAAE;EACnC,MAAMO,cAAc,GAAGF,QAAQ,GAAGC,CAAC,CAACT,SAAS;EAC7C,MAAMW,UAAU,GAAGC,IAAI,CAACC,KAAK,CAACH,cAAc,GAAG,IAAI,CAAC;EACpD,OAAO;IACLI,eAAe,EAAEP,OAAO,GAAGE,CAAC,CAACZ,EAAE;IAC/BkB,iBAAiB,EAAER,OAAO,GAAGE,CAAC,CAACX,EAAE;IACjCC,GAAG,EAAEQ,OAAO,GAAGE,CAAC,CAACV,GAAG;IACpBS,QAAQ,EAAEE,cAAc;IACxBC,UAAU;IACVK,QAAQ,EAAEL,UAAU;IACpBM,WAAW,EAAER,CAAC,CAACR,EAAE;IACjBiB,MAAM,EAAEX,OAAO,GAAGE,CAAC,CAACP;EACtB,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,SAAS,EAEd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAGnD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC;IACnE,OAAO,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACtC,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AASD,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,qBA6CxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-root.d.ts","sourceRoot":"","sources":["../../../../../../src/components/combobox/components/combobox-root.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"combobox-root.d.ts","sourceRoot":"","sources":["../../../../../../src/components/combobox/components/combobox-root.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AACpE,OAAO,EAEL,KAAK,SAAS,EAGd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,MAAM,OAAO,gBAAgB,CAAC;IACxC,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEnC,iGAAiG;IACjG,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAEvC,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AASD,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAgEpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../../src/components/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG;IACjC,OAAO,CAAC,EAAE,MAAM,OAAO,YAAY,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAAC,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../../src/components/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG;IACjC,OAAO,CAAC,EAAE,MAAM,OAAO,YAAY,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAY7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../../src/components/input/variants/default.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../../src/components/input/variants/default.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,GAAG,WAAW,CA0C9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secondary.d.ts","sourceRoot":"","sources":["../../../../../../src/components/input/variants/secondary.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"secondary.d.ts","sourceRoot":"","sources":["../../../../../../src/components/input/variants/secondary.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,GAAG,WAAW,CA0ChE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../../src/components/phone-input/variants/default.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,IAAI,GAAG,gBAAgB,
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../../src/components/phone-input/variants/default.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,IAAI,GAAG,gBAAgB,CAoIxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"danger.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toast/variants/danger.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,qBAAqB,QAAO,
|
|
1
|
+
{"version":3,"file":"danger.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toast/variants/danger.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,qBAAqB,QAAO,WAwCxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"success.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toast/variants/success.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,sBAAsB,QAAO,
|
|
1
|
+
{"version":3,"file":"success.d.ts","sourceRoot":"","sources":["../../../../../../src/components/toast/variants/success.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,sBAAsB,QAAO,WAwCzC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tracks the current software keyboard height on native platforms.
|
|
3
|
+
* Returns 0 when the keyboard is hidden or on web.
|
|
4
|
+
*
|
|
5
|
+
* Initializes with the current keyboard height so it works correctly
|
|
6
|
+
* even when the keyboard is already visible at mount time.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useKeyboardHeight(): number;
|
|
9
|
+
//# sourceMappingURL=use-keyboard-height.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-keyboard-height.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-keyboard-height.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CA0B1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-relative-position.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-relative-position.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"use-relative-position.d.ts","sourceRoot":"","sources":["../../../../src/hooks/use-relative-position.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAItE,KAAK,uBAAuB,GAAG,IAAI,CAAC,mBAAmB,EAAE,YAAY,GAAG,QAAQ,CAAC,CAAC;AAElF,KAAK,mBAAmB,GAAG,eAAe,GAAG,mBAAmB,GAAG,oBAAoB,CAAC;AAExF,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,eAAe,EACf,aAAa,EACb,WAAW,EACX,UAAU,EACV,aAAa,GACd,EAAE,uBAAuB,GAAG,SAAS,CAsFrC;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,eAAe;IACvB,UAAU,EAAE,cAAc,CAAC;IAC3B,eAAe,EAAE,cAAc,CAAC;IAChC,aAAa,EAAE,eAAe,CAAC;IAC/B,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,UAAU,mBAAoB,SAAQ,eAAe;IACnD,aAAa,EAAE,KAAK,GAAG,QAAQ,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,EAAE,eAK5B,CAAC;AACF,eAAO,MAAM,gBAAgB,EAAE,cAK9B,CAAC;AA6EF,UAAU,oBAAqB,SAAQ,eAAe;IACpD,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.types.d.ts","sourceRoot":"","sources":["../../../../src/types/props.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG;IACnC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI,CAAC,GAAG;IAC3C,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,
|
|
1
|
+
{"version":3,"file":"props.types.d.ts","sourceRoot":"","sources":["../../../../src/types/props.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG;IACnC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI,CAAC,GAAG;IAC3C,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;CAC1C,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare const hslaSetAlpha: (hsla: string, alpha: number) => string;
|
|
2
1
|
export declare const hslaSetLightness: (hsla: string, lightness: number) => string;
|
|
3
2
|
export declare const hslaGetLightness: (hsla: string) => number;
|
|
4
3
|
export declare const hslaSetRelativeLightness: (hsla: string, delta: number) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hsla-utils.d.ts","sourceRoot":"","sources":["../../../../src/utils/hsla-utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"hsla-utils.d.ts","sourceRoot":"","sources":["../../../../src/utils/hsla-utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,EAAE,WAAW,MAAM,KAAG,MAOlE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,KAAG,MAI/C,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,KAAG,MAMtE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@korsolutions/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.90",
|
|
4
4
|
"bugs": {
|
|
5
5
|
"url": "https://github.com/KorSoftwareSolutions/ui/issues"
|
|
6
6
|
},
|
|
@@ -20,8 +20,15 @@
|
|
|
20
20
|
},
|
|
21
21
|
"./package.json": "./package.json"
|
|
22
22
|
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"src",
|
|
26
|
+
"README.md"
|
|
27
|
+
],
|
|
23
28
|
"scripts": {
|
|
24
29
|
"prepare": "bob build",
|
|
30
|
+
"prepack": "bun scripts/prepack.ts",
|
|
31
|
+
"postpack": "bun scripts/postpack.ts",
|
|
25
32
|
"lint": "tsc --noEmit && oxlint .",
|
|
26
33
|
"fmt": "oxfmt"
|
|
27
34
|
},
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import {
|
|
3
|
+
Platform,
|
|
3
4
|
Pressable,
|
|
4
5
|
type PressableProps,
|
|
5
6
|
type StyleProp,
|
|
@@ -66,7 +67,12 @@ export function Button(props: ButtonProps) {
|
|
|
66
67
|
onHoverIn={() => setIsHovered(true)}
|
|
67
68
|
onHoverOut={() => setIsHovered(false)}
|
|
68
69
|
disabled={props.isDisabled}
|
|
69
|
-
style={[
|
|
70
|
+
style={[
|
|
71
|
+
variantStyles.root?.default,
|
|
72
|
+
variantStyles.root?.[state],
|
|
73
|
+
Platform.select({ web: { userSelect: "none" } as ViewStyle }),
|
|
74
|
+
props.style,
|
|
75
|
+
]}
|
|
70
76
|
>
|
|
71
77
|
{organizedChildren}
|
|
72
78
|
{props.isLoading && <Spinner {...spinnerProps} />}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useEffect, useMemo, useRef, useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
type LayoutRectangle,
|
|
4
4
|
type StyleProp,
|
|
@@ -45,20 +45,19 @@ export function ComboboxRoot(props: ComboboxRootProps) {
|
|
|
45
45
|
const [isOpen, setIsOpen] = useState(false);
|
|
46
46
|
const [contentLayout, setContentLayout] = useState<LayoutRectangle>(DEFAULT_LAYOUT);
|
|
47
47
|
const [triggerPosition, setTriggerPosition] = useState<LayoutPosition>(DEFAULT_POSITION);
|
|
48
|
-
const [inputValue,
|
|
48
|
+
const [inputValue, setInputValue] = useState("");
|
|
49
49
|
|
|
50
50
|
const onInputChangeRef = useRef(props.onInputChange);
|
|
51
51
|
onInputChangeRef.current = props.onInputChange;
|
|
52
52
|
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}, []);
|
|
53
|
+
const isFirstRender = useRef(true);
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (isFirstRender.current) {
|
|
56
|
+
isFirstRender.current = false;
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
onInputChangeRef.current?.(inputValue);
|
|
60
|
+
}, [inputValue]);
|
|
62
61
|
|
|
63
62
|
const state = calculateState(props);
|
|
64
63
|
const composedStyles = StyleSheet.flatten([
|
|
@@ -66,6 +66,7 @@ export function usePhoneInputVariantDefault(size: Size): PhoneInputStyles {
|
|
|
66
66
|
color: colors.foreground,
|
|
67
67
|
height: "100%",
|
|
68
68
|
outlineWidth: 0,
|
|
69
|
+
paddingVertical: 0,
|
|
69
70
|
...Platform.select({
|
|
70
71
|
default: {},
|
|
71
72
|
web: {
|
|
@@ -124,6 +125,12 @@ export function usePhoneInputVariantDefault(size: Size): PhoneInputStyles {
|
|
|
124
125
|
color: colors.foreground,
|
|
125
126
|
marginBottom: 4,
|
|
126
127
|
outlineWidth: 0,
|
|
128
|
+
...Platform.select({
|
|
129
|
+
android: {
|
|
130
|
+
textAlignVertical: "center",
|
|
131
|
+
},
|
|
132
|
+
default: {},
|
|
133
|
+
}),
|
|
127
134
|
},
|
|
128
135
|
},
|
|
129
136
|
};
|
|
@@ -5,7 +5,7 @@ export const useToastVariantDanger = (): ToastStyles => {
|
|
|
5
5
|
return useThemedStyles(
|
|
6
6
|
({ colors, radius, fontFamily, fontSize }): ToastStyles => ({
|
|
7
7
|
root: {
|
|
8
|
-
backgroundColor: colors.
|
|
8
|
+
backgroundColor: colors.surface,
|
|
9
9
|
borderWidth: 1,
|
|
10
10
|
borderColor: colors.danger,
|
|
11
11
|
borderRadius: radius,
|
|
@@ -20,25 +20,24 @@ export const useToastVariantDanger = (): ToastStyles => {
|
|
|
20
20
|
gap: 4,
|
|
21
21
|
},
|
|
22
22
|
icon: {
|
|
23
|
-
color: colors.
|
|
23
|
+
color: colors.danger,
|
|
24
24
|
size: 16,
|
|
25
25
|
style: {
|
|
26
26
|
marginTop: 2,
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
29
|
title: {
|
|
30
|
-
color: colors.
|
|
30
|
+
color: colors.danger,
|
|
31
31
|
fontSize: fontSize,
|
|
32
32
|
lineHeight: Math.round(fontSize * 1.25),
|
|
33
33
|
fontWeight: "600",
|
|
34
34
|
fontFamily,
|
|
35
35
|
},
|
|
36
36
|
description: {
|
|
37
|
-
color: colors.
|
|
37
|
+
color: colors.mutedForeground,
|
|
38
38
|
fontSize: fontSize * 0.875,
|
|
39
39
|
lineHeight: Math.round(fontSize * 0.875 * 1.25),
|
|
40
40
|
fontFamily,
|
|
41
|
-
opacity: 0.9,
|
|
42
41
|
},
|
|
43
42
|
}),
|
|
44
43
|
);
|
|
@@ -5,7 +5,7 @@ export const useToastVariantSuccess = (): ToastStyles => {
|
|
|
5
5
|
return useThemedStyles(
|
|
6
6
|
({ colors, radius, fontFamily, fontSize }): ToastStyles => ({
|
|
7
7
|
root: {
|
|
8
|
-
backgroundColor: colors.
|
|
8
|
+
backgroundColor: colors.surface,
|
|
9
9
|
borderWidth: 1,
|
|
10
10
|
borderColor: colors.success,
|
|
11
11
|
borderRadius: radius,
|
|
@@ -20,25 +20,24 @@ export const useToastVariantSuccess = (): ToastStyles => {
|
|
|
20
20
|
gap: 4,
|
|
21
21
|
},
|
|
22
22
|
icon: {
|
|
23
|
-
color: colors.
|
|
23
|
+
color: colors.success,
|
|
24
24
|
size: 16,
|
|
25
25
|
style: {
|
|
26
26
|
marginTop: 2,
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
29
|
title: {
|
|
30
|
-
color: colors.
|
|
30
|
+
color: colors.success,
|
|
31
31
|
fontSize: fontSize,
|
|
32
32
|
lineHeight: Math.round(fontSize * 1.25),
|
|
33
33
|
fontWeight: "600",
|
|
34
34
|
fontFamily,
|
|
35
35
|
},
|
|
36
36
|
description: {
|
|
37
|
-
color: colors.
|
|
37
|
+
color: colors.mutedForeground,
|
|
38
38
|
fontSize: fontSize * 0.875,
|
|
39
39
|
lineHeight: Math.round(fontSize * 0.875 * 1.25),
|
|
40
40
|
fontFamily,
|
|
41
|
-
opacity: 0.9,
|
|
42
41
|
},
|
|
43
42
|
}),
|
|
44
43
|
);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { Keyboard, Platform } from "react-native";
|
|
3
|
+
|
|
4
|
+
function getCurrentKeyboardHeight(): number {
|
|
5
|
+
if (Platform.OS === "web") return 0;
|
|
6
|
+
return Keyboard.metrics()?.height ?? 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Tracks the current software keyboard height on native platforms.
|
|
11
|
+
* Returns 0 when the keyboard is hidden or on web.
|
|
12
|
+
*
|
|
13
|
+
* Initializes with the current keyboard height so it works correctly
|
|
14
|
+
* even when the keyboard is already visible at mount time.
|
|
15
|
+
*/
|
|
16
|
+
export function useKeyboardHeight(): number {
|
|
17
|
+
const [keyboardHeight, setKeyboardHeight] = useState(getCurrentKeyboardHeight);
|
|
18
|
+
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (Platform.OS === "web") return;
|
|
21
|
+
|
|
22
|
+
const showEvent =
|
|
23
|
+
Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow";
|
|
24
|
+
const hideEvent =
|
|
25
|
+
Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide";
|
|
26
|
+
|
|
27
|
+
const showSubscription = Keyboard.addListener(showEvent, (e) => {
|
|
28
|
+
setKeyboardHeight(e.endCoordinates.height);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const hideSubscription = Keyboard.addListener(hideEvent, () => {
|
|
32
|
+
setKeyboardHeight(0);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
return () => {
|
|
36
|
+
showSubscription.remove();
|
|
37
|
+
hideSubscription.remove();
|
|
38
|
+
};
|
|
39
|
+
}, []);
|
|
40
|
+
|
|
41
|
+
return keyboardHeight;
|
|
42
|
+
}
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
import { usePortalOffset } from "../components/portal";
|
|
10
10
|
import { useSafeAreaInsets, type SafeAreaInsets } from "../safe-area";
|
|
11
11
|
import { useIsReactNavigationModal } from "./use-is-react-navigation-modal";
|
|
12
|
+
import { useKeyboardHeight } from "./use-keyboard-height";
|
|
12
13
|
|
|
13
14
|
type UseRelativePositionArgs = Omit<GetContentStyleArgs, "dimensions" | "insets">;
|
|
14
15
|
|
|
@@ -25,9 +26,20 @@ export function useRelativePosition({
|
|
|
25
26
|
const dimensions = useWindowDimensions();
|
|
26
27
|
const insets = useSafeAreaInsets();
|
|
27
28
|
const portalOffset = usePortalOffset();
|
|
29
|
+
const keyboardHeight = useKeyboardHeight();
|
|
28
30
|
|
|
29
31
|
const isReactNavigationModal = useIsReactNavigationModal();
|
|
30
32
|
|
|
33
|
+
// When the keyboard is visible, treat its top edge as the effective
|
|
34
|
+
// bottom boundary so menus/popovers don't render behind it.
|
|
35
|
+
const effectiveInsets: SafeAreaInsets = useMemo(
|
|
36
|
+
() => ({
|
|
37
|
+
...insets,
|
|
38
|
+
bottom: Math.max(insets.bottom, keyboardHeight),
|
|
39
|
+
}),
|
|
40
|
+
[insets, keyboardHeight],
|
|
41
|
+
);
|
|
42
|
+
|
|
31
43
|
return useMemo(() => {
|
|
32
44
|
const hasLayout =
|
|
33
45
|
triggerPosition.width > 0 &&
|
|
@@ -61,7 +73,7 @@ export function useRelativePosition({
|
|
|
61
73
|
preferredSide,
|
|
62
74
|
triggerPosition: adjustedTriggerPosition,
|
|
63
75
|
alignOffset,
|
|
64
|
-
insets,
|
|
76
|
+
insets: effectiveInsets,
|
|
65
77
|
sideOffset,
|
|
66
78
|
dimensions,
|
|
67
79
|
};
|
|
@@ -76,7 +88,9 @@ export function useRelativePosition({
|
|
|
76
88
|
// Temporary fix to calculate portal content relative position correctly when rendered in a React Navigation modal.
|
|
77
89
|
top: Platform.select({
|
|
78
90
|
default: sidePosition.top,
|
|
79
|
-
ios: isReactNavigationModal
|
|
91
|
+
ios: isReactNavigationModal
|
|
92
|
+
? sidePosition.top + effectiveInsets.top
|
|
93
|
+
: sidePosition.top,
|
|
80
94
|
}),
|
|
81
95
|
};
|
|
82
96
|
|
|
@@ -85,7 +99,7 @@ export function useRelativePosition({
|
|
|
85
99
|
align,
|
|
86
100
|
preferredSide,
|
|
87
101
|
alignOffset,
|
|
88
|
-
|
|
102
|
+
effectiveInsets,
|
|
89
103
|
triggerPosition,
|
|
90
104
|
contentLayout,
|
|
91
105
|
dimensions.width,
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import type { Colors } from "../types";
|
|
2
2
|
|
|
3
3
|
export const lightColors: Colors = {
|
|
4
|
-
background: "hsl(
|
|
5
|
-
foreground: "hsl(
|
|
4
|
+
background: "hsl(0, 0%, 98%)",
|
|
5
|
+
foreground: "hsl(0, 0%, 4%)",
|
|
6
6
|
|
|
7
|
-
primary: "hsl(
|
|
8
|
-
primaryForeground: "hsl(
|
|
7
|
+
primary: "hsl(0, 0%, 10%)",
|
|
8
|
+
primaryForeground: "hsl(0, 0%, 98%)",
|
|
9
9
|
|
|
10
|
-
secondary: "hsl(
|
|
11
|
-
secondaryForeground: "hsl(
|
|
10
|
+
secondary: "hsl(0, 0%, 93%)",
|
|
11
|
+
secondaryForeground: "hsl(0, 0%, 9%)",
|
|
12
12
|
|
|
13
|
-
muted: "hsl(
|
|
14
|
-
mutedForeground: "hsl(
|
|
13
|
+
muted: "hsl(0, 0%, 96%)",
|
|
14
|
+
mutedForeground: "hsl(0, 0%, 45%)",
|
|
15
15
|
|
|
16
|
-
border: "hsl(
|
|
17
|
-
surface: "hsl(
|
|
16
|
+
border: "hsl(0, 0%, 90%)",
|
|
17
|
+
surface: "hsl(0, 0%, 100%)",
|
|
18
18
|
|
|
19
|
-
danger: "hsl(
|
|
20
|
-
success: "hsl(
|
|
21
|
-
warning: "hsl(
|
|
22
|
-
info: "hsl(
|
|
19
|
+
danger: "hsl(0, 72%, 51%)",
|
|
20
|
+
success: "hsl(142, 71%, 45%)",
|
|
21
|
+
warning: "hsl(38, 92%, 50%)",
|
|
22
|
+
info: "hsl(217, 91%, 60%)",
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
export const darkColors: Colors = {
|
|
26
|
-
background: "hsl(
|
|
27
|
-
foreground: "hsl(
|
|
26
|
+
background: "hsl(0, 0%, 2%)",
|
|
27
|
+
foreground: "hsl(0, 0%, 96%)",
|
|
28
28
|
|
|
29
|
-
primary: "hsl(
|
|
30
|
-
primaryForeground: "hsl(
|
|
29
|
+
primary: "hsl(0, 0%, 90%)",
|
|
30
|
+
primaryForeground: "hsl(0, 0%, 10%)",
|
|
31
31
|
|
|
32
|
-
secondary: "hsl(
|
|
33
|
-
secondaryForeground: "hsl(
|
|
32
|
+
secondary: "hsl(0, 0%, 15%)",
|
|
33
|
+
secondaryForeground: "hsl(0, 0%, 98%)",
|
|
34
34
|
|
|
35
|
-
muted: "hsl(
|
|
36
|
-
mutedForeground: "hsl(
|
|
35
|
+
muted: "hsl(0, 0%, 15%)",
|
|
36
|
+
mutedForeground: "hsl(0, 0%, 63%)",
|
|
37
37
|
|
|
38
|
-
border: "hsl(
|
|
39
|
-
surface: "hsl(
|
|
38
|
+
border: "hsl(0, 0%, 16%)",
|
|
39
|
+
surface: "hsl(0, 0%, 8%)",
|
|
40
40
|
|
|
41
|
-
danger: "hsl(
|
|
42
|
-
success: "hsl(
|
|
43
|
-
warning: "hsl(
|
|
44
|
-
info: "hsl(
|
|
41
|
+
danger: "hsl(0, 63%, 60%)",
|
|
42
|
+
success: "hsl(142, 60%, 55%)",
|
|
43
|
+
warning: "hsl(38, 80%, 60%)",
|
|
44
|
+
info: "hsl(217, 80%, 65%)",
|
|
45
45
|
};
|
package/src/types/props.types.ts
CHANGED
package/src/utils/hsla-utils.ts
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
export const hslaSetAlpha = (hsla: string, alpha: number): string => {
|
|
2
|
-
const parts = hsla.replace(/^hsla?\(|\s+|\)$/g, "").split(",");
|
|
3
|
-
if (parts[0] === undefined) throw new Error("Invalid HSLA color format");
|
|
4
|
-
if (parts[1] === undefined) throw new Error("Invalid HSLA color format");
|
|
5
|
-
if (parts[2] === undefined) throw new Error("Invalid HSLA color format");
|
|
6
|
-
const h = parseInt(parts[0], 10);
|
|
7
|
-
const s = parseInt(parts[1], 10);
|
|
8
|
-
const l = parseInt(parts[2], 10);
|
|
9
|
-
return `hsla(${h}, ${s}%, ${l}%, ${alpha})`;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
1
|
export const hslaSetLightness = (hsla: string, lightness: number): string => {
|
|
13
2
|
const parts = hsla.replace(/^hsla?\(|\s+|\)$/g, "").split(",");
|
|
14
3
|
if (parts[0] === undefined) throw new Error("Invalid HSLA color format");
|
package/src/utils/size-scale.ts
CHANGED
|
@@ -24,8 +24,8 @@ const scales: Record<
|
|
|
24
24
|
{ pv: number; ph: number; gap: number; fontScale: number; sw: number; h: number }
|
|
25
25
|
> = {
|
|
26
26
|
sm: { pv: 1, ph: 1.5, gap: 0.75, fontScale: 0.875, sw: 1.75, h: 4.5 },
|
|
27
|
-
md: { pv: 1.5, ph: 2, gap: 1, fontScale: 1, sw:
|
|
28
|
-
lg: { pv: 2, ph: 3, gap: 1.25, fontScale: 1.125, sw:
|
|
27
|
+
md: { pv: 1.5, ph: 2, gap: 1, fontScale: 1, sw: 1.75, h: 6 },
|
|
28
|
+
lg: { pv: 2, ph: 3, gap: 1.25, fontScale: 1.125, sw: 1.75, h: 7.5 },
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export function getSizeScale(
|