@sakura-ui/sakura-ui 0.3.0 → 0.4.1

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.
Files changed (129) hide show
  1. package/README.md +61 -0
  2. package/package.json +26 -25
  3. package/packages/core/package.json +10 -8
  4. package/packages/core/src/components/Button.tsx +1 -1
  5. package/packages/core/src/components/Card.tsx +8 -3
  6. package/packages/core/src/components/IconButton.tsx +1 -1
  7. package/packages/core/src/components/LangSelector.tsx +2 -2
  8. package/packages/core/src/components/Link.tsx +0 -1
  9. package/packages/core/src/components/LinkCard.tsx +87 -52
  10. package/packages/core/src/components/MenuButton.tsx +2 -2
  11. package/packages/core/src/components/NavigationItem.tsx +1 -1
  12. package/packages/core/src/components/NotificationBanner.tsx +20 -0
  13. package/packages/core/src/components/PopoverMenu.tsx +1 -0
  14. package/packages/core/src/components/buttonStyle.ts +1 -1
  15. package/packages/core/src/components/index.ts +1 -1
  16. package/packages/core/src/icons/index.ts +1 -1
  17. package/packages/core/src/index.ts +1 -0
  18. package/packages/core/vite.config.ts +2 -1
  19. package/packages/forms/.turbo/turbo-build.log +12 -22
  20. package/packages/forms/dist/index.cjs.js +53 -80
  21. package/packages/forms/dist/index.es.js +484 -663
  22. package/packages/forms/dist/types/components/Checkbox.d.ts +2 -2
  23. package/packages/forms/dist/types/components/Checkbox.d.ts.map +1 -1
  24. package/packages/forms/dist/types/components/FieldsetControl.d.ts +2 -2
  25. package/packages/forms/dist/types/components/FieldsetControl.d.ts.map +1 -1
  26. package/packages/forms/dist/types/components/FileInput.d.ts +2 -2
  27. package/packages/forms/dist/types/components/FileInput.d.ts.map +1 -1
  28. package/packages/forms/dist/types/components/Input.d.ts +2 -2
  29. package/packages/forms/dist/types/components/Input.d.ts.map +1 -1
  30. package/packages/forms/dist/types/components/LabelControl.d.ts +2 -2
  31. package/packages/forms/dist/types/components/LabelControl.d.ts.map +1 -1
  32. package/packages/forms/dist/types/components/Radio.d.ts +2 -2
  33. package/packages/forms/dist/types/components/Radio.d.ts.map +1 -1
  34. package/packages/forms/dist/types/components/Select.d.ts +2 -2
  35. package/packages/forms/dist/types/components/Select.d.ts.map +1 -1
  36. package/packages/forms/dist/types/components/Textarea.d.ts +2 -2
  37. package/packages/forms/dist/types/components/Textarea.d.ts.map +1 -1
  38. package/packages/forms/dist/types/components/controlled/CheckboxGroup.d.ts +1 -1
  39. package/packages/forms/dist/types/components/controlled/RadioGroup.d.ts +1 -1
  40. package/packages/forms/dist/types/components/inputStyle.d.ts +1 -1
  41. package/packages/forms/dist/types/components/inputStyle.d.ts.map +1 -1
  42. package/packages/forms/node_modules/.bin/autoprefixer +44 -6
  43. package/packages/forms/package.json +9 -7
  44. package/packages/forms/src/components/Checkbox.tsx +1 -1
  45. package/packages/forms/src/components/FileInput.tsx +5 -0
  46. package/packages/forms/src/components/Radio.tsx +2 -0
  47. package/packages/forms/tests/FieldsetControl.test.tsx +8 -2
  48. package/packages/forms/tests/LabelControl.test.tsx +8 -2
  49. package/packages/forms/vite.config.ts +2 -1
  50. package/packages/helper/.turbo/turbo-build.log +12 -23
  51. package/packages/helper/dist/index.cjs.js +7 -9
  52. package/packages/helper/dist/index.es.js +23 -23
  53. package/packages/helper/dist/types/calc.d.ts.map +1 -1
  54. package/packages/helper/dist/types/cx.d.ts.map +1 -1
  55. package/packages/helper/dist/types/styles.d.ts +9 -9
  56. package/packages/helper/dist/types/styles.d.ts.map +1 -1
  57. package/packages/helper/dist/types/treefy.d.ts.map +1 -1
  58. package/packages/helper/node_modules/.bin/vitest +55 -0
  59. package/packages/helper/package.json +13 -3
  60. package/packages/helper/src/cx.ts +1 -1
  61. package/packages/helper/src/styles.ts +2 -4
  62. package/packages/helper/src/treefy.ts +3 -1
  63. package/packages/helper/tests/calc.test.ts +22 -0
  64. package/packages/helper/tests/cx.test.ts +30 -0
  65. package/packages/helper/tests/querySelector.test.ts +24 -0
  66. package/packages/helper/tests/treefy.test.ts +111 -0
  67. package/packages/helper/tests/vitest.setup.ts +2 -0
  68. package/packages/markdown/.turbo/turbo-build.log +12 -22
  69. package/packages/markdown/dist/index.cjs.js +37 -63
  70. package/packages/markdown/dist/index.es.js +4287 -4425
  71. package/packages/markdown/dist/types/components/Markdown.d.ts.map +1 -1
  72. package/packages/markdown/dist/types/plugins/attr.d.ts.map +1 -1
  73. package/packages/markdown/dist/types/plugins/card.d.ts.map +1 -1
  74. package/packages/markdown/dist/types/plugins/cell.d.ts.map +1 -1
  75. package/packages/markdown/dist/types/plugins/faq.d.ts.map +1 -1
  76. package/packages/markdown/dist/types/plugins/grid.d.ts.map +1 -1
  77. package/packages/markdown/dist/types/plugins/headings.d.ts +3 -1
  78. package/packages/markdown/dist/types/plugins/headings.d.ts.map +1 -1
  79. package/packages/markdown/dist/types/plugins/helper.d.ts.map +1 -1
  80. package/packages/markdown/dist/types/plugins/linkButton.d.ts.map +1 -1
  81. package/packages/markdown/dist/types/plugins/youtube.d.ts.map +1 -1
  82. package/packages/markdown/node_modules/.bin/autoprefixer +44 -6
  83. package/packages/markdown/package.json +16 -15
  84. package/packages/markdown/src/components/Markdown.tsx +4 -0
  85. package/packages/markdown/src/plugins/grid.ts +4 -1
  86. package/packages/markdown/src/plugins/headings.ts +6 -3
  87. package/packages/markdown/src/plugins/linkButton.ts +2 -1
  88. package/packages/markdown/src/plugins/youtube.ts +5 -4
  89. package/packages/tailwind-theme-plugin/#package.json# +51 -0
  90. package/packages/tailwind-theme-plugin/.turbo/turbo-build.log +12 -22
  91. package/packages/tailwind-theme-plugin/dist/index.cjs.js +1 -1
  92. package/packages/tailwind-theme-plugin/dist/index.es.js +1111 -1477
  93. package/packages/tailwind-theme-plugin/dist/types/index.d.ts +1 -4
  94. package/packages/tailwind-theme-plugin/dist/types/index.d.ts.map +1 -1
  95. package/packages/tailwind-theme-plugin/node_modules/.bin/autoprefixer +44 -6
  96. package/packages/tailwind-theme-plugin/package.json +8 -6
  97. package/packages/tailwind-theme-plugin/src/index.ts +15 -58
  98. package/packages/tailwind-theme-plugin/vite.config.ts +2 -0
  99. package/packages/forms/node_modules/.bin/tailwind +0 -17
  100. package/packages/forms/node_modules/.bin/tailwindcss +0 -17
  101. package/packages/forms/node_modules/.bin/ts-node +0 -17
  102. package/packages/forms/node_modules/.bin/ts-node-cwd +0 -17
  103. package/packages/forms/node_modules/.bin/ts-node-esm +0 -17
  104. package/packages/forms/node_modules/.bin/ts-node-script +0 -17
  105. package/packages/forms/node_modules/.bin/ts-node-transpile-only +0 -17
  106. package/packages/forms/node_modules/.bin/ts-script +0 -17
  107. package/packages/forms/node_modules/.bin/tsc +0 -17
  108. package/packages/forms/node_modules/.bin/tsserver +0 -17
  109. package/packages/forms/node_modules/.vite/vitest/results.json +0 -1
  110. package/packages/markdown/node_modules/.bin/tailwind +0 -17
  111. package/packages/markdown/node_modules/.bin/tailwindcss +0 -17
  112. package/packages/markdown/node_modules/.bin/ts-node +0 -17
  113. package/packages/markdown/node_modules/.bin/ts-node-cwd +0 -17
  114. package/packages/markdown/node_modules/.bin/ts-node-esm +0 -17
  115. package/packages/markdown/node_modules/.bin/ts-node-script +0 -17
  116. package/packages/markdown/node_modules/.bin/ts-node-transpile-only +0 -17
  117. package/packages/markdown/node_modules/.bin/ts-script +0 -17
  118. package/packages/markdown/node_modules/.bin/tsc +0 -17
  119. package/packages/markdown/node_modules/.bin/tsserver +0 -17
  120. package/packages/tailwind-theme-plugin/node_modules/.bin/tailwind +0 -17
  121. package/packages/tailwind-theme-plugin/node_modules/.bin/tailwindcss +0 -17
  122. package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node +0 -17
  123. package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-cwd +0 -17
  124. package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-esm +0 -17
  125. package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-script +0 -17
  126. package/packages/tailwind-theme-plugin/node_modules/.bin/ts-node-transpile-only +0 -17
  127. package/packages/tailwind-theme-plugin/node_modules/.bin/ts-script +0 -17
  128. package/packages/tailwind-theme-plugin/node_modules/.bin/tsc +0 -17
  129. package/packages/tailwind-theme-plugin/node_modules/.bin/tsserver +0 -17
@@ -1,4 +1,4 @@
1
- import { type ComponentPropsWithRef } from 'react';
1
+ import React, { type ComponentPropsWithRef } from 'react';
2
2
  import { type InputSize } from './inputStyle';
3
3
  export declare namespace Checkbox {
4
4
  interface Props extends Omit<ComponentPropsWithRef<'input'>, 'size'> {
@@ -6,7 +6,7 @@ export declare namespace Checkbox {
6
6
  }
7
7
  }
8
8
  export declare const Checkbox: {
9
- (props: Checkbox.Props): import("react/jsx-runtime").JSX.Element;
9
+ (props: Checkbox.Props): React.JSX.Element;
10
10
  displayName: string;
11
11
  };
12
12
  //# sourceMappingURL=Checkbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAGzD,OAAO,EACL,KAAK,SAAS,EAIf,MAAM,cAAc,CAAA;AAErB,yBAAiB,QAAQ,CAAC;IACxB,UAAiB,KAAM,SAAQ,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QACzE,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB;CACF;AAED,eAAO,MAAM,QAAQ;YAAW,QAAQ,CAAC,KAAK;;CA0E7C,CAAA"}
1
+ {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAGzD,OAAO,EACL,KAAK,SAAS,EAIf,MAAM,cAAc,CAAA;AAErB,yBAAiB,QAAQ,CAAC;IACxB,UAAiB,KAAM,SAAQ,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QACzE,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB;CACF;AAED,eAAO,MAAM,QAAQ;YAAW,QAAQ,CAAC,KAAK;;CA0E7C,CAAA"}
@@ -1,4 +1,4 @@
1
- import { type ComponentPropsWithRef } from 'react';
1
+ import React, { type ComponentPropsWithRef } from 'react';
2
2
  export declare namespace FieldsetControl {
3
3
  interface Props extends ComponentPropsWithRef<'fieldset'> {
4
4
  labelText: string;
@@ -10,7 +10,7 @@ export declare namespace FieldsetControl {
10
10
  }
11
11
  }
12
12
  export declare const FieldsetControl: {
13
- (props: FieldsetControl.Props): import("react/jsx-runtime").JSX.Element;
13
+ (props: FieldsetControl.Props): React.JSX.Element;
14
14
  displayName: string;
15
15
  };
16
16
  //# sourceMappingURL=FieldsetControl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldsetControl.d.ts","sourceRoot":"","sources":["../../../src/components/FieldsetControl.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAIzD,yBAAiB,eAAe,CAAC;IAC/B,UAAiB,KAAM,SAAQ,qBAAqB,CAAC,UAAU,CAAC;QAC9D,SAAS,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,SAAS,CAAC,EAAE,OAAO,CAAA;QACnB,UAAU,CAAC,EAAE,OAAO,CAAA;QACpB,SAAS,CAAC,EAAE,UAAU,GAAG,UAAU,CAAA;KACpC;CACF;AAED,eAAO,MAAM,eAAe;YAAW,eAAe,CAAC,KAAK;;CAoD3D,CAAA"}
1
+ {"version":3,"file":"FieldsetControl.d.ts","sourceRoot":"","sources":["../../../src/components/FieldsetControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAIzD,yBAAiB,eAAe,CAAC;IAC/B,UAAiB,KAAM,SAAQ,qBAAqB,CAAC,UAAU,CAAC;QAC9D,SAAS,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,SAAS,CAAC,EAAE,OAAO,CAAA;QACnB,UAAU,CAAC,EAAE,OAAO,CAAA;QACpB,SAAS,CAAC,EAAE,UAAU,GAAG,UAAU,CAAA;KACpC;CACF;AAED,eAAO,MAAM,eAAe;YAAW,eAAe,CAAC,KAAK;;CAoD3D,CAAA"}
@@ -1,4 +1,4 @@
1
- import { type ComponentPropsWithRef } from 'react';
1
+ import React, { type ComponentPropsWithRef } from 'react';
2
2
  import type { InputSize } from './inputStyle';
3
3
  export declare namespace FileInput {
4
4
  interface Props extends Omit<ComponentPropsWithRef<'input'>, 'size'> {
@@ -6,7 +6,7 @@ export declare namespace FileInput {
6
6
  }
7
7
  }
8
8
  export declare const FileInput: {
9
- (props: FileInput.Props): import("react/jsx-runtime").JSX.Element;
9
+ (props: FileInput.Props): React.JSX.Element;
10
10
  displayName: string;
11
11
  };
12
12
  //# sourceMappingURL=FileInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../src/components/FileInput.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAGzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,yBAAiB,SAAS,CAAC;IACzB,UAAiB,KAAM,SAAQ,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QACzE,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB;CACF;AAED,eAAO,MAAM,SAAS;YAAW,SAAS,CAAC,KAAK;;CAsF/C,CAAA"}
1
+ {"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../src/components/FileInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAGzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,yBAAiB,SAAS,CAAC;IACzB,UAAiB,KAAM,SAAQ,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QACzE,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB;CACF;AAED,eAAO,MAAM,SAAS;YAAW,SAAS,CAAC,KAAK;;CA2F/C,CAAA"}
@@ -1,4 +1,4 @@
1
- import { type ComponentPropsWithRef } from 'react';
1
+ import React, { type ComponentPropsWithRef } from 'react';
2
2
  import { type InputSize } from './inputStyle';
3
3
  export declare namespace Input {
4
4
  interface Props extends Omit<ComponentPropsWithRef<'input'>, 'size'> {
@@ -6,7 +6,7 @@ export declare namespace Input {
6
6
  }
7
7
  }
8
8
  export declare const Input: {
9
- (props: Input.Props): import("react/jsx-runtime").JSX.Element;
9
+ (props: Input.Props): React.JSX.Element;
10
10
  displayName: string;
11
11
  };
12
12
  //# sourceMappingURL=Input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAGzD,OAAO,EACL,KAAK,SAAS,EAGf,MAAM,cAAc,CAAA;AAErB,yBAAiB,KAAK,CAAC;IACrB,UAAiB,KAAM,SAAQ,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QACzE,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB;CACF;AAED,eAAO,MAAM,KAAK;YAAW,KAAK,CAAC,KAAK;;CAuBvC,CAAA"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAGzD,OAAO,EACL,KAAK,SAAS,EAGf,MAAM,cAAc,CAAA;AAErB,yBAAiB,KAAK,CAAC;IACrB,UAAiB,KAAM,SAAQ,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QACzE,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB;CACF;AAED,eAAO,MAAM,KAAK;YAAW,KAAK,CAAC,KAAK;;CAuBvC,CAAA"}
@@ -1,4 +1,4 @@
1
- import { type ComponentPropsWithRef } from 'react';
1
+ import React, { type ComponentPropsWithRef } from 'react';
2
2
  export declare namespace LabelControl {
3
3
  interface Props extends ComponentPropsWithRef<'label'> {
4
4
  labelText: string;
@@ -9,7 +9,7 @@ export declare namespace LabelControl {
9
9
  }
10
10
  }
11
11
  export declare const LabelControl: {
12
- (props: LabelControl.Props): import("react/jsx-runtime").JSX.Element;
12
+ (props: LabelControl.Props): React.JSX.Element;
13
13
  displayName: string;
14
14
  };
15
15
  //# sourceMappingURL=LabelControl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LabelControl.d.ts","sourceRoot":"","sources":["../../../src/components/LabelControl.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAIzD,yBAAiB,YAAY,CAAC;IAC5B,UAAiB,KAAM,SAAQ,qBAAqB,CAAC,OAAO,CAAC;QAC3D,SAAS,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,SAAS,CAAC,EAAE,OAAO,CAAA;QACnB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB;CACF;AAED,eAAO,MAAM,YAAY;YAAW,YAAY,CAAC,KAAK;;CAwDrD,CAAA"}
1
+ {"version":3,"file":"LabelControl.d.ts","sourceRoot":"","sources":["../../../src/components/LabelControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAIzD,yBAAiB,YAAY,CAAC;IAC5B,UAAiB,KAAM,SAAQ,qBAAqB,CAAC,OAAO,CAAC;QAC3D,SAAS,EAAE,MAAM,CAAA;QACjB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,SAAS,CAAC,EAAE,OAAO,CAAA;QACnB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB;CACF;AAED,eAAO,MAAM,YAAY;YAAW,YAAY,CAAC,KAAK;;CAwDrD,CAAA"}
@@ -1,4 +1,4 @@
1
- import { type ComponentPropsWithRef } from 'react';
1
+ import React, { type ComponentPropsWithRef } from 'react';
2
2
  import { type InputSize } from './inputStyle';
3
3
  export declare namespace Radio {
4
4
  interface Props extends Omit<ComponentPropsWithRef<'input'>, 'size'> {
@@ -6,7 +6,7 @@ export declare namespace Radio {
6
6
  }
7
7
  }
8
8
  export declare const Radio: {
9
- (props: Radio.Props): import("react/jsx-runtime").JSX.Element;
9
+ (props: Radio.Props): React.JSX.Element;
10
10
  displayName: string;
11
11
  };
12
12
  //# sourceMappingURL=Radio.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/components/Radio.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAGzD,OAAO,EACL,KAAK,SAAS,EAIf,MAAM,cAAc,CAAA;AAErB,yBAAiB,KAAK,CAAC;IACrB,UAAiB,KAAM,SAAQ,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QACzE,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB;CACF;AAED,eAAO,MAAM,KAAK;YAAW,KAAK,CAAC,KAAK;;CA+DvC,CAAA"}
1
+ {"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/components/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAGzD,OAAO,EACL,KAAK,SAAS,EAIf,MAAM,cAAc,CAAA;AAErB,yBAAiB,KAAK,CAAC;IACrB,UAAiB,KAAM,SAAQ,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QACzE,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB;CACF;AAED,eAAO,MAAM,KAAK;YAAW,KAAK,CAAC,KAAK;;CAiEvC,CAAA"}
@@ -1,4 +1,4 @@
1
- import { type ComponentPropsWithRef } from 'react';
1
+ import React, { type ComponentPropsWithRef } from 'react';
2
2
  import { type InputSize } from './inputStyle';
3
3
  export declare namespace Select {
4
4
  interface Props extends Omit<ComponentPropsWithRef<'select'>, 'size'> {
@@ -6,7 +6,7 @@ export declare namespace Select {
6
6
  }
7
7
  }
8
8
  export declare const Select: {
9
- (props: Select.Props): import("react/jsx-runtime").JSX.Element;
9
+ (props: Select.Props): React.JSX.Element;
10
10
  displayName: string;
11
11
  };
12
12
  //# sourceMappingURL=Select.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAGzD,OAAO,EACL,KAAK,SAAS,EAGf,MAAM,cAAc,CAAA;AAErB,yBAAiB,MAAM,CAAC;IACtB,UAAiB,KAAM,SAAQ,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAC1E,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB;CACF;AAED,eAAO,MAAM,MAAM;YAAW,MAAM,CAAC,KAAK;;CA2DzC,CAAA"}
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAGzD,OAAO,EACL,KAAK,SAAS,EAGf,MAAM,cAAc,CAAA;AAErB,yBAAiB,MAAM,CAAC;IACtB,UAAiB,KAAM,SAAQ,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAC1E,IAAI,CAAC,EAAE,SAAS,CAAA;KACjB;CACF;AAED,eAAO,MAAM,MAAM;YAAW,MAAM,CAAC,KAAK;;CA2DzC,CAAA"}
@@ -1,10 +1,10 @@
1
- import { type ComponentPropsWithRef } from 'react';
1
+ import React, { type ComponentPropsWithRef } from 'react';
2
2
  export declare namespace Textarea {
3
3
  interface Props extends ComponentPropsWithRef<'textarea'> {
4
4
  }
5
5
  }
6
6
  export declare const Textarea: {
7
- (props: Textarea.Props): import("react/jsx-runtime").JSX.Element;
7
+ (props: Textarea.Props): React.JSX.Element;
8
8
  displayName: string;
9
9
  };
10
10
  //# sourceMappingURL=Textarea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAIzD,yBAAiB,QAAQ,CAAC;IACxB,UAAiB,KAAM,SAAQ,qBAAqB,CAAC,UAAU,CAAC;KAAG;CACpE;AAED,eAAO,MAAM,QAAQ;YAAW,QAAQ,CAAC,KAAK;;CAyD7C,CAAA"}
1
+ {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAIzD,yBAAiB,QAAQ,CAAC;IACxB,UAAiB,KAAM,SAAQ,qBAAqB,CAAC,UAAU,CAAC;KAAG;CACpE;AAED,eAAO,MAAM,QAAQ;YAAW,QAAQ,CAAC,KAAK;;CAyD7C,CAAA"}
@@ -14,7 +14,7 @@ export declare namespace CheckboxGroup {
14
14
  }
15
15
  }
16
16
  export declare const CheckboxGroup: {
17
- (props: CheckboxGroup.Props): import("react/jsx-runtime").JSX.Element;
17
+ (props: CheckboxGroup.Props): React.JSX.Element;
18
18
  displayName: string;
19
19
  };
20
20
  //# sourceMappingURL=CheckboxGroup.d.ts.map
@@ -15,7 +15,7 @@ export declare namespace RadioGroup {
15
15
  }
16
16
  }
17
17
  export declare const RadioGroup: {
18
- (props: RadioGroup.Props): import("react/jsx-runtime").JSX.Element;
18
+ (props: RadioGroup.Props): React.JSX.Element;
19
19
  displayName: string;
20
20
  };
21
21
  //# sourceMappingURL=RadioGroup.d.ts.map
@@ -1,5 +1,5 @@
1
1
  export type InputSize = 'lg' | 'md' | 'sm';
2
- export declare const borderedInputBaseStyles = "\n bg-white\n border\n border-solid\n border-solid-gray-900\n disabled:bg-transparent\n disabled:text-solid-gray-500\n disabled:border-solid-gray-500\n aria-invalid:border-red-800\n \n \n focus-visible:outline\n focus-visible:outline-4\n focus-visible:outline-black\n focus-visible:ring-yellow-300\n \n focus-visible:outline-offset-[calc(2/16*1rem)]\n focus-visible:ring-[calc(2/16*1rem)]\n \n";
2
+ export declare const borderedInputBaseStyles = "\n bg-white\n border\n border-solid\n border-solid-gray-900\n disabled:bg-transparent\n disabled:text-solid-gray-500\n disabled:border-solid-gray-500\n aria-invalid:border-red-800\n \n \n focus-visible:outline-4\n focus-visible:outline-black\n focus-visible:ring-yellow-300\n \n focus-visible:outline-offset-[calc(2/16*1rem)]\n focus-visible:ring-[calc(2/16*1rem)]\n \n";
3
3
  export declare const borderedInputSizeStyles: {
4
4
  [key in InputSize]: string;
5
5
  };
@@ -1 +1 @@
1
- {"version":3,"file":"inputStyle.d.ts","sourceRoot":"","sources":["../../../src/components/inputStyle.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAE1C,eAAO,MAAM,uBAAuB,8aAUnC,CAAA;AAGD,eAAO,MAAM,uBAAuB,EAAE;KAAG,GAAG,IAAI,SAAS,GAAG,MAAM;CAwBjE,CAAA;AAED,eAAO,MAAM,yBAAyB,yFAMrC,CAAA;AAGD,eAAO,MAAM,yBAAyB,EAAE;KAAG,GAAG,IAAI,SAAS,GAAG,MAAM;CAsBnE,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE;KAAG,GAAG,IAAI,SAAS,GAAG,MAAM;CAIpD,CAAA"}
1
+ {"version":3,"file":"inputStyle.d.ts","sourceRoot":"","sources":["../../../src/components/inputStyle.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAE1C,eAAO,MAAM,uBAAuB,mZAUnC,CAAA;AAGD,eAAO,MAAM,uBAAuB,EAAE;KAAG,GAAG,IAAI,SAAS,GAAG,MAAM;CAwBjE,CAAA;AAED,eAAO,MAAM,yBAAyB,yFAMrC,CAAA;AAGD,eAAO,MAAM,yBAAyB,EAAE;KAAG,GAAG,IAAI,SAAS,GAAG,MAAM;CAsBnE,CAAA;AAGD,eAAO,MAAM,UAAU,EAAE;KAAG,GAAG,IAAI,SAAS,GAAG,MAAM;CAIpD,CAAA"}
@@ -1,17 +1,55 @@
1
1
  #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
2
+ # Resolve $0 through symlinks so basedir is the shim's real directory.
3
+ # Cap hops at the kernel's ELOOP limit so a cycle cannot hang the shim.
4
+ link="$0"
5
+ hops=0
6
+ while [ -L "$link" ] && [ "$hops" -lt 40 ]; do
7
+ hops=$((hops+1))
8
+ target=$(readlink "$link")
9
+ case "$target" in
10
+ /*) link="$target" ;;
11
+ *) link="$(dirname "$link")/$target" ;;
12
+ esac
13
+ done
14
+ basedir=$(dirname "$(echo "$link" | sed -e 's,\\,/,g')")
15
+ basedir_win="$basedir"
16
+ exe=""
17
+ msys=""
3
18
 
4
- case `uname` in
5
- *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
19
+ case `uname -a` in
20
+ *CYGWIN*|*MINGW*|*MSYS*)
21
+ if command -v cygpath > /dev/null 2>&1; then
22
+ basedir_win=`cygpath -w "$basedir"`
23
+ fi
24
+ exe=".exe"
25
+ msys="true"
26
+ ;;
27
+ *WSL2*)
28
+ if command -v wslpath > /dev/null 2>&1; then
29
+ basedir_win="$(wslpath -w "$basedir" 2> /dev/null)"
30
+ if [ $? -ne 0 ] || [ -z "$basedir_win" ]; then
31
+ basedir_win="$basedir"
32
+ else
33
+ exe=".exe"
34
+ fi
35
+ fi
36
+ ;;
6
37
  esac
7
38
 
8
39
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/Users/t.fujita/Documents/Repos/sakura-ui/node_modules/.pnpm/autoprefixer@10.4.20_postcss@8.4.49/node_modules/autoprefixer/bin/node_modules:/Users/t.fujita/Documents/Repos/sakura-ui/node_modules/.pnpm/autoprefixer@10.4.20_postcss@8.4.49/node_modules/autoprefixer/node_modules:/Users/t.fujita/Documents/Repos/sakura-ui/node_modules/.pnpm/autoprefixer@10.4.20_postcss@8.4.49/node_modules:/Users/t.fujita/Documents/Repos/sakura-ui/node_modules/.pnpm/node_modules"
40
+ export NODE_PATH="/home/runner/work/sakura-ui/sakura-ui/node_modules/.pnpm/autoprefixer@10.5.4_postcss@8.5.26/node_modules/autoprefixer/node_modules:/home/runner/work/sakura-ui/sakura-ui/node_modules/.pnpm/autoprefixer@10.5.4_postcss@8.5.26/node_modules:/home/runner/work/sakura-ui/sakura-ui/node_modules/.pnpm/node_modules"
10
41
  else
11
- export NODE_PATH="/Users/t.fujita/Documents/Repos/sakura-ui/node_modules/.pnpm/autoprefixer@10.4.20_postcss@8.4.49/node_modules/autoprefixer/bin/node_modules:/Users/t.fujita/Documents/Repos/sakura-ui/node_modules/.pnpm/autoprefixer@10.4.20_postcss@8.4.49/node_modules/autoprefixer/node_modules:/Users/t.fujita/Documents/Repos/sakura-ui/node_modules/.pnpm/autoprefixer@10.4.20_postcss@8.4.49/node_modules:/Users/t.fujita/Documents/Repos/sakura-ui/node_modules/.pnpm/node_modules:$NODE_PATH"
42
+ export NODE_PATH="/home/runner/work/sakura-ui/sakura-ui/node_modules/.pnpm/autoprefixer@10.5.4_postcss@8.5.26/node_modules/autoprefixer/node_modules:/home/runner/work/sakura-ui/sakura-ui/node_modules/.pnpm/autoprefixer@10.5.4_postcss@8.5.26/node_modules:/home/runner/work/sakura-ui/sakura-ui/node_modules/.pnpm/node_modules:$NODE_PATH"
12
43
  fi
13
- if [ -x "$basedir/node" ]; then
44
+ if [ -n "$exe" ] && [ -x "$basedir/node.exe" ]; then
45
+ exec "$basedir/node.exe" "$basedir_win/../autoprefixer/bin/autoprefixer" "$@"
46
+ elif [ -x "$basedir/node" ]; then
14
47
  exec "$basedir/node" "$basedir/../autoprefixer/bin/autoprefixer" "$@"
48
+ elif command -v node >/dev/null 2>&1; then
49
+ exec node "$basedir/../autoprefixer/bin/autoprefixer" "$@"
50
+ elif [ -n "$exe" ] && command -v node.exe >/dev/null 2>&1; then
51
+ exec node.exe "$basedir_win/../autoprefixer/bin/autoprefixer" "$@"
15
52
  else
16
53
  exec node "$basedir/../autoprefixer/bin/autoprefixer" "$@"
17
54
  fi
55
+ # cmd-shim-target=/home/runner/work/sakura-ui/sakura-ui/packages/forms/node_modules/autoprefixer/bin/autoprefixer
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@sakura-ui/forms",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "glassonion1",
7
7
  "homepage": "https://github.com/glassonion1/sakura-ui",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "git+ssh://git@github.com:glassonion1/sakura-ui.git",
10
+ "url": "git+https://github.com/glassonion1/sakura-ui.git",
11
11
  "directory": "packages/forms"
12
12
  },
13
13
  "license": "MIT",
@@ -36,21 +36,23 @@
36
36
  "build": "run-p build:*",
37
37
  "build:scripts": "vite build",
38
38
  "build:types": "tsc && tsc-alias",
39
- "test": "vitest"
39
+ "test": "vitest run",
40
+ "test:watch": "vitest"
40
41
  },
41
42
  "peerDependencies": {
42
- "react": "^19.0.0",
43
- "react-dom": "^19.0.0",
44
- "tailwindcss": "^3.4.5"
43
+ "react": "^19.2.1",
44
+ "react-dom": "^19.2.1",
45
+ "tailwindcss": "^4.1.17"
45
46
  },
46
47
  "dependencies": {
47
- "@sakura-ui/helper": "0.0.5"
48
+ "@sakura-ui/helper": "workspace:*"
48
49
  },
49
50
  "devDependencies": {
50
51
  "@testing-library/jest-dom": "catalog:",
51
52
  "@testing-library/react": "catalog:",
52
53
  "@types/react": "catalog:",
53
54
  "@types/react-dom": "catalog:",
55
+ "@tailwindcss/vite": "catalog:",
54
56
  "autoprefixer": "catalog:",
55
57
  "happy-dom": "catalog:",
56
58
  "postcss": "catalog:",
@@ -39,7 +39,7 @@ export const Checkbox = (props: Checkbox.Props) => {
39
39
 
40
40
  const styleCheck = `
41
41
  bg-clip-content
42
- rounded
42
+ rounded-sm
43
43
  border
44
44
  border-solid
45
45
  border-solid-gray-900
@@ -81,7 +81,12 @@ export const FileInput = (props: FileInput.Props) => {
81
81
  `
82
82
  }
83
83
 
84
+ // TODO: aria-required is not valid on input[type=file] and role="button" does not
85
+ // describe a file picker. Both need to be reworked (the required attribute changes
86
+ // form submission behaviour), so they are tracked separately from this change.
84
87
  return (
88
+ // biome-ignore lint/a11y/useAriaPropsSupportedByRole: see the TODO above
89
+ // biome-ignore lint/a11y/useSemanticElements: see the TODO above
85
90
  <input
86
91
  type="file"
87
92
  id={id || ctx.id}
@@ -59,6 +59,8 @@ export const Radio = (props: Radio.Props) => {
59
59
  )}
60
60
  >
61
61
  <span className="flex items-center">
62
+ {/* TODO: aria-required belongs on the radiogroup (FieldsetControl), not on each radio */}
63
+ {/* biome-ignore lint/a11y/useAriaPropsSupportedByRole: see the TODO above */}
62
64
  <input
63
65
  id={radioId}
64
66
  className={styleInput}
@@ -34,8 +34,14 @@ describe('FieldsetControl', () => {
34
34
 
35
35
  expect(input).toBeInTheDocument()
36
36
 
37
- expect(input).toHaveAttribute('aria-describedby', 'helper-text-:r1:')
38
- expect(input).toHaveAttribute('aria-errormessage', 'error-message-:r1:')
37
+ expect(input).toHaveAttribute(
38
+ 'aria-describedby',
39
+ screen.getByText('helper').id
40
+ )
41
+ expect(input).toHaveAttribute(
42
+ 'aria-errormessage',
43
+ screen.getByText('error').id
44
+ )
39
45
 
40
46
  expect(input).toBeInvalid()
41
47
  expect(input).toHaveAttribute('aria-invalid', 'true')
@@ -34,8 +34,14 @@ describe('LabelControl', () => {
34
34
 
35
35
  expect(input).toBeInTheDocument()
36
36
 
37
- expect(input).toHaveAttribute('aria-describedby', 'helper-text-:r1:')
38
- expect(input).toHaveAttribute('aria-errormessage', 'error-message-:r1:')
37
+ expect(input).toHaveAttribute(
38
+ 'aria-describedby',
39
+ screen.getByText('helper').id
40
+ )
41
+ expect(input).toHaveAttribute(
42
+ 'aria-errormessage',
43
+ screen.getByText('error').id
44
+ )
39
45
 
40
46
  expect(input).toBeInvalid()
41
47
  expect(input).toHaveAttribute('aria-invalid', 'true')
@@ -3,10 +3,11 @@ import { resolve } from 'node:path'
3
3
  import { defineConfig } from 'vite'
4
4
  import react from '@vitejs/plugin-react-swc'
5
5
  import { peerDependencies } from './package.json'
6
+ import tailwindcss from '@tailwindcss/vite'
6
7
 
7
8
  // https://vitejs.dev/config/
8
9
  export default defineConfig({
9
- plugins: [react()],
10
+ plugins: [react(), tailwindcss()],
10
11
  resolve: {
11
12
  alias: {
12
13
  '@': resolve(__dirname, 'src')
@@ -1,23 +1,12 @@
1
-
2
- 
3
- > @sakura-ui/helper@0.0.5 prebuild /Users/t.fujita/Documents/Repos/sakura-ui/packages/helper
4
- > rimraf dist
5
-
6
-
7
- > @sakura-ui/helper@0.0.5 build /Users/t.fujita/Documents/Repos/sakura-ui/packages/helper
8
- > run-p build:*
9
-
10
-
11
- > @sakura-ui/helper@0.0.5 build:scripts /Users/t.fujita/Documents/Repos/sakura-ui/packages/helper
12
- > vite build
13
-
14
-
15
- > @sakura-ui/helper@0.0.5 build:types /Users/t.fujita/Documents/Repos/sakura-ui/packages/helper
16
- > tsc && tsc-alias
17
-
18
- The CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
19
- vite v6.0.3 building for production...
20
- transforming (1) src/index.ts✓ 6 modules transformed.
21
- rendering chunks (1)...computing gzip size (0)...computing gzip size (1)...dist/index.es.js 2.92 kB │ gzip: 1.00 kB
22
- rendering chunks (1)...computing gzip size (1)...dist/index.cjs.js 2.75 kB │ gzip: 1.00 kB
23
- ✓ built in 68ms
1
+ $ rimraf dist
2
+ $ run-p build:*
3
+ $ vite build
4
+ $ tsc && tsc-alias
5
+ vite v7.3.6 building client environment for production...
6
+ transforming...
7
+ ✓ 6 modules transformed.
8
+ rendering chunks...
9
+ computing gzip size...
10
+ dist/index.es.js 2.90 kB │ gzip: 1.00 kB
11
+ dist/index.cjs.js 2.72 kB │ gzip: 0.99 kB
12
+ ✓ built in 303ms
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=':not([tabindex^="-"])',n=":not(:disabled)",l=[`a[href]${o}`,`area[href]${o}`,`input:not([type="hidden"])${o}${n}`,`select${o}${n}`,`textarea${o}${n}`,`button${o}${n}`,`details > summary:first-of-type${o}`,`details:not(:has(> summary))${o}`,`iframe${o}`,`audio[controls]${o}`,`video[controls]${o}`,`[contenteditable]${o}`,`[tabindex]${o}`],d=l.join(","),f=(e,i)=>(e%i+i)%i,b=(...e)=>e.filter(Boolean).join(" "),a=e=>{const i=[],c=[];let t=-1,r=-1;for(const{children:v,...s}of e){if(t<s.depth&&s.depth<=r+1){const u=s.depth-t;r=s.depth,(c[u-1].children??[]).push(s),c[u]=s;continue}i.push(s),c[0]=s,t=r=s.depth}return i};exports.Style=void 0;(e=>{e.clickable=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=':not([tabindex^="-"])',n=":not(:disabled)",d=[`a[href]${o}`,`area[href]${o}`,`input:not([type="hidden"])${o}${n}`,`select${o}${n}`,`textarea${o}${n}`,`button${o}${n}`,`details > summary:first-of-type${o}`,`details:not(:has(> summary))${o}`,`iframe${o}`,`audio[controls]${o}`,`video[controls]${o}`,`[contenteditable]${o}`,`[tabindex]${o}`],f=d.join(","),a=(e,s)=>(e%s+s)%s,b=(...e)=>e.filter(Boolean).join(" "),h=e=>{const s=[],c=[];let t=-1,r=-1;for(const{children:v,...i}of e){if(t<i.depth&&i.depth<=r+1){const l=i.depth-t;r=i.depth;const u=c[l-1];u.children??=[],u.children.push(i),c[l]=i;continue}s.push(i),c[0]=i,t=r=i.depth}return s};exports.Style=void 0;(e=>{e.clickable=`
2
2
  px-2
3
3
  min-h-[calc(44/16*1rem)]
4
4
  border
@@ -8,13 +8,12 @@
8
8
  `,e.selected=`
9
9
  rounded-full
10
10
  bg-yellow-50
11
- `;const i=`
12
- focus-visible:outline
11
+ `;const s=`
13
12
  focus-visible:outline-4
14
13
  focus-visible:outline-black
15
14
  focus-visible:ring-yellow-300
16
15
  `;e.focusRectCondensed=`
17
- ${i}
16
+ ${s}
18
17
  focus-visible:-outline-offset-4
19
18
  focus-visible:ring-[calc(6/16*1rem)]
20
19
  focus-visible:ring-inset
@@ -22,12 +21,12 @@
22
21
  ${e.focusRectCondensed}
23
22
  focus-visible:bg-yellow-300
24
23
  `,e.focusRect=`
25
- ${i}
24
+ ${s}
26
25
  focus-visible:outline-offset-[calc(2/16*1rem)]
27
26
  focus-visible:ring-[calc(2/16*1rem)]
28
27
  `,e.focusRounded=`
29
28
  ${e.focusRect}
30
- focus-visible:rounded
29
+ focus-visible:rounded-sm
31
30
  `,e.focusCard=`
32
31
  ${e.focusRect}
33
32
  focus-visible:rounded-2xl
@@ -37,7 +36,7 @@
37
36
  focus-visible:bg-yellow-300
38
37
  `,e.focusRoundedWithBg=`
39
38
  ${e.focusRectWithBg}
40
- focus-visible:rounded
39
+ focus-visible:rounded-sm
41
40
  `,e.hoverUnderline=`
42
41
  hover:underline
43
42
  hover:underline-offset-[calc(3/16*1rem)]
@@ -67,7 +66,6 @@
67
66
  top-11
68
67
  left-0
69
68
  `,(c=>{c.focus=`
70
- peer-focus-visible:outline
71
69
  peer-focus-visible:outline-4
72
70
  peer-focus-visible:outline-black
73
71
  peer-focus-visible:ring-yellow-300
@@ -75,4 +73,4 @@
75
73
  ${c.focus}
76
74
  peer-focus-visible:outline-offset-[calc(2/16*1rem)]
77
75
  peer-focus-visible:ring-[calc(2/16*1rem)]
78
- `})(e.Peer||(e.Peer={}))})(exports.Style||(exports.Style={}));exports.cx=b;exports.focusableSelector=d;exports.mod=f;exports.treefy=a;
76
+ `})(e.Peer||(e.Peer={}))})(exports.Style||(exports.Style={}));exports.cx=b;exports.focusableSelector=f;exports.mod=a;exports.treefy=h;
@@ -1,4 +1,4 @@
1
- const o = ':not([tabindex^="-"])', n = ":not(:disabled)", d = [
1
+ const o = ':not([tabindex^="-"])', n = ":not(:disabled)", f = [
2
2
  `a[href]${o}`,
3
3
  `area[href]${o}`,
4
4
  `input:not([type="hidden"])${o}${n}`,
@@ -12,20 +12,22 @@ const o = ':not([tabindex^="-"])', n = ":not(:disabled)", d = [
12
12
  `video[controls]${o}`,
13
13
  `[contenteditable]${o}`,
14
14
  `[tabindex]${o}`
15
- ], a = d.join(","), b = (e, i) => (e % i + i) % i, v = (...e) => e.filter(Boolean).join(" "), h = (e) => {
16
- const i = [], c = [];
15
+ ], b = f.join(","), h = (e, s) => (e % s + s) % s, p = (...e) => e.filter(Boolean).join(" "), v = (e) => {
16
+ const s = [], c = [];
17
17
  let t = -1, r = -1;
18
- for (const { children: f, ...s } of e) {
19
- if (t < s.depth && s.depth <= r + 1) {
20
- const u = s.depth - t;
21
- r = s.depth, (c[u - 1].children ?? []).push(s), c[u] = s;
18
+ for (const { children: a, ...i } of e) {
19
+ if (t < i.depth && i.depth <= r + 1) {
20
+ const u = i.depth - t;
21
+ r = i.depth;
22
+ const l = c[u - 1];
23
+ l.children ??= [], l.children.push(i), c[u] = i;
22
24
  continue;
23
25
  }
24
- i.push(s), c[0] = s, t = r = s.depth;
26
+ s.push(i), c[0] = i, t = r = i.depth;
25
27
  }
26
- return i;
28
+ return s;
27
29
  };
28
- var l;
30
+ var d;
29
31
  ((e) => {
30
32
  e.clickable = `
31
33
  px-2
@@ -38,14 +40,13 @@ var l;
38
40
  rounded-full
39
41
  bg-yellow-50
40
42
  `;
41
- const i = `
42
- focus-visible:outline
43
+ const s = `
43
44
  focus-visible:outline-4
44
45
  focus-visible:outline-black
45
46
  focus-visible:ring-yellow-300
46
47
  `;
47
48
  e.focusRectCondensed = `
48
- ${i}
49
+ ${s}
49
50
  focus-visible:-outline-offset-4
50
51
  focus-visible:ring-[calc(6/16*1rem)]
51
52
  focus-visible:ring-inset
@@ -53,12 +54,12 @@ var l;
53
54
  ${e.focusRectCondensed}
54
55
  focus-visible:bg-yellow-300
55
56
  `, e.focusRect = `
56
- ${i}
57
+ ${s}
57
58
  focus-visible:outline-offset-[calc(2/16*1rem)]
58
59
  focus-visible:ring-[calc(2/16*1rem)]
59
60
  `, e.focusRounded = `
60
61
  ${e.focusRect}
61
- focus-visible:rounded
62
+ focus-visible:rounded-sm
62
63
  `, e.focusCard = `
63
64
  ${e.focusRect}
64
65
  focus-visible:rounded-2xl
@@ -68,7 +69,7 @@ var l;
68
69
  focus-visible:bg-yellow-300
69
70
  `, e.focusRoundedWithBg = `
70
71
  ${e.focusRectWithBg}
71
- focus-visible:rounded
72
+ focus-visible:rounded-sm
72
73
  `, e.hoverUnderline = `
73
74
  hover:underline
74
75
  hover:underline-offset-[calc(3/16*1rem)]
@@ -99,7 +100,6 @@ var l;
99
100
  left-0
100
101
  `, ((c) => {
101
102
  c.focus = `
102
- peer-focus-visible:outline
103
103
  peer-focus-visible:outline-4
104
104
  peer-focus-visible:outline-black
105
105
  peer-focus-visible:ring-yellow-300
@@ -109,11 +109,11 @@ var l;
109
109
  peer-focus-visible:ring-[calc(2/16*1rem)]
110
110
  `;
111
111
  })(e.Peer || (e.Peer = {}));
112
- })(l || (l = {}));
112
+ })(d || (d = {}));
113
113
  export {
114
- l as Style,
115
- v as cx,
116
- a as focusableSelector,
117
- b as mod,
118
- h as treefy
114
+ d as Style,
115
+ p as cx,
116
+ b as focusableSelector,
117
+ h as mod,
118
+ v as treefy
119
119
  };
@@ -1 +1 @@
1
- {"version":3,"file":"calc.d.ts","sourceRoot":"","sources":["../../src/calc.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,MAAO,MAAM,KAAK,MAAM,KAAG,MAA2B,CAAA"}
1
+ {"version":3,"file":"calc.d.ts","sourceRoot":"","sources":["../../src/calc.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MAA2B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"cx.d.ts","sourceRoot":"","sources":["../../src/cx.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,EAAE,kBAAmB,GAAG,EAAE,WAAyC,CAAA"}
1
+ {"version":3,"file":"cx.d.ts","sourceRoot":"","sources":["../../src/cx.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,EAAE,GAAI,GAAG,YAAY,GAAG,EAAE,WAAyC,CAAA"}