@rogieking/figui3 1.0.96 → 1.0.97

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/bun.lockb ADDED
Binary file
package/example.html CHANGED
@@ -67,6 +67,7 @@
67
67
  <fig-slider min="0"
68
68
  max="1"
69
69
  transform="100"
70
+ variant="minimal"
70
71
  step="0.01"
71
72
  text="true"
72
73
  style="width:300px;"
package/fig.css CHANGED
@@ -1430,6 +1430,7 @@ details {
1430
1430
  .fig-slider,
1431
1431
  fig-slider {
1432
1432
  --slider-height: 1rem;
1433
+ --slider-thumb-size: var(--slider-height);
1433
1434
  --slider-percent: calc(var(--slider-complete) * 100%);
1434
1435
  --start-percent: calc(var(--default, 0) * 100%);
1435
1436
  --slider-tick-size: calc(var(--slider-height) / 4);
@@ -1560,9 +1561,10 @@ fig-slider {
1560
1561
  &::-webkit-slider-thumb {
1561
1562
  appearance: none;
1562
1563
  -webkit-appearance: none;
1563
- border-radius: 0.5rem;
1564
- height: var(--slider-height);
1565
- width: var(--slider-height);
1564
+ border-radius: 100%;
1565
+ height: var(--slider-thumb-size);
1566
+ width: var(--slider-thumb-size);
1567
+ margin-top: calc(var(--slider-height) / 2 - var(--slider-thumb-size) / 2);
1566
1568
  aspect-ratio: 1;
1567
1569
  border: none;
1568
1570
  position: relative;
@@ -1628,9 +1630,9 @@ fig-slider {
1628
1630
 
1629
1631
  &::-moz-range-thumb {
1630
1632
  appearance: none;
1631
- border-radius: 0.5rem;
1632
- height: var(--slider-height);
1633
- width: var(--slider-height);
1633
+ border-radius: 100%;
1634
+ height: var(--slider-thumb-size);
1635
+ width: var(--slider-thumb-size);
1634
1636
  aspect-ratio: 1;
1635
1637
  border: none;
1636
1638
  position: relative;
@@ -1707,8 +1709,52 @@ fig-slider {
1707
1709
  }
1708
1710
  }
1709
1711
  }
1712
+ &[variant="minimal"]{
1713
+ transition: all 0.2s ease-in-out;
1714
+ }
1715
+ &[variant="minimal"] {
1716
+ --slider-height: 0.25rem;
1717
+ --slider-thumb-size: 0.5rem;
1718
+ height: 1.5rem;
1719
+ .fig-slider-input-container {
1720
+ height: var(--slider-height);
1721
+ position: relative;
1722
+ display: block;
1723
+ width: 100%;
1724
+
1725
+ /* Track */
1726
+ &::before {
1727
+ box-shadow: none;
1728
+ background: var(--figma-color-text-onbrand-tertiary);
1729
+ }
1730
+
1731
+ input[type="range"] {
1732
+ &::-webkit-slider-runnable-track {
1733
+ box-shadow: none;
1734
+ }
1735
+ }
1736
+ }
1737
+ fig-input-text {
1738
+ height: calc(var(--slider-height) * 2);
1739
+ background-color: transparent;
1740
+ }
1741
+ &:hover,
1742
+ &:focus-within {
1743
+ --slider-height: 1rem;
1744
+ --slider-thumb-size: 1rem;
1745
+ .fig-slider-input-container {
1746
+ &::before {
1747
+ background: var(--figma-color-bg-brand);
1748
+ }
1749
+ }
1750
+ fig-input-text {
1751
+ height: auto;
1752
+ }
1753
+ }
1754
+ }
1710
1755
  }
1711
1756
 
1757
+
1712
1758
  /* Popovers/Dialogs */
1713
1759
  .dialog,
1714
1760
  dialog,
package/index.ts ADDED
@@ -0,0 +1 @@
1
+ console.log("Hello via Bun!");
package/package.json CHANGED
@@ -1,4 +1,15 @@
1
1
  {
2
2
  "name": "@rogieking/figui3",
3
- "version": "1.0.96"
3
+ "version": "1.0.97",
4
+ "module": "index.ts",
5
+ "type": "module",
6
+ "devDependencies": {
7
+ "@types/bun": "latest"
8
+ },
9
+ "peerDependencies": {
10
+ "typescript": "^5.0.0"
11
+ },
12
+ "scripts": {
13
+ "build": "bun build fig.js --minify --outdir dist"
14
+ }
4
15
  }
package/tsconfig.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "compilerOptions": {
3
+ // Enable latest features
4
+ "lib": ["ESNext", "DOM"],
5
+ "target": "ESNext",
6
+ "module": "ESNext",
7
+ "moduleDetection": "force",
8
+ "jsx": "react-jsx",
9
+ "allowJs": true,
10
+
11
+ // Bundler mode
12
+ "moduleResolution": "bundler",
13
+ "allowImportingTsExtensions": true,
14
+ "verbatimModuleSyntax": true,
15
+ "noEmit": true,
16
+
17
+ // Best practices
18
+ "strict": true,
19
+ "skipLibCheck": true,
20
+ "noFallthroughCasesInSwitch": true,
21
+
22
+ // Some stricter flags (disabled by default)
23
+ "noUnusedLocals": false,
24
+ "noUnusedParameters": false,
25
+ "noPropertyAccessFromIndexSignature": false
26
+ }
27
+ }